Separation of variables to derive the solution $u(x, t)$ How do I solve this question, what are the steps ?
Use the method of separation of variables to derive the solution $u(x, t)$ to the equation for a vibrating string
$$\frac{\partial ^2u}{\partial \:t^2}=9\:\frac{\partial ^2u}{\partial x^2} \hspace{4em} (0 < x < 4, t > 0)$$
with fixed endpoints $u(0, t) = u(4, t) = 0$. The initial conditions are given by
 $u(x, 0) =\frac{1}{2}\left(\frac{\pi \:x}{4}\right)$
$$\frac{\partial u}{\partial t}\:\left(x,\:0\right)\:=\:−\:\sin\left(\frac{\pi x}{2}\right)\:\hspace{4em} (0 ≤ x ≤ 4)$$
 A: The process always starts by looking for separated solutions such as $u(x,t)=X(x)T(t)$. Plugging into the PDE gives
$$
                   X(x)T''(x) = 9X''(x)T(t)
$$
It is then standard to always divide by the original $u=XT$:
$$
                    \frac{T''(t)}{9T(t)}=\frac{X''(x)}{X(x)}.
$$
The next step is to group all functions with one on side. Here that's been done automatically. The left side depends on $t$ only and the right side does not depend on $t$. That means there must be a constant $\lambda$ such that
$$
               \frac{T''(t)}{9T(t)}=\lambda,\;\;\;\lambda = \frac{X''(x)}{X(x)}.
$$
The constant $\lambda$ cannot typically be arbitrary; so you have to figure out how to determine $\lambda$, which is where the endpoint conditions come in. The conditions $u(0,t)=u(4,t)=0$ translates to
$$
                     X(0)=0,\;\; X(4)=0.
$$
In order to solve this equation it helps to assign $X'(0)=1$ for normalization; this is an advanced trick, but it keeps you have from having to consider special cases. The solution is then
$$
                   X_{\lambda}(x) = \frac{\sin(\sqrt{\lambda}x)}{\sqrt{\lambda}}
$$
Normally $\lambda=0$ would be a special case, but you can let $\lambda\rightarrow 0$ to take case of this special case:
$$
                 X_{0}(x)=\lim_{\lambda\rightarrow 0}X_{\lambda}(x) = x.
$$
Now you can rule out $\lambda=0$ because $X_{0}(4) \ne 0$. The set of $\lambda$ for which $X_{\lambda}(4)=0$ are the permissible values of $\lambda$, and these are determined by
$$
              \sin(\sqrt{\lambda}4)=0 \implies \sqrt{\lambda}4 = \pi,2\pi,3\pi,\,\cdots, \\
            \sqrt{\lambda} = \frac{n\pi}{4},\;\;\; n=1,2,3,\cdots.
$$
So $X_{n}(x)=C_n\sin(\frac{n\pi}{4}x)$ are the solutions for the $\sqrt{\lambda_n}=\frac{n\pi}{4}$, where $C_n$ are constants. You can rule out negative values of $\lambda$ because $X_{\lambda}$ switches to become $\sinh$, which cannot vanish at $x=4$, regardless of the value of $\lambda < 0$.
The equations for $T$ come from solving
$$
   \frac{T_n''(t)}{9T_n(t)} = \lambda_n=\frac{n^2\pi^2}{4^2},\;\;\; n=1,2,3,\cdots.
$$
The general solutions of this are
$$
       T_n(t) = A_n\cos(\frac{3n\pi}{2}t)+B_n\sin(\frac{3n\pi}{2}t),\;\;\;n=1,2,3,\cdots
$$
The general solution of your problem must have the form
$$
          u(x,t) = \sum_{n=1}^{\infty}A_n\sin(\frac{n\pi}{4}x)\cos(\frac{3n\pi}{2}t)+B_n\sin(\frac{n\pi}{4}x)\sin(\frac{3n\pi}{2}t)
$$
The constants $A_n, B_n$ are determined by the initial conditions
$$
     \frac{1}{2}\frac{\pi x}{4} = u(x,0) = \sum_{n=1}^{\infty}A_n\sin(\frac{n\pi}{4}x) \\
     -\sin\frac{\pi x}{2} = u_{t}(x,0) = -\sum_{n=1}^{\infty}B_n\frac{3n\pi}{2}\sin(\frac{n\pi}{4}x).
$$
I'll assume you know how to find the $A_n$, $B_n$ from these equations, using the orthogonality of the functions $\sin(\frac{n\pi}{4}x)$ on $[0,4]$. This comes down to finding a bunch of integrals. However, you can guess the solution for the second set of equations because the left side matches the term on the right when $n=2$ (all the $B_n$'s are $0$ except for $n=2$.)
A: I advise you to go through the procedure outlined here (first hit on Google when you search for 'separation of variables'), which shows the method for the equation
\begin{equation}
 \frac{\partial u}{\partial t} = \alpha \frac{\partial^2 u}{\partial x^2}.
\end{equation}
Adopting it to your problem shouldn't be too hard.
