Math 241 Sample Final Exam #2 Fall 2012

Math 241 Sample Final Exam #2
Fall 2012
1. Derive the heat equation for a rod assuming the thermal conductivity K0 (x) is a non-constant function
of x, 0 < x < L. Assume all other thermal properties are constant, and that the cross-sectional area
is also constant. There is no heat source.
Solution: The differential form of conservation of energy gives:
c(x)ρ(x)
∂φ
∂u
=−
∂t
∂x
where there is no heat source, and c(x) = c, ρ(x) = ρ are constants. By Fourier’s law, φ(x) =
−K0 (x) ∂u
∂x . Plug in the above equation,
cρ
∂u
dK0 (x) ∂u
∂2u
=
+ K0 (x) 2
∂t
dx ∂x
∂x
2
∂ u
2. Consider the heat equation with source ∂u
∂t = 5 ∂x2 + 3x in a rod 0 < x < π. Assume cρ = 1, K0 = 5,
and the cross-section area A = 1. The initial condition is u(x, 0) = sin 3x, and the boundary condition
∂u
−t
is ∂u
∂x (0, t) = b, ∂x (π, t) = e . Denote the total heat energy in the rod by J(t).
(a) What is the function
dJ(t)
dt ?
(Hint: you do not have to solve for u(x, t) first.)
(b) Using part (a), what is J(t)?
(c) For which value of b does the limit limt→+∞ J(t) exist, and what is this limit?
Solution: (a) The total heat energy is
Z
J(t) = cρ
π
udx
0
J 0 (t) = cρ
Z
π
0
∂u
dx =
∂t
Z
0
π
∂u
dx
∂t
where cρ = 1. By the heat equation
∂u
∂2u
= 5 2 + 3x
∂t
∂x
Therefore
∂u 3x2 x=π
3π 2
+
)|x=0 = 5e−t − 5b +
∂x
2
2
Remark: Other solution: by conservation of energy,
Z π
J 0 (t) = heatgen + heattransf er =
Qdx + φ(0) − φ(π)
J 0 (t) = (5
0
Z
=
0
π
∂u
∂u
3π 2
3xdx − K0 (0) + K0 (π) = 5e−t − 5b +
∂x
∂x
2
1
Solution: (continued) (b)
t
Z
J 0 (τ )dτ =
J(t) = J(0) +
π
Z
Z
sin 3xdx +
(5e−τ − 5b +
0
0
0
t
3π 2
)dτ
2
2
3π 2
3π 2
17
= +(
− 5b)t − 5(e−t − 1) =
+(
− 5b)t − 5e−t
3
2
3
2
(c) When b =
3π 2
10
the limit exists, and limt→∞ J(t) =
2
17
3 .
2
3. Solve the Laplace equation ∂∂xu2 + ∂∂yu2 = 0 in the region 0 < x < 3, 0 < y < 5 with boundary conditions
∂u
∂u
∂x (0, y) = 0, ∂x (3, y) = 0, u(x, 0) = 1 + cos 3πx, u(x, 5) = 0.
Solution: The homogeneous condition on the x-direction suggests that when separating the variables, Xn (x) = cos nπx
3 .
Correspondingly, Yn (y) = sinh nπ(5−y)
.
3
When n = 0, X0 = 1, Y0 (y) = 5 − y.
u(x, y) = c(5 − y) +
X
n=1
An cos
nπ(5 − y)
nπx
sinh
3
3
When y = 0,
5c +
X
An cos
n=1
Thus c = 15 , Ai = 0 for i 6= 9. A9 =
u(x, y) =
nπx
5nπ
sinh
= 1 + cos 3πx
3
3
1
sinh 15π
(5 − y)
1
+
cos 3πx sinh 3π(5 − y)
5
sinh 15π
4. Consider the following PDE on the rectangle 1 ≤ x ≤ e, 0 ≤ y ≤ 1:
x2
∂2u ∂2u
+ 2 = 0.
∂x2
∂y
(By e here we mean Euler’s constant 2.7818 . . .) Give a formula for the solution of this PDE which
satisfies u = 1 on the side x = e and u = 0 on all remaining sides.
Solution: We use separation of variables: u = f (x)g(y). The equations we get are g 00 (y) = −λg(y)
and x2 f 00 (x) = λf (x). The solutions we get for g(y) are sin nπy for n = 1, 2, . . . , with corresponding
λn = n2 π 2 . The equation for f is a Cauchy-Euler equation, the general solution of √
which will be
Axa + Bxb when a and b are the two distinct roots of z(z − 1) = n2 π 2 , i.e., z = 21 (1 ± 1 + 4n2 π 2 ).
We should impose the condition that f (x) = 0 when x = 1, which gives us the series solution
u(x, y) =
∞
X
√
√
1− 1+4n2 π 2
1+ 1+4n2 π 2
2
2
An x
−x
sin nπy.
n=1
2
Solution: (continued) Now we plug in x = e and equate the series term-by-term to the sine series
for the constant function u = 1. We conclude
√
u(x, y) =
∞
X
n=1
where
Z
Cn = 2
0
1
Cn
x
e
1+
√
1+
√
1+4n2 π 2
2
−x
1+4n2 π 2
2
−e
1−
√
1−
1+4n2 π 2
2
1+4n2 π 2
2
sin nπy
1
2
2(1 − (−1)n )
sin nπy dy = −
=
cos nπy .
nπ
nπ
y=0
5. Consider the function
f (x) =
−1 − x,
1 − x,
x<0
x>0
on the interval −1 ≤ x ≤ 1.
(a) Sketch a graph of the Fourier sine series, the Fourier cosine series, and the complete Fourier series
of f (x). (For the sine and cosine series, restrict f to the interval 0 ≤ x ≤ 1.) Sketch all graphs on
the interval −3 ≤ x ≤ 3. Be sure to mark any points of discontinuity.
(b) Compute the Fourier sine series, the Fourier cosine series, and the complete Fourier series of f .
Simplify the coefficients until they no longer involve trigonometric functions.
Solution:
(a) The Fourier series and the Fourier sine series are the same:
The Fourier cosine series is
3
Solution: (continued)
(b) For the Fourier sine series and complete Fourier series, f ∼
=
n=1
An sin nπx with
1
Z
An
P∞
(1 − x) sin nπxdx
2
0
Z
1
Z
1
sin nπxdx − 2
x sin nπxdx
0
0
"
#
1
1 Z 1
x
1
cos nπx −2 −
= −2
cos nπx +
cos nπxdx
nπ 0
nπ
0 nπ
0
"
1 #
2
1
1
n
n
sin nπx
= −
[(−1) − 1] − 2 − (−1) +
2
nπ
nπ
(nπ)
0
=
=
=
2
2
2
2
−
(−1)n +
(−1)n
nπ nπ
nπ
2
,
nπ
so that
f (x) ∼
For the Fourier cosine series, f (x) ∼
Z
P∞
∞
X
2
sin nπx.
nπ
n=1
n=0
An cos nπx with
1
(1 − x)dx = x −
A0 =
0
1
x2 1
= ,
0
2
2
and
1
Z
An
=
(1 − x) cos nπxdx
2
0
Z
=
1
Z
cos nπxdx −
2
0
1
x cos nπxdx
0
1
1
Z 1
1
sin nπx x
+2
= 2
−
2
sin
nπx
sin nπxdx
nπ 0
nπ
0 nπ
0
1
1
= 2·−
cos nπx
(nπ)2
0
1
1 − (−1)n
n
= 2·−
[(−1)
−
1]
=
2
·
.
(nπ)2
(nπ)2
Thus,
f∼
∞
X
1
1 − (−1)n
+2
cos nπx.
2
(nπ)2
n=1
4
6. Consider the function f (x) = x2 (1 − x)2 on the interval [0, 1]. How many times is term-by-term
differentiation valid for the Fourier sine series of f (x) on [−1, 1]? How about the Fourier cosine series?
Justify your answer.
Solution: First, compute f and its derivatives:
=
x2 (1 − x)2 = x4 − 2x3 + x2
f (x)
=
4x3 − 6x2 + 2x
f 00 (x)
=
12x2 − 12x + 2
f 000 (x)
=
24x − 12
f (x)
0
f and its derivatives are all smooth, so the only concern in differentiating the series is when we
differentiate a sine series: here, we must check that the function is 0 at x = 0 and x = 1.
For the Fourier sine series, since f (0) = f (1) = 0, we can differentiate once. Then, we can
differentiate again because it is a cosine series. To differentiate again, we would need f 00 (0) =
f 00 (1) = 0, but f 00 (0) = 2, so we can only differentiate the sine series term-by-term twice.
For the Fourier cosine series, we can differentiate once to get a sine series. Since f 0 (0) = f 0 (1) = 0,
we can differentiate the sine series to get a cosine series. Then, we can differentiate again because it
is a cosine series. However, since f 000 (0) 6= 0, we cannot differentiate again. So, we can differentiate
the cosine series term-by-term three times.
7. Define the energy of a vibrating string on the interval 0 ≤ x ≤ L to be
Z L 2
Z L 2 2
1 ∂u
∂u
c
E(t) =
dx +
dx,
∂t
2 ∂x
0 2
0
dE
dt
(a) Derive the conservation of energy formula,
(b) How does E(t) change over time if
∂u
∂x (0, t)
=
∂2u
∂t2
2
= c2 ∂∂xu2 .
∂u L
= c2 ∂u
∂x ∂t 0 .
where c2 = T0 /ρ0 is the constant in the wave equation,
∂u
∂x (L, t)
= 0?
(c) How does E(t) change over time if u(0, t) = u(L, t) = 0? (Hint: consider the general solution to
the wave equation in this case.)
Solution: (a)
∂E
∂t
=
=
=
=
=
=
"Z
2
Z L 2 2 #
L
∂
1 ∂u
c
∂u
dx +
dx
∂t 0 2 ∂t
2
∂x
0
2
2
Z L
Z L 2
1 ∂ ∂u
c ∂ ∂u
dx +
dx
∂t
2 ∂t ∂x
0 2 ∂t
0
Z L
∂u ∂ 2 u
1 ∂u ∂ 2 u c2
·2
· 2 +
·2
dx
2
∂t ∂t
2
∂x ∂x∂t
0
Z L
2
2
2 ∂u ∂ u
2 ∂u ∂u
+c
dx
c
∂t ∂x2
∂x ∂x∂t
0
(by using the wave equation)
Z L
∂ ∂u ∂u
c2
dx
∂x ∂x ∂t
0
L
2 ∂u ∂u c
.
∂x ∂t 0
5
Solution: (continued)
(b) In this case,
dE
dt
∂u t
= c2 ∂u
∂x ∂t 0 = 0, so that E(t) is constant.
(c) Consider the general solution to the wave equation,
u(x, t)
∞
X
cnπt
L
L
n=1
∞
cnπx X
cnπt
+
sin
Bn sin
.
L
L
n=1
=
An sin
cnπx cos
Notice that du
dt = 0 at both x = 0 and x = L, because the spatial sine terms are unchanged
by taking a time derivative. Therefore, dE
dt = 0, and E is a constant here again.
8. Consider the following PDE on the rectangle 1 ≤ x ≤ e, 0 ≤ y ≤ 1:
x2
∂2u ∂2u
+ 2 = 0.
∂x2
∂y
(By e here we mean Euler’s constant 2.7818 . . .) Give a formula for the solution of this PDE which
1
satisfies u = x 2 sin(2π ln x) on the side y = 0 and u = 0 on all remaining sides.
Solution: Because the boundary data depends on x, in this problem we should separate variables
and solve the following Sturm-Liouville problem in x:
x2 f 00 (x) = −λf (x).
This is a regular Sturm-Liouville problem, so we know it suffices to take λ real. This is
√ a CauchyEuler equation; the indicial equation is p(p − 1) = −λ, which has solutions p = (1 ± 1 − 4λ)/2.
Assuming that λ > 14 , we conclude that the function f will have the form
1
Ax 2 +i
√
λ− 14
1
+ Bx 2 −i
√
λ− 41
We can find a function of this form which vanishes at both ends of the interval [1, e] when A+B = 0
and
√ 1
√ 1
ei λ− 4 − e−i λ− 4 = 0.
q
This can occur when 2πn = 2 λ − 14 , or λ = 14 + n2 π 2 . Comparing to our initial data, we need
only consider the case n = 2, in which case we have
1
f (x) = x 2 sin(2π ln x)
as an eigenfunction of our Sturm-Liouville problem with λ = 4π 2 + 14 . If u = f (x)g(y), then
g 00 (y) = λg(y) with g(e) = 0, g(0) = 1. We can solve this in our case by
g(y) =
Our final answer:
sinh(4π 2 + 41 )(e − y)
.
sinh(4π 2 + 14 )e
1
u(x, y) =
x 2 sin(2π ln x) sinh(4π 2 + 41 )(e − y)
.
sinh(4π 2 + 14 )e
6
9. Solve the initial-boundary value problem for the heat equation:
ut = 4uxx ,
where u(x, 0) = 3 cos
0 < x < 1,
t>0
5πx
, ux (0, t) = 0, u(1, t) = 1.
2
(Hint: What is the equilibrium solution?)
Solution: The equilibrium solution ueq (x) satisfies u00eq = 0 so ueq is linear, as well as u0eq (0) = 0
(so ueq is constant) and ueq (1) = 1. So ueq (x) = 1 for all x.
Therefore, let
u(x, t) = 1 + v(x, t)
and then v will satisfy
vt = 4vxx ,
v(x, 0) = 3 cos
5πx
2
− 1,
vx (0, t) = 0,
v(1, t) = 0.
The x-eigenvalue problem is
X 00 + λX = 0,
X 0 (0) = 0 X(1) = 0
so the eigenfunctions are
X(t) = cos
(2n + 1)πx
2
and the corresponding eigenvalues are λ = (2n + 1)2 π 2 /4 for n = 0, 1, 2, . . .. So
v(x, t) =
∞
X
an e
−(2n+1)2 π 2 t
cos
n=0
(2n + 1)πx
2
,
where, except for n = 2,
Z
an = −2
1
cos
0
(2n + 1)πx
2
−4
dx =
sin
2n + 1
and
a2 = 3 +
1
(2n + 1)πx 4
= (−1)n+1
2
(2n + 1)π
0
19
4
=
.
5
5
Altogether, we have
u(x, t) = 1 + 3e
−25π 2 t
cos
5πx
2
+
∞
X
(−1)
n=0
7
n+1
2 2
4
e−(2n+1) π t cos
(2n + 1)π
(2n + 1)πx
2
.
10. Use the Fourier transform (in x) to solve the initial-value problem for the first-order equation
ut = 3ux
u(x, 0) = f (x).
Solution: Take the Fourier transform of the equation and the data to get
F [u]t = −3iωF [u]
F [u] (ω, 0) = F [f ] (ω).
The solution of this ordinary differential equation for F [u] as a function of t is
F [u] (ω, t) = F [f ] (ω)e−3iωt .
Now take the inverse Fourier transform of both sides and use the shifting formula F −1 [f (x − a)] =
eiaω F [f ] (ω) to get
u(x, t) = F −1 e−3itω F [f ] (ω) = f (x + 3t).
11. Define Ca (x) =
π(x2
a
.
+ a2 )
Z
∞
(a) If a > 0, show that Ca (x) is a probability density function (that is, it is positive and
Ca (x) dx = 1).
−∞
Ca (x) is called a Cauchy distribution.
(Hint: You can use the Fourier transform to do this because e0 = 1)
(b) The probability density function (pdf) of the sum of two random variables is the convolution of
the pdfs of the two random variables. If A is a random variable with pdf Ca (x) and B is a random
variable with pdf Cb (x) for a > 0 and b > 0, calculate the pdf of the random variable A + B. (Again,
using the Fourier transform will help avoid doing unpleasant integrals.)
Solution: (a) We know that F −1
1
e−a|ω|
. So
=
2
2
a +x
2a
F [Ca ] (ω) = F −1
Also,
F [Ca ] (0) =
So
Z
1
2π
Z
1
a
e−a|ω|
.
=
2
2
π a +x
2π
∞
Ca (x)ei0x dx =
−∞
1
2π
Z
∞
Ca (x) dx.
−∞
∞
Ca (x) dx = 2πF [Ca ] (0) = 1
−∞
and Ca (x) is clearly positive for all x provided a > 0, so Ca (x) is a pdf.
(b) The pdf of A + B is
−(a+b)|ω| e−a|ω| e−b|ω|
e
Ca ∗ Cb = F −1 [2π F [Ca ] F [Cb ]] = F −1 2π
= F −1
= Ca+b (x).
2π
2π
2π
8