So, when we have this problem we can see easily that general solution
$$
X= A\cosh (cx)+ B\cos (cx) +C\sinh (cx) +D\sin (cx)
$$
satisfies conditions at $0$ as $A=B=0$ as
$$
c^{-2}X''= A\cosh (cx)- B\cos (cx) +C\sinh (cx) -D\sinh (cx)
$$
and therefore
$$
X=C\sinh (cx) +D\sinh (cx)
$$
satisfies conditions at $0$ as $A=B=0$ as
$$
c^{-2}X''= C\sinh (cx) -D\sin (cx).
$$
To satisfy conditions on the right end we need
\begin{align*}
& C\sinh (cl) +D\sin (cl) =0,\\
& C\sinh (cl) -D\sin (cl) =0
\end{align*}
which is possible for $(X,D)\ne 0$ iff $C=0$, $\sin (cl)=0$ i.e. we get $\lambda_n= n^2 \pi^2/l^2$, $X_n=\sin (n\pi x/l)$.