Math 121A: Homework 7 Solutions

Download as pdf or txt
Download as pdf or txt
You are on page 1of 9

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

(b) If f ( x, t) = X ( x ) T (t) then


T 00 X = c2 X 00 T
and hence
T 00 X 00
= =C
c2 T X
for some constant C. Solutions for X that will satisfy the boundary conditions
will have C ≤ 0. First consider the case when C = 0. This gives X 00 = 0 and
hence X ( x ) = αx + β; in order to satisfy the boundary conditions, it must be
that X ( x ) = β. The corresponding time dependent problem is T 00 = 0 and
hence T (t) = γt + η.

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

0 = X 0 (π ) = − Dλ sin λπ + Eλ cos λπ,

0 = X 0 (−π ) = − Dλ sin λπ + Eλ cos λπ.


There are two families of solutions. If E = 0 and D 6= 0 then the boundary
conditions will be satisfied if λ = n where n is a positive integer. Thus X ( x ) =
cos(nx ), and the corresponding time-dependent problem, given by C = −n2 , is

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

(d) The energy of the system can be written as


1
Z π
E(t) = ( f t2 + c2 f x2 )dx.
2 −π

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 the total energy is constant.


(e) Since f t is initially zero, it follows that K (0) = 0. For x > 0,

∂ f
= 2( x − π )
∂x t=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

and hence the kinetic energy is


1
Z π
K (t) = f t2 dx
2 −π
!2

1 π 4c cos(nx ) sin(nct)
Z
=
2 −π
∑ n
dx.
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

The spatial derivative of the series solution is



4 sin(nx ) cos(nct)
f x ( x, t) = − ∑ n
n =1

and hence the potential energy is


1
Z π
P(t) = c2 f x2 dx
2 −π
!2

c2 π 4 sin(nx ) cos(nct)
Z
=
2 −π
∑ n
dx
n =1
Z π ∞
sin2 (nx ) cos2 (nct)
= 8c 2

− π n =1 n2

cos2 (nct)
= 8c2 π ∑ n2
.
n =1

Hence, using the relation ∑∞


n =1 n
−2 = π 2 /6,

E(t) = K (t) + P(t)



cos2 (nct) + sin2 (nct)
= 8c2 π ∑
n =1
n2

1
= 8c2 π
n2 ∑
n =1
 2
π
= 8c2 π
6
2
4c π 3
= ,
3
which is constant in time, and matches the calcaultion in part (e).
(g) Plots of f ( x, t) are shown over the range from t = 0 to t = π/c in Fig. 1. After
t = π/c, the waves reverse, and follow the same sequence of curves back to the
initial condition, at time t = 2π/c.

4
t=0
10 t = 0.05π/c, . . . , 0.95π/c
t = π/c

8
f ( x, t)

0
−π −π/2 0 π/2 π
x

Figure 1: Time evolution of the function f ( x, t) considered in question 1.

2. (a) The Fourier transform is given by


1 ∞
Z
f˜(α) = f ( x )e−ixα dx
2π −∞
1
Z π/2
= (cos x )e−ixα dx
2π −π/2
1
Z π/2
= (eix + e−ix )e−ixα dx
4π −π/2
1
Z π/2
= (eix(1−α) + e−ix(1+α) )dx
4π −π/2
" #π/2
1 eix(1−α) e−ix(1+α)
= −
4π i (1 − α) i (1 + α )
" −π/2 #
1 ie − iπα/2 ie − iπα/2 ieiπα/2 ie−iπα/2
= + + +
4π i (1 − α) i (1 + α) i (1 − α) i (1 + α)
"  #
1 cos πα 2 cos πα
2
= +
2π 1−α 1+α

cos πα2
= .
π (1 − α2 )

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 )

(c) g̃ can be alternatively written as

e−iπα/2 (eiπα/2 + e−iπα/2 ) e−iπα/2 cos πα



2
g̃(α) = =
2π (1 − α2 ) π (1 − α2 )
and hence
f˜(α)
= eiπα/2 .
g̃(α)
This should be expected. Since cos x = sin( x + π/2), it can be seen that f ( x ) =
g( x + π/2) and by basic properties of Fourier transforms, f˜(α) = eiαπ/2 g̃(α).
(d) To calculate the Fourier transform of h, first note that

h( x ) = g( x ) − g(− x ).

The Fourier transform of − g(− x ) is − g̃(−α), and hence

h̃(α) = g̃(α) − g̃(−α)


1 + e−iπα 1 + eiπα
= −
2(1 − α2 ) 2(1 − (−α)2 )
e−iπα − e−iπα
=
2(1 − α2 )
i sin(πα)
= .
π ( α2 − 1)

(e) The function qn ( x ) can be written as


n −1
qn ( x ) = (−1)n−1 ∑ h(x − (2k − (n − 1))π )
k =0

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

(rr 0 − x )2 + 2x (rr 0 − x ) − (r2 − x2 ) = 0.

Expanding terms gives

r2 r 02 − 2xrr 0 + x2 + 2xrr 0 − 2x2 − r2 + x2 = 0

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.

5. For the system considered,

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.

You might also like