Upcoming SlideShare
×

# Application of laplace(find k)

999 views

Published on

0 Likes
Statistics
Notes
• Full Name
Comment goes here.

Are you sure you want to Yes No
• Be the first to comment

• Be the first to like this

Views
Total views
999
On SlideShare
0
From Embeds
0
Number of Embeds
1
Actions
Shares
0
65
0
Likes
0
Embeds 0
No embeds

No notes for slide

### Application of laplace(find k)

1. 1. Laplace’s Equation• Separation of variables – two examples• Laplace’s Equation in Polar Coordinates – Derivation of the explicit form – An example from electrostatics• A surprising application of Laplace’s eqn – Image analysis – This bit is NOT examined
2. 2. Laplace’s Equation ∂ 2φ ∂ 2φ + 2 =0 ∂x 2 ∂y ⎡∂⎤ ⎢ ⎥In the vector calculus course, this appears as ∇ 2φ =0 where ∇ = ⎢ ∂x ⎥ ∂ ⎢ ⎥ ⎢ ∂y ⎥ ⎣ ⎦Note that the equation has no dependence on time, just on the spatialvariables x,y. This means that Laplace’s Equation describes steady statesituations 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, …
3. 3. Stress analysis example: Dirichlet conditions Steady state stress analysis problem, which satisfies Laplace’s 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 conditionsTo 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
4. 4. 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.
5. 5. 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 ) ≡ 0That is, the case k=0 is not possible
6. 6. 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 ) ≡ 0Again, we find that the case k>0 is not possible
7. 7. Final case k<0Suppose 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⇒ w≡0 continue with C = 0 ⇒ w( x, y ) = BD sin αx sinh αyw(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
8. 8. Solution Applying the first three ∞ nπx nπy boundary conditions, we w( x, y ) = ∑ K n sin a sinh a n =1 have The final boundary condition is: w( x ,b ) = w0 sin πx a πx ∞ nπx nπb which gives: w0 sin = ∑ K n sin sinh a n =1 a a w0We 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
9. 9. More general boundary condition y w = w0 f ( x ) b w=0 w=0 a x w=0 ∞ nπx nπbThen w0 f ( x) = ∑ K n sin sinh n =1 a a and as usual we use orthogonality formulae/HLT to find the Kn
10. 10. Types of boundary condition1. 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
11. 11. 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 xBoundary 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
12. 12. 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.
13. 13. 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 = aThat is, the case k=0 is not possible
14. 14. 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 ) ≡ 0Again, we find that the case k>0 is not possible
15. 15. Final case k<0Suppose 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⇒ w≡0 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
16. 16. 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 w0We 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
17. 17. 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 won’t go that farWe illustrate the solution of Laplace’s Equation using polarcoordinates* *Kreysig, Section 11.11, page 636
18. 18. A problem in electrostatics V ( r ,θ , z ) = U This is a cross section of aRadius a on the upper half charged cylindrical rod. r θ Thin strip of insulating material 0V I could simply TELL you that Laplace’s 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
19. 19. 2D Laplace’s Equation in Polar Coordinates x = r cos θ y = r sin θ θ r y r = x2 + y2 x ⎛ y⎞ θ = tan ⎜ ⎟ −1 ⎝x⎠ ∂ 2u ∂ 2u x = x(r ,θ ), y = y( r ,θ )∇ 2u = 2 + 2 = 0 where ∂x ∂y u ( x, y ) = u ( r , θ )So, Laplace’s Equation is ∇ u ( r ,θ ) = 0 2We next derive the explicit polar form of Laplace’s Equation in 2D
20. 20. ∂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
21. 21. The required partial derivatives ⎛ y⎞ x = r cos θ y = r sin θ r= x +y 2 2 θ = tan ⎜ ⎟ −1 ⎝x⎠ ∂r ∂r x ∂r yr = x + y ⇒ 2r2 2 2 = 2x ⇒ = Similarly, = ∂x ∂x r ∂y r ∂ 2r y 2 ∂ 2r x 2 = 3, 2 = 3 ∂x 2 r ∂y rin like manner …. ∂θ y ∂θ x =− 2, = 2 ∂x r ∂y r ∂ 2θ 2 xy ∂ 2θ 2 xy = 4 , 2 = 4 ∂x 2 r ∂y r
22. 22. Back to Laplace’s 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 ∂ 2u ∂ 2u y 2 ∂u x 2 ∂ 2u 2 xy ∂u 2 xy ∂ 2u 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 =0So Laplace’s Equation ∂x ∂y ∂r r ∂r r ∂θin polars is 2 2
23. 23. ∂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
24. 24. Example of Laplace in Cylindrical Polar Coordinates (r, Θ, z) Consider a cylindrical capacitor z P(r,θ,z) V ( r ,θ , z ) = URadius a on the upper half z r θ θ r y x Thin strip of insulating material 0V Boundary conditionsLaplace’s Equation incylindrical 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
25. 25. ∂V There is no variation in V in the z-direction, so =0 ∂z ∂ 2V 1 ∂V 1 ∂ 2VThis 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
26. 26. 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=0The solution has to remain finite as r→0: c=0 V (r , θ ) = bd = g, a constant
27. 27. The case k<0Suppose 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
28. 28. The case k>0Suppose 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 r→0 Dn = 0
29. 29. The solution V (r , θ ) = g + ∑ r n ( An cos nθ + Bn sin nθ ) nNotice 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θ = 2πg 0 n U and so g = 2
30. 30. Solving for Am and Bm V (a,θ ) = + ∑ a n ( An cos nθ + Bn sin nθ ) USo far, the solution is 2 nWe apply the orthogonality relationships: 2π 2π 2π U ∫ V (a, θ ) cos mθdθ = ∫ cos mθdθ + ∫∑a ( An cos nθ + Bn sin nθ ) cos mθdθ n 0 2 0 0 n π U ∫ cos mθdθ = 0 + Am a mπ 0 0 = Am a mπ , and so Am = 0, for all m 2π 2π 2π U ∫ V (a, θ ) sin mθdθ = ∫ sin mθdθ + ∫ ∑ a ( An cos nθ + Bn sin nθ ) sin mθdθ n 0 2 0 0 n π 2π U ⎡ cos mθ ⎤ U ∫ sin mθdθ = ⎢ ⎥ + 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)
31. 31. ∞ r ( 2 n −1 ) V (r ,θ ) = + U 2U 2 π ∑ ( 2n − 1 )a( 2 n−1 ) sin( 2n − 1 )θ n =1Check for r = a, θ = π/2: ∞ a ( 2 n −1 ) πV (r ,θ ) = + U 2U 2 π ∑ ( 2n − 1 )a( 2 n−1 ) 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
32. 32. An application in image analysis• We saw that the Gaussian is a solution to the heat/diffusion equation• We have studied Laplace’s 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
33. 33. Laplace’s Equation in image analysisHow do we computethe 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 Constant crossing + max at the step. Zero gradient at step. But Note amplified noise noise doubly amplified
34. 34. Gaussian smoothingBlurring with a Gaussian filter is one way to tame noise
35. 35. Zero crossings of a second derivative, isotropic operator,after Gaussian smoothing ∇ I smooth = 0 2 An application of Laplace’s Equation!
36. 36. Limits of isotropic Gaussian blurring A noisy image Gaussian blurringGaussian is isotropic – takes no account of orientation of imagefeatures – so it gives crap edge features
37. 37. ∇ (Gσ ∗ I ) = 0 2As the blurring is increased, by increasing the standard deviation of theGaussian, the structure of the image is quickly lost. Can we do better? Can we make blurring respect edges?
38. 38. 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 2This is a non-linear version of Laplace’s Equation, in which the blurring issmall across an edge feature (low gradient) and large along an edge.
39. 39. Anisotropic blurringof the noisy imageTop right: GaussianBottom left and right:different anisotropicblurrings
40. 40. Example ofanisotropic diffusion –brain MRI images,which are very noisy.Top: Gaussian blurMiddle and bottom:anistropic blur
41. 41. Anisotropicblurring of thehouse imageretaining importantstructures atdifferent degreesof non-linearblurring
42. 42. Two final examples:Left – original imageRight – anistropic blurring