
Benjamin T. answered 01/26/23
Physics Professor, and Former Math Department Head
Note: Make sure to double check my algebra on this. There are also some tricky steps that you should review in detail.
Using the technique separation of variables we can let u = T(t)X(x).
∂/∂t T X = 4 ∂2/∂x2 T X
X ∂/∂t T = 4 T ∂2/∂x2 X
1/T ∂/∂t T = 4/X ∂2/∂x2 X
1/T ∂/∂t T = -4k2, 4/X ∂2/∂x2 X = -4k2
The boundary conditions for position are periodic so I chose the constant to make the solution easier.
This gives the solutions
T = A exp(-4k2t)
X = B sin(k x) + C cos(kx).
u = T X
If u(0,t) = 0, then
X(0) = C = 0
If u(1,t) = 0, then
X(1) = B sin(k), so k = nπ.
This gives the series solution
u = ∑ Bn exp(-4 n2 π2 t) sin( n π x).
To find Bn we can use the Fourier Trick.
∫01 sin(n π x)sin(m π x) dx = 1/2 if n=m and 0 if n≠m
Given u(x,0) = =x(1-x)
∑ Bn sin( n π x) = x(1-x)
∫01 ∑ Bn sin( n π x) sin(m π x) dx = ∫01 x(1-x) sin(m π x) dx
Bm = ∫01 x(1-x) sin(m π x) dx = 4(1-(-1)m)/(π m)3.
Giving a solution,
u = ∑m=1..∞ 4(1-(-1)m)/(π m)3 exp(-4 n2 π2 t) sin( n π x)