Math 121A: Homework 7 Solutions
Math 121A: Homework 7 Solutions
Math 121A: Homework 7 Solutions
1. (a) Since g( x ) is even, the terms bn in the Fourier series are zero. The nth cosine
term is
1 π
Z
an = (| x | − π )2 cos(nx )dx
π −π
2 π
Z
= ( x − π )2 cos(nx )dx
π 0 π
2 π sin(nx ) 2 2 sin( nx )
Z
= − 2( x − π ) dx + (x − π)
π 0 n π n 0
π
2 cos(nx ) 2 cos(nx )
Z π
= − 4 2
dx − 2( x − π )
π 0 n π n2 0
4 π 4π
= − [sin(nx )]0 +
π πn2
4
= 2
n
and the zeroth cosine term is
1 π
Z
a0 = (| x | − π )2 dx
π −π
2 π
Z
= ( x − π )2 dx
π 0
π
2 ( x − π )3
=
π 3 0
2π 3 2π 2
= = .
π 3 3
and hence ∞
π2 4 cos(nx )
g( x ) = +∑ .
3 n =1
n2
1
The case of C < 0 can be considered by defining C = −λ2 for λ > 0. It can be
seen that
X 00 + λ2 X = 0
and hence
X ( x ) = D cos λx + E sin λx.
The derivative is
X 0 ( x ) = − Dλ sin λx + Eλ cos λx.
The boundary conditions imply that
T 00
2
= − n2 .
c T
Therefore T (t) = A cos nct + B sin nct. If D = 0 and E 6= 0 then the boundary
conditions will be satisfied if λ = (n + 1/2). The corresponding time dependent
solution will be T (t) = A cos(n + 1/2)ct + B sin(n + 1/2)ct.
(c) In part (a), the initial condition was written as a sum of terms of the form
cos(nx ), plus a constant term—these are the spatial parts of separable solutions.
Since f t is initially zero, it follows that the solution for all times is a sum of
separable solutions,
∞
π2 4 cos(nx ) cos(nct)
f ( x, t) = +∑ 2
.
3 n =1
n
2
The derivative of this expression is
Z π
0 1d 2 2 2
E (t) = ( f t + c f x )dx
2 dt −π
1 π ∂ 2
Z
= ( f + c2 f x2 )dx
2 −π ∂t t
1 π
Z
= (2 f t f tt + 2c2 f xt f x )dx
2 −π
Z π Z π
= f t f tt dx + c2 f xt f x dx
Z−ππ Z−ππ
= f t f tt dx − c2 f t f xx dx + [ f t f x ]π
−π
Z−ππ −π
2
= f t ( f tt − c f xx )dx
Z−ππ
= 0 dx
−π
= 0
and hence
1 π 2 2
Z
P (0) = c f x dx
2 Z−π
π
= c2 4( x − π )2 dx
0
4c2 π 3
= .
3
(f) The time derivative of the series solution is
∞
4c cos(nx ) sin(nct)
f t ( x, t) = − ∑ n
n =1
3
By orthogonality relations, all integrals involving cos(nx ) cos(mx ) for m 6= n
will vanish and hence
Z π ∞
cos2 (nx ) sin2 (nct)
K (t) = 8c 2
∑
− π n =1 n2
dx
∞ 2
sin (nct)
= 8c2 π ∑ n2
.
n =1
4
t=0
10 t = 0.05π/c, . . . , 0.95π/c
t = π/c
8
f ( x, t)
0
−π −π/2 0 π/2 π
x
5
(b) The Fourier transform is
1 π Z
g̃(α) = (sin x )e−ixα dx
2π Z0
1 π
= (eix(1−α) − e−ix(1+α) )dx
4πi "0 # π
1 eix(1−α) e−ix(1+α)
= +
4πi i (1 − α) i (1 + α )
0
1 −1 − eiαπ −1 − eiαπ
= +
4πi i (1 − α) i (1 − α )
1 + e−iπα
= .
2π (1 − α2 )
h( x ) = g( x ) − g(− x ).
6
15 n = 10
n = 20
10 n = 30
5
Im(q̃n (α))
-5
-10
-15
-2 -1.5 -1 -0.5 0 0.5 1 1.5 2
x
Figure 2: Fourier transforms of several of the truncated sine functions qn ( x ) that are
considered in question 2.
and hence
n −1
q̃n (α) = (−1)n−1 ∑ e−i(2k−(n−1))πα h̃(α)
k =0
n −1
= (−1) n −1
h̃(α)e −iπ (n−1)α
∑ e2kiπα
k =0
2niπα
−iπ (n−1)α 1 − e
i sin(πα)
= (−1)n−1 e
π ( α2 − 1) 1 − e2iπα
−niπα
− eniπα
i sin(πα) e
= (−1)n
π (1 − α2 ) e−iπα − eiπα
i sin(πα) sin(nπα)
= (−1)n
π (1 − α2 ) sin(πα)
i (−1)n sin(nπα)
= .
π (1 − α2 )
Plots of q̃n (α) for n = 10, 20, 30 are shown in Fig. 2. It can be seen that there are
two sharp peaks in q̃n (α) at α = ±1, which grow in size as n increases. This
should be expected, since in the limit as n tends to infinity, qn ( x ) becomes equal
to sin(nx ) = 2i1 (eix − e−ix ). Since the Fourier transform of eikx can be thought
7
of as δ(α − k ), it should be expected that the limit of q̃n (α) is
1 i
(δ(α − 1) − δ(α + 1)) = (δ(α + 1) − δ(α − 1))
2i 2
which matches the peaks seen in the graph.
3. If the rate of change of the temperature of the tea is given by λ multiplied by the
difference between the tea’s temperature and Tr , then the temperature T (t) will
follow the differential equation
dT
= λ( Tr − T ).
dt
To solve this equation, it can be separated according to
dT
= −λdt
T − Tr
and hence
log( T − Tr ) = −λt + C
for some constant C. Therefore if T (0) = T0 the temperature evolves according to
T (t) = Tr + ( T0 − Tr )e−λt .
Now consider the first scenario where the milk is added initially. The initial tem-
perature will be given by the weighted average of the temperatures of the tea and
milk,
◦ ◦
Tt Vt + Tm Vm (95 C)200 + (5 C)50 ◦
T0 = = = 77 C.
Vt + Vm 250
The temperature then evolves according to
◦
T (t) = (20 + 57e−λt ) C
and thus after twenty minutes it will be
◦ ◦
T (20 min) = (20 + 57e−4 log(2) ) C = 23.56 C.
◦
In the second scenario, the initial temperature is 95 C and it evolves according to
◦
T (t) = (20 + 75e−λt ) C
so after twenty minutes it will be
◦ ◦
T (20 min) = (20 + 75e−4 log(2) ) C = 24.69 C.
After the milk is added, the temperature is then
◦ ◦
(24.69 C)200 + (5 C)50 ◦
= 20.75 C
250
Hence the tea is hotter under the first scenario.
8
4. Consider a function y( x ). If y2 = r2 − x2 , then yy0 = rr 0 − x. Multiplying the given
differential by y gives
y2 y02 + 2xyy0 − y2 = 0
and substituting the expressions for r gives
and hence
r2 r 02 − r2 = 0.
Assuming that r > 0 gives
r 0 = ±1, r(x) = ±x + C
and hence q p
y( x ) = (± x + C )2 − x2 = C2 ± 2xC.
y dy
tan(2θ ) = , tan θ =
x dx
and by using the trigonometric identity
2 tan θ
tan(2θ ) =
1 − tan2 θ
it follows that
y 2y0
= .
x 1 − y 02
Thus
(1 − y02 )y = 2y0 x
and hence
y02 y + 2xy0 − y = 0
This is the equation that was considered in the previous question, and hence
p
y( x ) = C2 ± 2xC,
which is a parabola.