I have the following general solution when solving for a $X(x)$ in a 1D wave equation.
$X(x) = c_1.\cos(\sqrt\lambda.x) + c_2.\sin(\sqrt\lambda.x)$
Applying the first boundary condition $u(0,t) = -1$ yields $c_1 = -1$.
Now applying the second B.C $u(\pi,t) = 1$, I am stuck on the following
$1 = (-1).\cos(\sqrt\lambda.\pi) + c_2.\sin(\sqrt\lambda.\pi) $
How do I determine $c_2$ and (or) the eigenvalues $\lambda_n$ ?
$$1 = -\cos(\sqrt\lambda \pi) + c_2\sin(\sqrt\lambda\pi) $$ From here $$c_2=\frac{1+\cos(\sqrt\lambda \pi)}{\sin(\sqrt\lambda \pi)}\\=\frac{2\cos^2(\sqrt\lambda \pi/2)}{2\sin(\sqrt\lambda \pi/2)\cos(\sqrt\lambda \pi/2)}\\=\cot(\sqrt\lambda \pi/2)$$