You are on page 1of 42

Laplaces Equation

Separation of variables two examples


Laplaces Equation in Polar Coordinates
Derivation of the explicit form
An example from electrostatics
A surprising application of Laplaces eqn
Image analysis
This bit is NOT examined
Laplaces Equation
2 2
+ 2 =0
x 2
y

x
In the vector calculus course, this appears as 2 =0 where =

y

Note that the equation has no dependence on time, just on the spatial
variables x,y. This means that Laplaces Equation describes steady state
situations such as:
steady state temperature distributions
steady state stress distributions
steady state potential distributions (it is also called the potential equation
steady state flows, for example in a cylinder, around a corner,
Stress analysis example: Dirichlet conditions
Steady state stress analysis problem, which satisfies Laplaces
equation; that is, a stretched elastic membrane on a rectangular former
that has prescribed out-of-plane displacements along the boundaries
x
y w = w0 sin w(x,y) is the displacement in
b a z-direction

y
w=0 z
w=0
x

a x
w=0 Boundary conditions
To solve: w(0, y ) = 0, for 0 y b
w( x,0) = 0, for 0 x a
w w
2 2
+ 2 =0 w(a, y ) = 0, for 0 y b
x 2
y
w( x, b) = w0 sin x, for 0 x a
a
Solution by separation of variables
w( x, y ) = X ( x)Y ( y )
from which X Y + XY = 0
X Y
and so
+ =0
X Y
X Y
as usual = =k
X Y
where k is a constant that is either equal to, >, or < 0.
Case k=0
X ( x) = ( Ax + B ), Y ( y ) = (Cy + D)
w(0, y ) = 0 B = 0 or C = D = 0
if C = D = 0, then Y ( y ) 0, so w( x, y ) 0
Continue with B = 0 :w( x, y ) = Ax(Cy + D)

w( x,0) = 0 ADx = 0
Either A = 0 (so w 0) or D = 0
Continue with w( x, y ) = ACxy
w(a, y ) = 0 ACay = 0 A = 0 or C = 0 w( x, y ) 0
That is, the case k=0 is not possible
Case k>0
Suppose that k = 2 , so that
w( x, y ) = ( A cosh x + B sinh x)(C cos y + D sin y )

Recall that cosh 0 = 1, sinh 0 = 0


w(0, y ) = 0 A(C cos y + D sin y ) = 0
C = D = 0 w( x, y ) 0
Continue with A = 0 w( x, y ) = B sinh x(C cos y + D sin y )

w( x,0) = 0 BC sinh x = 0
B = 0 w( x, y ) 0
Continue with C = 0 w( x, y ) = BD sinh x sin y

w(a, y ) = 0 BD sinh a sin y = 0


so either B = 0 or D = 0 w( x, y ) 0
Again, we find that the case k>0 is not possible
Final case k<0
Suppose that k = 2
w( x, y ) = ( A cos x + B sin x)(C cosh y + D sinh y )

w(0, y ) = 0 A(C cosh y + D sinh y ) = 0


as usual, C = D = 0 w 0
continue with A = 0 w( x, y ) = B sin x(C cosh y + D sinh y )

w( x,0) = 0 BC sin x = 0
B =0 w0
continue with C = 0 w( x, y ) = BD sin x sinh y

w(a, y ) = 0 BD sin a sinh y = 0


B = 0 or D = 0 w 0

sin a = 0 = n wn ( x, y ) = BD sin n x sinh n y
a a a
Solution
Applying the first three
nx ny
boundary conditions, we
w( x, y ) =
n =1
K n sin
a
sinh
a
have

The final boundary condition is: w( x ,b ) = w0 sin x


a
x
nx nb
which gives: w0 sin = K n sin sinh
a n =1 a a
w0
We can see from this that n must take only one value, namely 1, so that K 1 =
b
sinh
a
and the final solution to the stress distribution is

w0 x y
w( x, y ) = sin sinh
b a a
sinh
a
Check out: http://mathworld.wolfram.com/HyperbolicSine.html
More general boundary condition
y w = w0 f ( x )
b

w=0
w=0

a x
w=0

nx nb
Then
w0 f ( x) = K n sin sinh
n =1 a a
and as usual we use orthogonality formulae/HLT to find the Kn
Types of boundary condition
1. The value ( x, y ) is specified at each point on
the boundary: Dirichlet conditions

2. The derivative normal to the boundary n ( x, y ) is
specified at each point of the boundary:
Neumann conditions
3. A mixture of type 1 and 2 conditions is specified
Johann Dirichlet (1805-1859)
http://www-gap.dcs.st-
and.ac.uk/~history/Mathematicians/Dirichlet.html

Carl Gottfried Neumann (1832 -1925)


http://www-history.mcs.st-

andrews.ac.uk/history/Mathematicians/Neumann_Carl.html
A mixed condition problem
A steady state heat transfer
y w = w0 sin x
problem 2a
b
To solve:
w=0 w
w w
2 2 =0
x
+ 2 =0
x 2
y
a x
Boundary conditions w=0

w(0, y ) = 0, for 0 y b
w( x,0) = 0, for 0 x a
There is no flow of heat across
w this boundary; but it does not
= 0, for 0 y b
x x = a necessarily have a constant
temperature along the edge

w( x, b) = w0 sin x, for 0 x a
2a
Solution by separation of variables
w( x, y ) = X ( x)Y ( y )
from which X Y + XY = 0
X Y
and so
+ =0
X Y
X Y
as usual = =k
X Y
where k is a constant that is either equal to, >, or < 0.
Case k=0
X ( x) = ( Ax + B ), Y ( y ) = (Cy + D)
w(0, y ) = 0 B = 0 or C = D = 0
if C = D = 0, then Y ( y ) 0, so w( x, y ) 0
Continue with B = 0 :w( x, y ) = Ax(Cy + D)

w( x,0) = 0 ADx = 0
Either A = 0 (so w 0) or D = 0
Continue with w( x, y ) = ACxy
w
= 0 ACy = 0 A = 0 or C = 0 w( x, y ) 0
x x = a

That is, the case k=0 is not possible


Case k>0
Suppose that k = 2 , so that
w( x, y ) = ( A cosh x + B sinh x)(C cos y + D sin y )

Recall that cosh 0 = 1, sinh 0 = 0


w(0, y ) = 0 A(C cos y + D sin y ) = 0
C = D = 0 w( x, y ) 0
Continue with A = 0 w( x, y ) = B sinh x(C cos y + D sin y )

w( x,0) = 0 BC sinh x = 0
B = 0 w( x, y ) 0
Continue with C = 0 w( x, y ) = BD sinh x sin y
w
= 0 BD cosh a sin y = 0
x x = a
so either B = 0 or D = 0 w( x, y ) 0
Again, we find that the case k>0 is not possible
Final case k<0
Suppose that k = 2
w( x, y ) = ( A cos x + B sin x)(C cosh y + D sinh y )

w(0, y ) = 0 A(C cosh y + D sinh y ) = 0


as usual, C = D = 0 w 0
continue with A = 0 w( x, y ) = B sin x(C cosh y + D sinh y )

w( x,0) = 0 BC sin x = 0
B =0 w0
continue with C = 0 w( x, y ) = BD sin x sinh y
w
= 0 BD cos a sinh y = 0
x x = a
B = 0 or D = 0 w 0
(2n 1) (2n 1) (2n 1)
cos a = 0 = wn ( x, y ) = BD sin x sinh y
2a 2a 2a
Solution
Applying the first three
(2n 1) (2n 1)
w( x, y ) = K n sin x sinh y
boundary conditions, we n =1 2a 2a
have

The final boundary condition is: x


w( x, b) = w0 sin
2a
x (2n 1)

(2n 1)
which gives: w0 sin = K n sin x sinh b
2a n =1 2a 2a
w0
We can see from this that n must take only one value, namely 1, so that K1 =

sinh b
2a
and the final solution to the stress distribution is

w0 x y
w( x, y ) = sin sinh
b a a
sinh
a
Check out: http://mathworld.wolfram.com/HyperbolicSine.html
PDEs in other coordinates
In the vector algebra course, we find that it
is often easier to express problems in
coordinates other than (x,y), for example
in polar coordinates (r,)
Recall that in practice, for example for
finite element techniques, it is usual to use
curvilinear coordinates but we wont go
that far
We illustrate the solution of Laplaces Equation using polar
coordinates*
*Kreysig, Section 11.11, page 636
A problem in electrostatics
V ( r , , z ) = U This is a cross section of a
Radius a
on the upper half charged cylindrical rod.
r

Thin strip of insulating material

0V

I could simply TELL you that Laplaces


Equation in cylindrical polars is:
2V 1 V 1 2V 2V
V= 2 +
2
+ 2 + 2 =0 brief time out while
r r r r 2
z I DERIVE this
2D Laplaces Equation in Polar Coordinates

x = r cos
y = r sin

r y r = x2 + y2
x
y
= tan
1

x
2
u 2
u x = x(r , ), y = y( r , )
u= 2 + 2 =0
2 where
x y
u ( x, y ) = u ( r , )
So, Laplaces Equation is u ( r , ) = 0
2

We next derive the explicit polar form of Laplaces Equation in 2D


u u r u
Recall the chain rule: = +
x r x x
Use the product rule to differentiate again

2u u 2 r u r u 2 u
= + + + (*)
x 2
r x 2
x r x x 2
x x

and the chain rule again to get these derivatives

u u r u 2u r 2u
= + = 2 +
x r r r x r x r x r x

u u r u 2u r 2u
= + = + 2
x r x x r x x
The required partial derivatives
y
x = r cos y = r sin r= x +y
2 2
= tan
1

r r x r y
r = x + y 2r
2 2 2
= 2x = Similarly, =
x x r y r

2r y 2 2r x 2
= 3, 2 = 3
x 2
r y r
in like manner .
y x
= 2, = 2
x r y r
2 2 xy 2 2 xy
= 4 , 2 = 4
x 2
r y r
Back to Laplaces Equation in polar
coordinates

Plugging in the formula for the partials on the previous page to the
formulae on the one before that we get:

2u 2u x 2 u y 2 2u 2 xy u 2 xy 2u y 2
= 2 2+ + + + 2 4
x 2
r r r r 3
r r 3
r 4
r

2
u 2
u y 2
u x 2
2
u 2 xy u 2 xy 2
u x 2
Similarly, = 2 2 + + + 2 4
y 2
r r r r 3
r r 3
r 4
r

2u 2u 2u 1 u 1 2u
+ 2 = 2+ + 2 =0
So Laplaces Equation

x y r r r r
in polars is 2 2
u u
2 2
+ 2 =0
x 2
y
is equivalent to
u 1 u 1 u
2 2
+ + 2 =0
r 2
r r r 2
Example of Laplace in Cylindrical Polar Coordinates (r, , z)
Consider a cylindrical capacitor z
P(r,,z)
V ( r , , z ) = U
Radius a
on the upper half z
r


r y
x
Thin strip of insulating material

0V
Boundary conditions
Laplaces Equation in
cylindrical polars is: V ( a , ) = U : 0
2V 1 V 1 2V 2V V ( a , ) = 0 : 2
V= 2 +
2
+ 2 + 2 =0
r r r r 2
z In the polar system, note that the
solution must repeat itself every =
2
V should remain finite at r=0
V
There is no variation in V in the z-direction, so =0
z
2V 1 V 1 2V
This means we can treat it as a 2D problem + + 2 =0
r 2
r r r 2

Using separation of variables

V = R(r ) ( )
1 1
R + R + 2 R = 0
r r
R + R r
=
R r2
As before, this means

R + R r
= = k, a constant
R r 2
The case k=0
= 0 ( ) = a + b
R
R + = 0 R(r ) = (C ln r + D )
r
and so V (r , ) = (a + b)(C ln r + D )

The solution has to be periodic in 2: a=0

The solution has to remain finite as r0: c=0

V (r , ) = bd = g, a constant
The case k<0
Suppose that k = m 2
+ m 2 = 0 ( ) = ( Am cosh m + Bm sinh m )
R m 2
(
R + + 2 R = 0 R (r ) = Cm r m + Dm r m
r r
)

The solution has to be periodic in , with period 2. This implies


that A = B = 0 V ( r , ) 0
m m
The case k>0
Suppose that k = n 2
+ n 2 = 0 ( ) = ( An cos n + Bn sin n )
R n 2
(
R + 2 R = 0 R(r ) = Cn r n + Dn r n
r r
)
(
V (r , ) = ( An cos n + Bn sin n ) Cn r n + Dn r n )
Evidently, this is periodic with period 2

To remain finite as r0 Dn = 0
The solution
V (r , ) = g + r n ( An cos n + Bn sin n )
n

Notice that we have not yet applied the voltage boundary condition!!
Now is the time to do so
U 0
g + a n ( An cos n + Bn sin n ) = V (a, ) =
n 0 < 2
2
Integrating V from 0 to 2:
V (a, )d = U
0
2
Left hand side: g + a n
( An cos n + Bn sin n )d = 2g
0 n

U
and so g =
2
Solving for Am and Bm
V (a, ) = + a n ( An cos n + Bn sin n )
U
So far, the solution is
2 n
We apply the orthogonality relationships:
2 2 2
U
0 = cos md + a ( An cos n + Bn sin n ) cos md
n
V ( a , ) cos m d
2 0 0 n

U cos md = 0 + Am a m
0

0 = Am a m , and so Am = 0, for all m

2 2 2
U
0 = sin md + a ( An cos n + Bn sin n ) sin md
n
V ( a , ) sin m d
2 0 0 n

2
U cos m
U sin md = + Bm a m
0
2 m 0
2U
= Bm a m , for odd m = (2n 1)
m
U 2U
V (r , ) = + r ( 2 n 1) sin(2n 1)
2 n (2n 1)a ( 2 n 1)

r ( 2 n 1 )
V (r , ) = +
U 2U
2

n =1 ( 2 n 1 )a
( 2 n 1 )
sin( 2 n 1 )

Check for r = a, = /2:


a ( 2 n 1 )
V (r , ) = +
U 2U
2

n =1 ( 2 n 1 )a
( 2 n 1 )
sin( 2 n 1 )
2

U 2U 1 3 1 5
= + sin + sin + sin + ......
2 2 3 2 5 2
U
U 2U 1 1 1
= + 1 + + ......
2 3 5 7
r

U 2U
= + 4 = U
2

0V
An application in image analysis
We saw that the Gaussian is a solution to
the heat/diffusion equation
We have studied Laplaces equation
The next few slides hint at the application
of what we have done so far in image
analysis
This is aimed at engaging your interest in
PDEs it is not examined
Laplaces Equation in image analysis
How do we compute
the edges?

Edge map

d2 intensity/ dx2
Image fragment

d intensity/ dx
intensity

Remove the noise by smoothing


Find places where the second derivative
of the image is zero
Signal position, x Zero crossing
Constant gradient +atmax
step.at the
Butstep.
Note amplified
doubly noise noise
amplified
Gaussian smoothing

Blurring with a Gaussian filter is one way to tame noise


Zero crossings of a second derivative, isotropic operator,
after Gaussian smoothing

I smooth = 0
2

An application of Laplaces Equation!


Limits of isotropic Gaussian blurring

A noisy image Gaussian blurring

Gaussian is isotropic takes no account of orientation of image


features so it gives crap edge features
(G I ) = 0
2

As the blurring is increased, by increasing the standard deviation of the


Gaussian, the structure of the image is quickly lost.
Can we do better? Can we make blurring respect edges?
Anisotropic diffusion
t I = ( g ( x; t )I )
T

|I |2

g ( x; t ) = e k2
, for some constant k, or
1
g ( x; t ) =
1+ | I | / k
2 2

This is a non-linear version of Laplaces Equation, in which the blurring is


small across an edge feature (low gradient) and large along an edge.
Anisotropic blurring
of the noisy image
Top right: Gaussian
Bottom left and right:
different anisotropic
blurrings
Example of
anisotropic diffusion
brain MRI images,
which are very noisy.
Top: Gaussian blur
Middle and bottom:
anistropic blur
Anisotropic
blurring of the
house image
retaining important
structures at
different degrees
of non-linear
blurring
Two final examples:
Left original image
Right anistropic blurring

You might also like