28
Math 241: More heat equation/Laplace equation D. DeTurck University of Pennsylvania September 27, 2012 D. DeTurck Math 241 002 2012C: Heat/Laplace equations 1 / 13

Math 241: More heat equation/Laplace equationdeturck/m241/heat_and_la...Math 241: More heat equation/Laplace equation D. DeTurck University of Pennsylvania September 27, 2012 D. DeTurck

  • Upload
    others

  • View
    5

  • Download
    0

Embed Size (px)

Citation preview

Math 241: More heat equation/Laplace equation

D. DeTurck

University of Pennsylvania

September 27, 2012

D. DeTurck Math 241 002 2012C: Heat/Laplace equations 1 / 13

Another example

• Another heat equation problem:

ut =1

2uxx , u(0, t) = 0, ux(L, t) = 0, u(x , 0) = 2Lx − x2

for t > 0 and 0 ≤ x ≤ L.

• To match the boundary conditions this time, we’ll assumethat we can express u as

u(x , t) =∞∑n=0

bne−(n+ 1

2)2π2t/4L2 sin

(n + 12)πx

L

and see if we can figure out what the constants bn should be— we know that the boundary conditions are automaticallysatisfied, and perhaps we can choose the bn’s so that

2Lx − x2 =∞∑n=0

bn sin(n + 1

2)πx

L.

D. DeTurck Math 241 002 2012C: Heat/Laplace equations 2 / 13

Another example

• Another heat equation problem:

ut =1

2uxx , u(0, t) = 0, ux(L, t) = 0, u(x , 0) = 2Lx − x2

for t > 0 and 0 ≤ x ≤ L.

• To match the boundary conditions this time, we’ll assumethat we can express u as

u(x , t) =∞∑n=0

bne−(n+ 1

2)2π2t/4L2 sin

(n + 12)πx

L

and see if we can figure out what the constants bn should be— we know that the boundary conditions are automaticallysatisfied, and perhaps we can choose the bn’s so that

2Lx − x2 =∞∑n=0

bn sin(n + 1

2)πx

L.

D. DeTurck Math 241 002 2012C: Heat/Laplace equations 2 / 13

Integral facts

• We’re trying to find bn’s so that

2Lx − x2 =∞∑n=0

bn sin(n + 1

2)πx

L.

• We’ll use two basic facts:

• If n 6= m then

ˆ L

0sin

(n + 12)πx

Lsin

(m + 12)πx

Ldx = 0.

• If n = m then

ˆ L

0sin

(n + 12)πx

Lsin

(m + 12)πx

Ldx =

ˆ L

0sin2 (n + 1

2)πx

Ldx =

L

2.

D. DeTurck Math 241 002 2012C: Heat/Laplace equations 3 / 13

Integral facts

• We’re trying to find bn’s so that

2Lx − x2 =∞∑n=0

bn sin(n + 1

2)πx

L.

• We’ll use two basic facts:

• If n 6= m then

ˆ L

0sin

(n + 12)πx

Lsin

(m + 12)πx

Ldx = 0.

• If n = m then

ˆ L

0sin

(n + 12)πx

Lsin

(m + 12)πx

Ldx =

ˆ L

0sin2 (n + 1

2)πx

Ldx =

L

2.

D. DeTurck Math 241 002 2012C: Heat/Laplace equations 3 / 13

Finding the coefficients

• We’re still trying to find bn’s so that

2Lx − x2 =∞∑n=0

bn sin(n + 1

2)πx

L.

• Motivated by the facts on the previous slide, we multiply both

sides by sin(m 1

2)πx

L and integrate both sides from 0 to L:ˆ L

0(2Lx − x2) sin

(m + 12)πx

Ldx

=

ˆ L

0

( ∞∑n=0

bn sin(n + 1

2)πx

L

)sin

(m + 12)πx

Ldx

=∞∑n=0

bn

ˆ L

0sin

(n + 12)πx

Lsin

(m + 12)πx

Kdx

=Lbm

2D. DeTurck Math 241 002 2012C: Heat/Laplace equations 4 / 13

Integration by parts

• It’s an exercise in integration by parts to show that

ˆ L

0(2Lx − x2) sin

(m + 12)πx

Ldx =

8L3

(m + 12)3π3

• Therefore,

bm =32L2

(2m + 1)3π3

• So we arrive at a candidate for the solution:

u(x , t) =∞∑n=0

32L2

(2n + 1)3π3e−(n+

12)2π2t/2L2 sin

(n + 12)πx

L

D. DeTurck Math 241 002 2012C: Heat/Laplace equations 5 / 13

Integration by parts

• It’s an exercise in integration by parts to show that

ˆ L

0(2Lx − x2) sin

(m + 12)πx

Ldx =

8L3

(m + 12)3π3

• Therefore,

bm =32L2

(2m + 1)3π3

• So we arrive at a candidate for the solution:

u(x , t) =∞∑n=0

32L2

(2n + 1)3π3e−(n+

12)2π2t/2L2 sin

(n + 12)πx

L

D. DeTurck Math 241 002 2012C: Heat/Laplace equations 5 / 13

Integration by parts

• It’s an exercise in integration by parts to show that

ˆ L

0(2Lx − x2) sin

(m + 12)πx

Ldx =

8L3

(m + 12)3π3

• Therefore,

bm =32L2

(2m + 1)3π3

• So we arrive at a candidate for the solution:

u(x , t) =∞∑n=0

32L2

(2n + 1)3π3e−(n+

12)2π2t/2L2 sin

(n + 12)πx

L

D. DeTurck Math 241 002 2012C: Heat/Laplace equations 5 / 13

Validating the solution

• The series

u(x , t) =∞∑n=0

32L2

(2n + 1)3π3e−(n+

12)2π2t/2L2 sin

(n + 12)πx

L

converges for t ≥ 0, and certainly satisfies the boundaryconditions. What about the initial conditionu(x , 0) = 2Lx − x2?

• Well,

u(x , 0) =∞∑n=0

32L2

(2n + 1)3π3sin

(n + 12)πx

L

.

D. DeTurck Math 241 002 2012C: Heat/Laplace equations 6 / 13

Validating the solution

• The series

u(x , t) =∞∑n=0

32L2

(2n + 1)3π3e−(n+

12)2π2t/2L2 sin

(n + 12)πx

L

converges for t ≥ 0, and certainly satisfies the boundaryconditions. What about the initial conditionu(x , 0) = 2Lx − x2?

• Well,

u(x , 0) =∞∑n=0

32L2

(2n + 1)3π3sin

(n + 12)πx

L

.

D. DeTurck Math 241 002 2012C: Heat/Laplace equations 6 / 13

Graphical evidence

Use L = 5 .Red graph: 10x − x2, Blue graph: sumOne term:

Three terms:

D. DeTurck Math 241 002 2012C: Heat/Laplace equations 7 / 13

Plotting the solution

Here is a plot of the sum of of the first three terms of the solution:

D. DeTurck Math 241 002 2012C: Heat/Laplace equations 8 / 13

Laplace equation on a rectangle

• The two-dimensional Laplace equation is

uxx + uyy = 0.

Solutions of it represent equilibrium temperature (squirrel,etc) distributions, so we think of both of the independentvariables as space variables.

• We’ll solve the equation on a bounded region (at least atfirst), and it’s appropriate to specify the values of u on theboundary (Dirichlet boundary conditions), or the values of thenormal derivative of u at the boundary (Neumann conditions),or some mixture of the two.

D. DeTurck Math 241 002 2012C: Heat/Laplace equations 9 / 13

Laplace equation on a rectangle

• The two-dimensional Laplace equation is

uxx + uyy = 0.

Solutions of it represent equilibrium temperature (squirrel,etc) distributions, so we think of both of the independentvariables as space variables.

• We’ll solve the equation on a bounded region (at least atfirst), and it’s appropriate to specify the values of u on theboundary (Dirichlet boundary conditions), or the values of thenormal derivative of u at the boundary (Neumann conditions),or some mixture of the two.

D. DeTurck Math 241 002 2012C: Heat/Laplace equations 9 / 13

Uniqueness proof #1

• One uniqueness proof: suppose u = 0 on the boundary of theregion (so u could arise as the difference between twosolutions of the Dirichlet problem).

• Since ∇ · (u∇u) = u∇ · ∇u + (∇u) · (∇u), the divergencetheorem tells us:ˆˆ

R|∇u|2 dA =

˛∂R

u∇u · n ds −ˆˆ

Ru∇2u dA.

• But the right side is zero because u = 0 on ∂R (the boundaryof R) and because ∇2 = 0 throughout R.

• So we conclude u is constant, and thus zero since u = 0 onthe boundary.

D. DeTurck Math 241 002 2012C: Heat/Laplace equations 10 / 13

Uniqueness proof #1

• One uniqueness proof: suppose u = 0 on the boundary of theregion (so u could arise as the difference between twosolutions of the Dirichlet problem).

• Since ∇ · (u∇u) = u∇ · ∇u + (∇u) · (∇u), the divergencetheorem tells us:ˆˆ

R|∇u|2 dA =

˛∂R

u∇u · n ds −ˆˆ

Ru∇2u dA.

• But the right side is zero because u = 0 on ∂R (the boundaryof R) and because ∇2 = 0 throughout R.

• So we conclude u is constant, and thus zero since u = 0 onthe boundary.

D. DeTurck Math 241 002 2012C: Heat/Laplace equations 10 / 13

Uniqueness proof #1

• One uniqueness proof: suppose u = 0 on the boundary of theregion (so u could arise as the difference between twosolutions of the Dirichlet problem).

• Since ∇ · (u∇u) = u∇ · ∇u + (∇u) · (∇u), the divergencetheorem tells us:ˆˆ

R|∇u|2 dA =

˛∂R

u∇u · n ds −ˆˆ

Ru∇2u dA.

• But the right side is zero because u = 0 on ∂R (the boundaryof R) and because ∇2 = 0 throughout R.

• So we conclude u is constant, and thus zero since u = 0 onthe boundary.

D. DeTurck Math 241 002 2012C: Heat/Laplace equations 10 / 13

Uniqueness proof #1

• One uniqueness proof: suppose u = 0 on the boundary of theregion (so u could arise as the difference between twosolutions of the Dirichlet problem).

• Since ∇ · (u∇u) = u∇ · ∇u + (∇u) · (∇u), the divergencetheorem tells us:ˆˆ

R|∇u|2 dA =

˛∂R

u∇u · n ds −ˆˆ

Ru∇2u dA.

• But the right side is zero because u = 0 on ∂R (the boundaryof R) and because ∇2 = 0 throughout R.

• So we conclude u is constant, and thus zero since u = 0 onthe boundary.

D. DeTurck Math 241 002 2012C: Heat/Laplace equations 10 / 13

Case 1: R is a rectangle

• We’ll first solve the Dirichlet problem on a rectangle, say0 ≤ x ≤ L and 0 ≤ y ≤ M.

• Let’s see what we get by separation of variables: Letu(x , y) = X (x)Y (y), then X ′′Y + XY ′′ = 0, or

X ′′

X= −Y ′′

Y= λ

a constant because X””/X is a function of x alone and Y ′′/Yis a function of y alone.

• The boundary data might look like:

u(x , 0) = f (x), u(L, y) = g(y)

u(x ,M) = h(x), u(0, y) = k(y)

but that’s too much to deal with all at once.

D. DeTurck Math 241 002 2012C: Heat/Laplace equations 11 / 13

Case 1: R is a rectangle

• We’ll first solve the Dirichlet problem on a rectangle, say0 ≤ x ≤ L and 0 ≤ y ≤ M.

• Let’s see what we get by separation of variables: Letu(x , y) = X (x)Y (y), then X ′′Y + XY ′′ = 0, or

X ′′

X= −Y ′′

Y= λ

a constant because X””/X is a function of x alone and Y ′′/Yis a function of y alone.

• The boundary data might look like:

u(x , 0) = f (x), u(L, y) = g(y)

u(x ,M) = h(x), u(0, y) = k(y)

but that’s too much to deal with all at once.

D. DeTurck Math 241 002 2012C: Heat/Laplace equations 11 / 13

Case 1: R is a rectangle

• We’ll first solve the Dirichlet problem on a rectangle, say0 ≤ x ≤ L and 0 ≤ y ≤ M.

• Let’s see what we get by separation of variables: Letu(x , y) = X (x)Y (y), then X ′′Y + XY ′′ = 0, or

X ′′

X= −Y ′′

Y= λ

a constant because X””/X is a function of x alone and Y ′′/Yis a function of y alone.

• The boundary data might look like:

u(x , 0) = f (x), u(L, y) = g(y)

u(x ,M) = h(x), u(0, y) = k(y)

but that’s too much to deal with all at once.

D. DeTurck Math 241 002 2012C: Heat/Laplace equations 11 / 13

One side at a time

• You can add together four solutions to problems withboundary data like:

u(x , 0) = 0, u(L, y) = 0

u(x ,M) = 0, u(0, y) = k(y)

• Since u is zero for two values of y , we’ll use Y ′′ + α2Y = 0,so X ′′ − α2X = 0.

• This gives

Y = sin(nπy

M

)n = 1, 2, 3 . . .

and α = nπ/M.• A useful way to write the corresponding X solutions is

X = sinh(nπM

(L− x))

so that X (L) = 0.

D. DeTurck Math 241 002 2012C: Heat/Laplace equations 12 / 13

One side at a time

• You can add together four solutions to problems withboundary data like:

u(x , 0) = 0, u(L, y) = 0

u(x ,M) = 0, u(0, y) = k(y)

• Since u is zero for two values of y , we’ll use Y ′′ + α2Y = 0,so X ′′ − α2X = 0.

• This gives

Y = sin(nπy

M

)n = 1, 2, 3 . . .

and α = nπ/M.

• A useful way to write the corresponding X solutions is

X = sinh(nπM

(L− x))

so that X (L) = 0.

D. DeTurck Math 241 002 2012C: Heat/Laplace equations 12 / 13

One side at a time

• You can add together four solutions to problems withboundary data like:

u(x , 0) = 0, u(L, y) = 0

u(x ,M) = 0, u(0, y) = k(y)

• Since u is zero for two values of y , we’ll use Y ′′ + α2Y = 0,so X ′′ − α2X = 0.

• This gives

Y = sin(nπy

M

)n = 1, 2, 3 . . .

and α = nπ/M.• A useful way to write the corresponding X solutions is

X = sinh(nπM

(L− x))

so that X (L) = 0.

D. DeTurck Math 241 002 2012C: Heat/Laplace equations 12 / 13

Fourier series

• So we now have

u(x , y) =∞∑n=1

bn sinh(nπM

(L− x))

sin(nπy

M

).

• and we have to match:

u(0, y) = k(y) =∞∑n=1

bn sinh

(nπL

M

)sin(nπy

M

).

• Thus

bn =2

M sinh(nπLM

) ˆ M

0k(y) sin

(nπyM

)dy

D. DeTurck Math 241 002 2012C: Heat/Laplace equations 13 / 13

Fourier series

• So we now have

u(x , y) =∞∑n=1

bn sinh(nπM

(L− x))

sin(nπy

M

).

• and we have to match:

u(0, y) = k(y) =∞∑n=1

bn sinh

(nπL

M

)sin(nπy

M

).

• Thus

bn =2

M sinh(nπLM

) ˆ M

0k(y) sin

(nπyM

)dy

D. DeTurck Math 241 002 2012C: Heat/Laplace equations 13 / 13

Laplace on a disk

• Next up is to solve the Laplace equation on a disk withboundary values prescribed on the circle that bounds the disk.

• We’ll use polar coordinates for this, so a typical problemmight be:

∇2u =1

r

∂r

(r∂u

∂r

)+

1

r2∂2u

∂θ2= 0

on the disk of radius R = 3 centered at the origin, withboundary condition

u(3, θ) =

{1 0 ≤ θ ≤ πsin2 θ π < θ < 2π

D. DeTurck Math 241 002 2012C: Heat/Laplace equations 14 / 13