lapl conv

4
ME201/MTH281/ME400/CHE400 Solution of Laplace Equation by Convolution Integral - Examples 1. Introduction In this notebook we consider the solution of the boundary value problem given below for the Laplace equation in a two- dimensional upper half-space. The method is t he Fourier transform and convolution. (1) ! 2 F ! x 2 + ! 2 F ! y 2 = 0 ,  < x  < ¶,  y  > 0 , with  F H  x, 0L =  f  H  xL,and F ö  yz0 . We obtained the solution to this problem in class by the Fourier transform, defined by (2) F è Hk ,  yL  =    FH  x,  yL -ikx   x . By taking the Fourier transform of the equation and boundary condition, we find the solution in the form (3) F è Hk ,  yL  =  f è Hk L - k y , where  f è (k ) is the Fourier transf orm of the boundary functi on  f (  x). To invert thi s, we use convolut ion, along wit h the known inverse transforms (4) F - 1 9  f  H è k M= =  f  H  xL and  F - 1 9- k y =  = 1 p  y  x 2 + y 2 . Then the solution is (5) F H  x,  yL =    1 p y Hx  - x £ L 2 + y 2  f  Hx £ L  x £ . 2. Example We choose a boundary potenti al that is constan t on an interval (-a, a) and zero otherwise. We let the consta nt value be F0. Then the convolution solution (using z for the variable of integration) is In[1]:=  Clear@F0, aD In[2]:=  F@  x_ ,  y_ D =  SimplifyB F0    -a a 1 p y Hx  -  zL 2 + y 2  z , Assumptions -> 8a > 0, y > 0, x Œ Reals<F Out[2]= F0 J  ArcTanB a-x y F + ArcTanB a+x y FN p  

Upload: zbigg

Post on 03-Jun-2018

215 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Lapl Conv

8/12/2019 Lapl Conv

http://slidepdf.com/reader/full/lapl-conv 1/4

ME201/MTH281/ME400/CHE400

Solution of Laplace Equation

by Convolution Integral - Examples

1. Introduction

In this notebook we consider the solution of the boundary value problem given below for the Laplace equation in a two-

dimensional upper half-space. The method is the Fourier transform and convolution.

(1)

!2

F

!x2

+

!2

F

!y2= 0 ,   -¶ < x   < ¶,   y   > 0 ,

with   F H x, 0L =   f  H xL, and F ö

 yz¶

0 .

We obtained the solution to this problem in class by the Fourier transform, defined by

(2)Fè Hk , yL   = ‡  

FH x, yL ‰-ikx

„  x .

By taking the Fourier transform of the equation and boundary condition, we find the solution in the form

(3)Fè Hk , yL   =   f 

èHk L ‰- k y,

where  f è(k ) is the Fourier transform of the boundary function f ( x). To invert this, we use convolution, along with the known

inverse transforms

(4)F - 1

9 f  Hè

k M= =   f  H xL and   F - 1

9‰

- k y

=   =

1

p

 y

 x2 +  y2 .

Then the solution is

(5)F H x, yL = ‡  -¶

¶ 1

p

y

Hx   - x£L2 + y2 f  Hx£ L „ x£ .

2. Example

We choose a boundary potential that is constant on an interval (-a, a) and zero otherwise. We let the constant value be

F0. Then the convolution solution (using z for the variable of integration) is

In[1]:=   Clear@F0, aD

In[2]:=   F@ x_ ,   y_ D =   SimplifyB F0 ‡  -a

a 1

p

y

Hx   -   zL2 +   y2‚ z , Assumptions -> 8a > 0, y > 0, x Œ Reals<F

Out[2]=

F0 J ArcTanB a-x

yF +  ArcTanB a+x

yFN

p

 

Page 2: Lapl Conv

8/12/2019 Lapl Conv

http://slidepdf.com/reader/full/lapl-conv 2/4

We see that we have a very simple closed-form solution to the problem. Now we choose values for a and F0 and then make a

contour plot of the solution. We stay slightly away from y = 0 to avoid problems from the y in the denominator of the arguments

of the ArcTan.

In[3]:=   a   =  1.0 H**   m    **L;   F0   =   10.0 H**   volts   **L;

In[4]:=   ContourPlot@F@x, yD, 8x,   - 2 a, 2 a<, 8y, 0.01, 4 a<,

FrameLabel   Ø 8"x   H m L", "y   H m L"<, ContourLabels   Ø  TrueD

Out[4]=

The equipotentials all reach the boundary at the discontinuities at  x = ±a, as we would expect. The contours look like

circles. As an exercise, you might want to show analytically that they are circles.

3. A More Difficult Example

Now we look at an example in which the convolution integral has to been done numerically. We take the boundary function to

be a linear function times a Gaussian:

In[5]:=   Clear@f,   F0, a,   FD;

In[6]:=   f@x_ D  := F0 Hx ê aL ExpA-Hx ê aL2E

We set the values of 100 volts for F0 and 1m for a.

In[7]:=   F0   =   100.0; a   =  1.0;

Before carrying out the solution, we take a look at the boundary function with the Plot command.

2   lapconv.nb

Page 3: Lapl Conv

8/12/2019 Lapl Conv

http://slidepdf.com/reader/full/lapl-conv 3/4

Page 4: Lapl Conv

8/12/2019 Lapl Conv

http://slidepdf.com/reader/full/lapl-conv 4/4

In[14]:=   ContourPlot@F@x, yD, 8x,   - 2 a, 2 a<,

8y, 0.01, 4 a<, FrameLabel   Ø 8"x", "y"<, ContourLabels   Ø   TrueD

NIntegrate::slwcon :

Numerical integration converging too slowly; suspect one of the following: singularity, value of the

integration is 0, highly oscillatory integrand, or WorkingPrecision too small.  à

NIntegrate::ncvb :NIntegrate failed to converge to prescribed accuracy after 9 recursive bisections in z near

8z<   =  8-1.99429<. NIntegrate obtained  -3.79182 and

0.00025893654290340905` for the integral and error estimates.  à

Out[14]=

The plot appears to be reasonable, but the error messages are a little alarming. However it is not uncommon to get this kind of message with NIntegrate, especially when the integral values approach zero, as they will with increasing y. Such messages do

not necessarily mean that the solution is inaccurate. We can attempt to deal with this by altering some of the default values for

options in NIntegrate, but that is a subject that requires more than just a few comments, so we don't pursue it here.

The point of this second example is that the convolution form of the solution is still useful for evaluating the solution,

even when the convolution integral has to be done numerically.

4   lapconv.nb