Math 201 Assignment #11
Problem 1 (10.5 2) Find a formal solution to the given initial-boundary value problem.
∂u
∂t=
∂2u
∂x2, 0 < x < π, t > 0
u(0, t) = u(π, t) = 0, t > 0
u(x, 0) = x2, 0 < x < π
Problem 2 (10.5 5) Find a formal solution to the given initial-boundary value problem.
∂u
∂t=
∂2u
∂x2, 0 < x < π, t > 0
∂u
∂x(0, t) =
∂u
∂x(π, t) = 0, t > 0
u(x, 0) = ex, 0 < x < 1
Problem 3 (10.5 8) Find a formal solution to the given initial-boundary value problem.
∂u
∂t=
∂2u
∂x2, 0 < x < π, t > 0
u(0, t) = 0, u(π, t) = 3π, t > 0
u(x, 0) = 0, 0 < x < π
Problem 4 (10.5 10) Find a formal solution to the given initial-boundary value problem.
∂u
∂t= 3
∂2u
∂x2+ x, 0 < x < π, t > 0
u(0, t) = u(π, t) = 0, t > 0
u(x, 0) = sin(x), 0 < x < π
Problem 5 (10.5 14) Find a formal solution to the given initial-boundary value problem.
∂u
∂t= 3
∂2u
∂x2+ 5, 0 < x < π, t > 0
u(0, t) = u(π, t) = 1, t > 0
u(x, 0) = 1, 0 < x < π
1
Problem 6 (10.6 2) Find a formal solution.
∂2u
∂t2= 16
∂2u
∂x2, 0 < x < π, t > 0
u (0, t) = u (π, t) = 0, t > 0
u (x, 0) = sin2x, 0 < x < 1
∂u
∂t(x, 0) = 1 − cos x, 0 < x < π.
(Ans.P
∞
n=1 [an cos (4nt) + bn sin (4nt)] sin (nx),
an =
(
−8π
1
n(n2−4)
n odd
0 n even, bn =
(
1πn2 n odd−
1
π(n2−1)
n even .
Problem 7 (10.6 8) Find a formal solution.
∂2u
∂t2=
∂2u
∂x2+ x sin t, 0 < x < π, t > 0.
u (0, t) = u (π, t) = 0, t > 0
u (x, 0) = 0, 0 < x < π,
∂u
∂t(x, 0) = 0, 0 < x < π.
(Ans. [sin t − t cos t] sin x +P
∞
n=22(−1)n
n2(n2−1)
[sin (nt) − n sin t] sin (nx) .)
Problem 8 (10.6 10) Derive a formal formula for the solution.
∂2u
∂t2= α
2 ∂2u
∂x2, 0 < x < L, t > 0
u (0, t) = U1 u (L, t) = U2, t > 0
u (x, 0) = f (x) , 0 < x < L,
∂u
∂t(x, 0) = g (x) , 0 < x < L,
where U1, U2 are constants. (Ans.
u (x, t) = U1 +U2 − U1
Lx +
∞X
n=1
»
an cos
„
nπαt
L
«
+ bn sin
„
nπαt
L
«–
sin“
nπx
L
”
an =2
L
Z
L
0
f (x) −
»
U1 +U2 − U1
Lx
–ff
sin“
nπx
L
”
dx,
bn =2
nπα
Z
L
0
g (x) sin“
nπx
L
”
dx.
2
Problem 9 (10.6 14) Consider
∂2u
∂t2= α
2 ∂2u
∂x2, −∞ < x < ∞, t > 0
u (x, 0) = f (x) , −∞ < x < ∞
∂u
∂t(x, 0) = g (x) , −∞ < x < ∞
with f (x) = x2, g (x) = 0. (Ans. x2 + α2t2)
Problem 10 (10.6 16) Same as above, but with f (x) = sin 3x, g (x) = 1.(Ans. sin (3x) cos (3αt) + t.)
3
Solution 1. (10.5 2) Using separation of variables, assume
u(x, t) = X(x)T (t)
then
∂u
∂t= X(x)T ′(t)
∂2u
∂x2= X ′′(x)T (t)
Substituting back into the PDE we have
X(x)T ′(t) = X ′′(x)T (t)
⇒ T ′(t)
T (t)=
X ′′(x)
X(x)= K, K constant
⇒{
X ′′(x) − KX(x) = 0T ′(t) − KT (t) = 0
Consider the boundary conditions
u(0, t) = u(π, t) = 0
thenX(0)T (t) = X(π)T (t) = 0
so either T (t) = 0, the trivial solution, or
X(0) = X(π) = 0
Solving the boundary value problem
X ′′(x) − KX(x) = 0, X(0) = X(π) = 0
this is second order linear homogeneous equation with auxiliary equation r2−K = 0 We investigatethree possible cases for K.
Case 1: K > 0 ⇒ r = ±√
K, real and distinct roots.This has the general solution
X(x) = c1e√
Kx + c2e−√
Kx
Using the boundary conditions:
X(0) = c1 + c2 = 0 ⇒ c2 = −c1
X(π) = c1e√
Kπ − c1e−√
Kπ = c1e−√
Kπ(
e2√
Kπ − 1)
= 0
Since K > 0, we must have c1 = 0, which is the trivial solution.
4
Case 2: K = 0 ⇒ r = 0, double root.This has the general solution
X(x) = c1 + c2x
Using the boundary conditions:X(0) = c1 = 0
X(π) = c2π = 0 ⇒ c2 = 0
This case also gives us the trivial solution.
Case 3: K < 0 ⇒ r = ±√−Ki, complex roots.
This has the general solution
X(x) = c1 cos(√−Kx) + c2 sin(
√−Kx)
Using the boundary conditions:X(0) = c1 = 0
X(π) = c2 sin(√−Kπ) = 0
Either c2 = 0 (the trivial solution) or
sin(√−Kπ) = 0
⇒√−Kπ = nπ
⇒ K = −n2, n = 1, 2, . . .
These eigenvalues have the corresponding eigenfunctions
Xn(x) = cn sin(nx)
Using the eigenvalues in the equation for T (t):
T ′(t) − KT (t) = 0
⇒ T ′(t) + n2T (t) = 0
⇒ Tn(t) = ane−n2t
Putting the equations for X(x) and T (t) together and combining the constants, we have
un(x, t) = Xn(x)Tn(t) = bn sin(nx)e−n2t
Since un(x, t) is a solution to the PDE for any value of n, we take the infinite series
u(x, t) =
∞∑
n=1
bn sin(nx)e−n2t
From the general solution and initial condition, we have
u(x, 0) =∞∑
n=1
bn sin(nx)
= x2
5
which means we can choose the bn’s as the coefficients in the Fourier sine series for f(x) = x2:
bn =2
π
∫ π
0
x2 sin(nx)dx
=2
π
[−n2x2 cos(nx) + 2 cos(nx) + 2nx sin(nx)
n3
]π
0
=2
πn3
(
(2 − n2π2)(−1)n − 2)
Thus the formal solution to the given initial-boundary value problem is
u(x, t) =2
π
∞∑
n=1
1
n3
(
(2 − n2π2)(−1)n − 2)
sin(nx)e−n2t
6
Solution 2. (10.5 5) Following a similar argument as for 10.5 2, we use separation of variablesand the boundary conditions to arrive at the system of ODEs:
{
X ′′(x) − KX(x) = 0, X ′(0) = X ′(π) = 0T ′(t) − KT (t) = 0
Consider the boundary value problem:
X ′′(x) − KX(x) = 0, X ′(0) = X ′(π) = 0
This has the auxiliary equationr2 − K = 0
Again we consider three cases as above.
Case 1: K > 0Using a similar argument as in 10.5 2, the only solution in this case is the trivial solution.
Case 2: K = 0Here
X(x) = c0 + c1x ⇒ X ′(x) = c1
Using the boundary conditions:X ′(0) = c1 = 0
and c0 is arbitrary. So here we have the nontrivial solution
X(x) = c0
Case 3: K < 0In this case the general solution is
X(x) = c1 cos(√−Kx) + c2 sin(
√−Kx)
⇒ X ′(x) = −c1
√−K sin(
√−Kx) + c2
√−K cos(
√−Kx)
Using the boundary conditions:X ′(0) = c2 = 0
X ′(π) = −c1
√−K sin(
√−Kπ) = 0
Either c1 = 0 (trivial solution) or
sin(√−Kπ) = 0
⇒ K = −n2
These eigenvalues have the corresponding eigenfunctions
Xn(x) = cn cos(nx)
Combining cases 2 and 3, we have the eigenvalues and eigenfunctions
K = −n2
Xn(x) = cn cos(nx)
7
for n = 0, 1, 2, . . .
Returning to the equation for T (t):
T ′(t) − KT (t) = 0
⇒ T ′(t) + n2T (t) = 0
⇒ Tn(t) = ane−n2t
Putting the equations for X(x) and T (t) together and merging the constants, we have
un(x, t) = an cos(nx)e−n2t, n = 0, 1, 2, . . .
Taking the infinite series of these solutions, we have
u(x, t) =a0
2+
∞∑
n=1
an cos(nx)e−n2t
From the general solution and the initial condition, we have
u(x, 0) =a0
2+
∞∑
n=1
an cos(nx)
= ex
which means we can choose the an’s as the coefficients in the Fourier cosine series for f(x) = ex:
a0 =2
π
∫ π
0
exdx =2
π(eπ − 1)
an =2
π
∫ π
0
ex cos(nx)dx
=2
π
(
eπ(−1)n − 1
n2 + 1
)
Thus the formal solution to the given initial-boundary value problem is
u(x, t) =1
π(eπ − 1) +
2
π
∞∑
n=1
eπ(−1)n − 1
n2 + 1cos(nx)e−n2t
8
Solution 3. (10.5 8) We assume the solution consists of a steady-state solution v(x) and atransient solution w(x, t) so that
u(x, t) = v(x) + w(x, t)
where w(x, t) and its derivatives tend to zero as t → ∞. Then
∂u
∂t=
∂w
∂t∂2u
∂x2= v′′(x) +
∂2w
∂x2
Substituting these back into the original PDE, we obtain the problem
∂w
∂t= v′′(x) +
∂2w
∂x2, 0 < x < π, t > 0 (1)
v(0) + w(0, t) = 0, v(π) + w(π, t) = 3π, t > 0 (2)
v(x) + w(x, 0) = 0, 0 < x < π (3)
Letting t → ∞ we obtain the steady-state boundary value problem
v′′(x) = 0, 0 < x < π
v(0) = 0, v(π) = 3π
Integrating twice, we findv(x) = c1x + c2
Using the boundary conditions, we find
v(0) = c2 = 0
v(π) = c1π = 3π ⇒ c1 = 3
Thusv(x) = 3x
Substituting this back into equations (1)-(3) we have
∂w
∂t=
∂2w
∂x2, 0 < x < π, t > 0
w(0, t) = w(π, t) = 0, t > 0
w(x, 0) = −3x, 0 < x < π
Following a similar argument as in 10.5 2, we have the general solution
w(x, t) =∞∑
n=1
bn sin(nx)e−n2t
From the general solution and the initial condition w(x, 0) we have
w(x, 0) =∞∑
n=1
bn sin(nx)
= −3x
9
which means we can choose the bn’s as the coefficients in the Fourier sine series for g(x) = −3x:
bn =2
π
∫ π
0
−3x sin(nx)dx
=6
n(−1)n
Thus,
w(x, t) = 6∞∑
n=1
(−1)n
nsin(nx)e−n2t
and the solution to the initial-boundary value problem is
u(x, t) = v(x) + w(x, t)
= 3x + 6∞∑
n=1
(−1)n
nsin(nx)e−n2t
10
Solution 4. (10.5 10) As in question 10.5 8, assume the solution consists of a steady-statesolution and a transient solution:
u(x, t) = v(x) + w(x, t)
where w(x, t) and its derivatives tend to zero as t → ∞. Substituting into the original PDE wehave
∂w
∂t= 3
(
v′′(x) +∂2w
∂x2
)
+ x, 0 < x < π, t > 0
v(0) + w(0, t) = v(π) + w(π, t) = 0, t > 0
v(x) + w(x, 0) = sin(x), 0 < x < π
Letting t → ∞, we obtain the steady-state boundary value problem
v′′(x) = −x
3v(0) = v(π) = 0
Integrating twice to find v(x):
v(x) = − 1
18x3 + c1x + c2
Using the boundary conditions to find the constants:
v(0) = c2 = 0
v(π) = − 1
18π3 + c1π = 0 ⇒ c1 =
π2
18Thus
v(x) = − 1
18x3 +
π2
18x
We then have the following problem for w(x, t):
∂w
∂t= 3
∂2w
∂x2, 0 < x < π, t > 0
w(0, t) = w(π, t) = 0, t > 0
w(x, 0) = sin(x) +1
18x3 − π2
18x, 0 < x < π
Following a similar argument as in question 10.5 2, we have the general solution
w(x, t) =
∞∑
n=1
bn sin(nx)e−3n2t
From the general solution and the initial condition for w(x, 0), we have
w(x, 0) =
∞∑
n=1
bn sin(nx)
= sin(x) +1
18x3 − π2
18x
11
which means we can choose the bn’s as the coefficients in the Fourier sine series for g(x) = sin(x) +118x3 − π2
18 x:
bn =2
π
∫ π
0
(
sin(x) +1
18x3 − π2
18x
)
sin(nx)dx
=2
π
(−3π cos(nπ) + 3n2π cos(nπ)
9n3(n2 − 1)
)
Note: this is not valid for n = 1
=2
3n3(−1)n
b1 =2
π
∫ π
0
(
sin(x) +1
18x3 − π2
18x
)
sin(x)dx
=1
3
Thus,
w(x, t) =1
3sin(x)e−3t +
∞∑
n=2
2
3n3(−1)n sin(nx)e−3n2t
and the formal solution to the initial-boundary value problem is
u(x, t) = v(x) + w(x, t)
=π2
18x − 1
18x3 +
1
3sin(x)e−3t +
2
3
∞∑
n=2
(−1)n
n3sin(nx)e−3n2t
12
Solution 5. (10.5 14) As in question 10.5 8, assume the solution consists of a steady statesolution and a transient solution:
u(x, t) = v(x) + w(x, t)
where w(x, t) and its derivatives tend to zero as t → ∞. Substituting into the original PDE wehave
∂w
∂t= 3
(
v′′(x) +∂2w
∂x2
)
+ 5, 0 < x < π, t > 0 (4)
v(0) + w(0, t) = v(π) + w(π, t) = 1, t > 0 (5)
v(x) + w(x, 0) = 1, 0 < x < π (6)
Letting t → ∞ we obtain the steady-state boundary value problem
v′′(x) = −5
3v(0) = v(π) = 1
Integrating twice, we find
v(x) = −5
6x2 + c1x + c2
Using the boundary conditions:v(0) = c2 = 1
v(π) = −5
6π2 + c1π + 1 = 1 ⇒ c1 =
5
6π
Thus
v(x) = 1 +5π
6x − 5
6x2
Substituting this back into equations (4)-(6), we have
∂w
∂t= 3
∂2w
∂x2, 0 < x < π, t > 0
w(0, t) = w(/pi, t) = 0, t > 0
w(x, 0) = −5π
6x +
5
6x2, 0 < x < π
Following a similar argument as in question 10.5 2, we have the general solution
w(x, t) =
∞∑
n=1
bn sin(nx)e−3n2t
From the general solution and the initial condition for w(x, 0), we have
w(x, 0) =
∞∑
n=1
bn sin(nx)
= −5π
6x +
5
6x2
13
which means we can choose the bn’s as the coefficients in the Fourier since series for g(x) = − 5π6 x+
56x2:
bn =2
π
∫ π
0
(
−5π
6x +
5
6x2
)
sin(nx)dx
=10
3n3π((−1)n − 1)
Here, cn = 0 when n is even, and for n odd
c2k+1 = − 20
3(2k + 1)3π, k = 0, 1, 2, . . .
Thus,
w(x, t) = − 20
3π
∞∑
k=0
1
(2k + 1)3sin(nx)e−3n2t
and the formal solution to the initial-boundary value problem is
u(x, t) = v(x) + w(x, t)
= 1 +5π
6x − 5
6x2 − 20
3π
∞∑
k=0
1
(2k + 1)3sin ((2k + 1)x) e−3(2k+1)2t
14
Solution 6. (10.6 2) We give a complete solution here, with every step included. Some steps willbe omitted in the following problems.
1. Separate variables
Plug in u = X (x)T (t) gives
T ′′X = 16X ′′T =⇒ T ′′
T= 16
X ′′
X.
As the left is a function of t alone and the right is a function of x alone, that they are equalfor all x, t means both are constants. Call it λ.
We getT ′′ − 16λT = 0, X ′′ − λX = 0.
2. Solve the eigenvalue problem.
The X equation combined with boundary conditions
u (0, t) = 0 =⇒ X (0) T (t) = 0 =⇒ X (0) = 0;
u (π, t) = 0 =⇒ X (π)T (t) = 0 =⇒ X (π) = 0.
gives the eigenvalue problem
X ′′ − λX = 0, X (0) = X (π) = 0.
Recall that an “eigenvalue” is a specific value of λ such that the above problem has nonzerosolutions, and these nonzero solutions (clearly dependent on λ!) are the corresponding eigen-functions.
i. Write down the general solutions to the equation: The formulas for the general solutionsdepend on the sign of λ.
• λ > 0,
X = C1e√
λx + C2e−√
λx;
• λ = 0,X = C1 + C2x;
• λ < 0,X = C1 cos
√−λx + C2 sin
√−λx.
ii. Check whether there are any λ’s such that the corresponding solutions can satisfy theboundary conditions while being nonzero (that is at least one of C1, C2 is nonzero.
• Any λ > 0?
X (0) = 0 =⇒ C1 + C2 = 0;
X (π) = 0 =⇒ C1eπ√
λ + C2e−π
√λ = 0.
These two requirements combined =⇒ C1 = C2 = 0. So there is no positive eigen-value.
15
• Is λ = 0 an eigenvalue?
X (0) = 0 =⇒ C1 = 0
X (π) = 0 =⇒ C1 + C2π = 0
Combined we have C1 = C2 = 0. So 0 is not an eigenvalue.
• Any λ < 0?
X (0) = 0 =⇒ C1 = 0;
X (π) = 0 =⇒ C1 cos√−λπ + C2 sin
√−λπ = 0.
Combine these two we have
C1 = 0; C2 sin√−λπ = 0.
Now “at least one of C1, C2 is nonzero” is equivalent to
sin√−λπ = 0 ⇐⇒
√−λπ = nπ
for some integer n. This then becomes
λ = −n2
for integer n. Notice that 1. n and −n give the same λ; 2. we are discussing the caseλ < 0. We finally conclude that
λn = −n2, n = 1, 2, 3, . . .
The corresponding Xn are C1 cos√−λx + C2 sin
√−λx with C1 = 0 and λ = λn:
Xn = An sinnx, n = 1, 2, 3, . . .
Summary: The eigenvalues are λn = −n2, eigenfunctions are Xn = An sinnx, and the rangeof n is 1, 2, 3, . . ..
3. Solve for Tn. Recall that T ′′ − 16λT = 0. With the particular λn’s, we have
T ′′n + 16n2Tn = 0
which givesTn = Dn cos (4nt) + En sin (4nt)
with Dn, En arbitrary constants and n ranging 1 to ∞.
4. Write down u =∑
cnXnTn:
u (x, t) =∞∑
n=1
cnAn sin (nx) [Dn cos (4nt) + En sin (4nt)]
which simplifies to
u (x, t) =∞∑
n=1
[an cos (4nt) + bn sin (4nt)] sin (nx) .
16
5. Determine an, bn through initial conditions.
The above formula gives
u (x, 0) =
∞∑
n=1
an sin (nx)
and∂u
∂t(x, 0) =
∞∑
n=1
4nbn sin (nx) .
Comparing with initial conditions
u (x, 0) = sin2 x,∂u
∂t(x, 0) = 1 − cos x,
we have
sin2 x =
∞∑
n=1
an sin (nx)
1 − cos x =
∞∑
n=1
4nbn sin (nx) .
In other words an and 4nbn are coefficients for the Fourier Sine expansion of sin2 x and1 − cos x, respectively.
• Fourier Sine expansion of sin2 x. We have L = π. So
an =2
π
∫ π
0
sin2 x sin (nx) dx
=2
π
∫ π
0
1 − cos 2x
2sin (nx) dx
=1
π
[∫ π
0
sin nxdx −∫ π
0
cos 2x sin (nx) dx
]
.
We evaluate the two integrals.
∫ π
0
sin nxdx = − 1
ncos nx
∣
∣
∣
∣
π
0
= − 1
n[cos (nπ) − 1]
=1 − (−1)
n
n=
{
0 n even2n
n odd.
17
∫ π
0
cos 2x sin (nx) dx =
∫ π
0
sin [(n + 2)x] + sin [(n − 2) x]
2dx
= −1
2
[
cos (n + 2)x
n + 2+
cos (n − 2) x
n − 2
]∣
∣
∣
∣
π
0
= −1
2
[
(−1)n+2 − 1
n + 2+
(−1)n−2 − 1
n − 2
]
= −1
2
[
(−1)n − 1
n + 2+
(−1)n − 1
n − 2
]
=1 − (−1)
n
2
2n
n2 − 4
=[1 − (−1)
n]n
n2 − 4
=
{
0 n even2n
n2−4 n odd.
Note that, the above calculation is only correct when n 6= 2, as when n = 2 dividing byn− 2 becomes meaningless. However checking the n = 2 case separately, we see that theresult is 0 so the above is in fact true for all n.
Thus we have
an =
{ − 8π
1n(n2−4) n odd
0 n even.
• Fourier Sine expansion of 1 − cos x. We have
4nbn =2
π
∫ π
0
(1 − cos x) sin (nx) dx
=2
π
∫ π
0
sin (nx) dx − 2
π
∫ π
0
cos x sin (nx) dx.
We have∫ π
0
sinnxdx =
{
0 n even2n
n odd.
18
and∫ π
0
cos x sin (nx) dx =1
2
∫ π
0
[sin (n + 1)x + sin (n − 1) x] dx
= −1
2
[
cos (n + 1)x
n + 1+
cos (n − 1) x
n − 1
]∣
∣
∣
∣
π
0
= −1
2
[
(−1)n+1 − 1
n + 1+
(−1)n−1 − 1
n − 1
]
=
(
1 − (−1)n−1
)
2
2n
n2 − 1
=(
1 − (−1)n−1
) n
n2 − 1
=
{
0 n odd2n
n2−1 n even.
Again we need to discuss the n = 1 case separately. In the case
∫ π
0
cos x sin (nx) dx =
∫ π
0
cos x sin x = 0
so the general formula still holds.
Thus we have
bn =
{ 1πn2 n odd− 1
π(n2−1) n even.
19
Solution 7. (10.6 8)
1. Separate variables. Writing u = X (x)T (t) and plug into equation, neglecting x sin t for now:
T ′′ − λT = 0; X ′′ − λX = 0.
2. Solve eigenvalue problem. The eigenvalue problem is
X ′′ − λX = 0, X (0) = X (π) = 0
which leads toλn = −n2; Xn = An sin (nx) ; n = 1, 2, 3, . . .
3. Write down u:
u (x, t) =
∞∑
n=1
cnTn sin (nx) =
∞∑
n=1
Tn (t) sin (nx) .
Note that we have integrated cn into Tn.
4. Apply the initial conditions and integrate the forcing:
u (x, 0) = 0 =⇒∞∑
n=1
Tn (0) sin (nx) = 0 =⇒ Tn (0) = 0;
∂u
∂t(x, 0) = 0 =⇒
∞∑
n=1
T ′n (0) sin (nx) = 0 =⇒ T ′
n (0) = 0;
∂2u
∂t2=
∂2u
∂x2+ x sin t =⇒
∞∑
n=1
T ′′n sin (nx) = −
∞∑
n=1
n2Tn sin (nx)
+x sin t.
Thus we must have∞∑
n=1
[
T ′′n + n2Tn
]
sin (nx) = x sin t.
To determine Tn, we need to expand x into sin(nx)’s.
5. Expand x. x =∑∞
n=1 an sin (nx) with
an =2
π
∫ π
0
x sin (nx) dx
= − 2
nπ
∫ π
0
xd [cos (nx)]
= − 2
nπ
[
cos (nx) x|π0 −∫ π
0
cos (nx) dx
]
= − 2
nπ[π (−1)
n]
=2 (−1)
n+1
n.
20
6. Solve Tn. We have
∞∑
n=1
[
T ′′n + n2Tn
]
sin (nx) =
∞∑
n=1
(
2 (−1)n+1
nsin t
)
sin (nx)
which gives
T ′′n + n2Tn =
2 (−1)n+1
nsin t.
Together with initial conditions Tn (0) = T ′n (0) = 0.
First solve the homogeneous equation:
T ′′n + n2Tn = 0 =⇒ Tn = C1 cos (nt) + C2 sin (nt) .
Next we try to find a particular solution. We use undetermined coefficients. The form of theparticular solution is
Tp = ts [A sin t + B cos t] .
Where s is the number of times sin t appears in the general solution of the homogeneousproblem. There are two cases:
• n = 1. In this case s = 1. Substitute Tp = t [A sin t + B cos t] into the equation we findout
A = 0, B = −1.
So the particular solution isTp = −t cos t.
The general solution to the non-homogeneous problem is then
Tn = C1 cos t + C2 sin t − t cos t.
Applying T (0) = T ′ (0) = 0 we reach
C1 = 0, C2 = 1.
So T1 = sin t − t cos t.
• n 6= 1. In this case s = 0 and
Tp = A sin t + B cos t.
Substituting into equation, we have
A =2 (−1)
n+1
n (n2 − 1), B = 0.
So
Tn = C1 cos (nt) + C2 sin (nt) +2 (−1)
n+1
n (n2 − 1)sin t.
21
Applying T (0) = T ′ (0) = 0 we reach
C1 = 0, C2 =2 (−1)
n
n2 (n2 − 1).
Thus
Tn =2 (−1)
n
n2 (n2 − 1)[sin (nt) − n sin t] .
7. Write down solution. Finally we have
u (x, t) =
∞∑
n=1
TnXn
= T1X1 +
∞∑
n=2
TnXn
= [sin t − t cos t] sinx
+
∞∑
n=2
2 (−1)n
n2 (n2 − 1)[sin (nt) − n sin t] sin (nx) .
22
Solution 8. (10.6 10)
1. Take care of the boundary conditions. We need to find an appropriate function w such thatit satisfies both the equation and the boundary conditions, and then set v = u − w. Theboundary conditions for v would be v (0, t) = v (L, t) = 0 and separation of variables can thenbe applied.
The first try is usually w = w (x) independent of t. Then w must satisfy
0 = α2w′′, w (0) = U1, w (L) = U2.
Such w exists. We have
w (x) = U1 +U2 − U1
Lx.
2. Now set v = u − w. This gives u = v + w and the equation becomes
∂2 (v + w)
∂t2= α2 ∂2 (v + w)
∂x2⇐⇒ ∂2v
∂t2= α2 ∂2v
∂x2,
the boundary conditions arev (0, t) = v (L, t) = 0,
and the initial condition becomes
v (x, 0) = f (x) − w = f (x) −[
U1 +U2 − U1
Lx
]
,
∂v
∂t(x, 0) = g (x) − ∂w
∂t(x, 0) = g (x) .
So we need to solve
∂2v
∂t2= α2 ∂2v
∂x2
v (0, t) = v (L, t) = 0,
v (x, 0) = f (x) −[
U1 +U2 − U1
Lx
]
∂v
∂t(x, 0) = g (x) .
3. Solve v. The solution is given by
v (x, t) =
∞∑
n=1
[
an cos
(
nπαt
L
)
+ bn sin
(
nπαt
L
)]
sin(nπx
L
)
with
an =2
L
∫ L
0
{
f (x) −[
U1 +U2 − U1
Lx
]}
sin(nπx
L
)
dx,
bn =2
nπα
∫ L
0
g (x) sin(nπx
L
)
dx.
23
4. Write down u. Recalling u = v + w we have
u (x, t) = U1 +U2 − U1
Lx +
∞∑
n=1
[
an cos
(
nπαt
L
)
+ bn sin
(
nπαt
L
)]
sin(nπx
L
)
with
an =2
L
∫ L
0
{
f (x) −[
U1 +U2 − U1
Lx
]}
sin(nπx
L
)
dx,
bn =2
nπα
∫ L
0
g (x) sin(nπx
L
)
dx.
24
Solution 9. (10.6 14) As −∞ < x < ∞ we need to apply d’Alembert formula:
u (x, t) =f (x − αt) + f (x + αt)
2+
1
2α
∫ x+αt
x−αt
g (y) dy.
Substituting f = x2, g = 0 we have
u (x, t) =(x − αt)
2+ (x + αt)
2
2
= x2 + α2t2.
25
Solution 10. (10.6 16) As f = sin 3x, g = 1 we have
u (x, t) =sin [3 (x − αt)] + sin [3 (x + αt)]
2+
1
2α
∫ x+αt
x−αt
1dx
= sin (3x) cos (3αt) + t.
26