2. Consider a metal bar, which occupies 0 < x < 1. The initial temperature in the bar is
θ(x, 0) = −2 cos(πχ), for 0 < x < 1.
(1)
The temperature θ(x,t) is governed by the heat equation
∂θ
∂t
= 3 ∂^2θ
∂x^2
, for 0 < x < 1 and t > 0.
(2)
The ends of the bar are insulated, so θ(x,t) satisfies the boundary conditions
∂θ
∂x
(0,t) = 0,
∂θ
∂x
(1,t) = 0.
(3)
(i) Use the method of separation of variables to find the solution θ(x, t) satisfying the
equations (1), (2) and (3).
(ii) Assume now that the initial condition (1) is replaced by
θ(x, 0) = f(x) =
{
x, if 0 < x ≤ 1/2
1 - x, if 1/2 < x < 1.
(4)
By calculating
A_0 = 2 ∫_0^1 f(x)dx,
A_n = 2 ∫_0^1 f(x) cos(nπx)dx,
find the solution θ(x,t) satisfying the equations (2), (3) and (4).