I have solve my PDE. But I just want to check my answer with you because I'm not sure whether im right or wrong. So could you just help me out ??
QUESTION :
Given PDE : $U_{xx}=(1/k)(U_{t})$
BCs : $U_{x}(0,t)=0$, $U_{x}(N,t)=0$
IC: $U(x,0)$=x
Assuming we only use separation constant value, $-p^2$
My Solution:
Solving my PDE using separation of variables I got
$$\frac{X''(x)}{X(x)}=(\frac{1}{k})(\frac{T'(t)}{T(t)})=-p^2$$
Solving this I got :
$X(x)=Acospx+Bsinpx$
$T(t)=Ce^{-kp^2t}$
Step 2 : Apply BCs
$U_{x}(0,t)=0$,
$U_{x}(N,t)=0$,
I got $X'(0)=0$ and $X'(N)=0$
Then I got B=0 and p=($\frac{n\pi}{N}$)
Subsituting into equation:
$X(x)$=$Acos(\frac{nx\pi}{N})$
$T(t)$=$Ce^{-k\frac{(n\pi)^2}{N^2}t}$
So $U(x,t)=$$\sum_{n=1}^{\infty}B_{n}cos(\frac{nx\pi}{N})e^{-k\frac{(n\pi)^2}{N^2}t}$
And applying IC and Fourier Series I got $B_{n}=\frac{2N}{\pi^2n^2}$[$(-1)^n-1$]
So is my answer for PDE and $B_{n}$ correct???