Solving a BVP for a wave equation 
How I think I should do it:
First, I assume $u(x,t)=X(x)T(t)$ and perform separation of variables to get two ordinary differential equations:
$X''+\lambda X=0$
$T''+\lambda T=0$
Then I analyze my boundary conditions and recognize that:
$X(0)=0$
$X(1)=0$
Now I solve $X''+ \lambda X=0$ according to 3 cases.

*

*Let $\lambda=0$. Then:

Solution is $c_1 + c_2 x$ which yields $c_1 =0$ and $c_2=0$ by boundary conditions.


*Let $\lambda = -\alpha^2<0$.

According to my professor, this case is negligible.


*Let $\lambda = \alpha^2<0$.

Solution is $c_1 \cos(\alpha x) + c_2 \sin(\alpha x)$ which yields $c_1=0$ and $c_2 \sin(\alpha x)=0$ and I don't know how to go from here? I don't know how to use my boundary conditions any further and I don't know what my next step would be. I don't even know if what I have above is correct. Please help me.
 A: Since we know that $\lambda > 0$, we can write $\lambda = \alpha^2$. As you've noticed, we have a pair of ODE:
$$X'' + \alpha^2 X = 0 \text{ and } T'' + \alpha^2T = 0.$$
The solutions of these have the form
$$X(x) = C\cos\alpha x + D\sin\alpha x \text{ and } T(t) = A\cos\alpha t + B\sin\alpha t.$$
We can now impose the boundary conditions on $X$. $X(0) = 0 = X(1)$ implies that $C = X(0) = 0$ and $D\sin\alpha = X(1) = 0$. We don't want the trivial solution given by $C=D=0$, so this implies that $\alpha = k\pi$ for $k \in \mathbb{Z}$. Thus, we have
$$X_k(x) = D_k\sin k\pi x,$$
and we also know that $\lambda_k = k^2\pi^2$.
Before applying the initial conditions, we can write down the general form of our solution:
$$u(x,t) = \sum_k (A_k\cos k\pi t + B_k\sin k\pi t)\sin k\pi x.$$
Now, we can apply the first initial condition:
$$\sin \pi x = u(x,0) = \sum_k A_k \sin k\pi x.$$
So, we see that $A_1 = 1$ and $A_k = 0$ for $k \neq 1$. That is,
$$u(x,t) = \cos \pi t \sin\pi x + \sum_k B_k\sin k\pi t\sin k\pi x.$$
Next, we can apply the second initial condition:
$$0 = u_t(x,0) = \sum_k k\pi B_k\sin k\pi x.$$
Hence, we see that $B_k = 0$ for all $k$. This leaves us with
$$u(x,t) = \cos \pi t\sin \pi x.$$
