7
« on: November 19, 2015, 01:26:59 AM »
I am not sure if my solution agrees with Rong Wei's. I do not think there was a need to shift coordinates. Btw there was a hint saying to only consider eigenfunctions which are even with respect to x. I will proceed with that knowledge.
By separation of variables, we have $$\frac{X''}{X}=\frac{T''}{T}=-\lambda$$
One can check that there are only positive eigenvalues, so let $\lambda=\omega^2$. Solving the $X$ equation, and only keeping the even term, we have
$$X(x)=A\cos(\omega x)$$
The boundary conditions in $x$ imply that $$X'\left(\pm\frac{\pi}{2}\right)=\mp \omega A\sin\left(\omega\frac{\pi}{2}\right)=0\Rightarrow \omega\frac{\pi}{2}=n\pi\Rightarrow\omega=2n\Rightarrow\lambda=4n^2$$
So we have $$X_{n}(x)=A_n \cos(2nx)$$
Now solving the $T$ equation, we get $$T(t)=B\cos(2nt)+C\sin(2nt)$$
The $T'(0)=0$ boundary condition implies that $C=0$. So
$$T_n(t)=B_n \cos(2nt)$$
The general solution is, after absorbing some constants $$u(x,t)=\frac{1}{2}A_0+\sum_{n=1}^{\infty}A_n\cos(2nx)\cos(2nt)$$
$u(x,0)=x^2$ implies $$A_n=\frac{2}{\pi}\int_{-\pi/2}^{\pi/2}x^2\cos(2nx)dx=\frac{(-1)^n}{n^2}$$
This is not defined for $n=0$, so we have to calculate that term separately
$$A_0=\frac{2}{\pi}\int_{-\pi/2}^{\pi/2}x^2dx=\frac{\pi^2}{6}$$
Therefore the final solution is $$u(x,t)=\frac{\pi^2}{12}+\sum_{n=1}^{\infty}\frac{(-1)^n}{n^2}\cos(2nx)\cos(2nt)$$