I am trying to solve the wave equation $u_{tt}=c^{2}u_{xx}$ given periodic boundary conditions $u(l) = u(0)$ and $u_{x}(l) = u_{x}(0)$. If we seperate the variables by assuming the solution $u(x,t) = T(t)X(x)$ then I get: $X_{0}(x) = 1$, $X(x) = a\cos(\lambda c^{2}x) + b\sin(\lambda c^{2}x)$, and $X(x) = de^{\lambda c^{2}x} + fe^{-\lambda c^{2}x}$ for each eigenvalue $\lambda = 0, \lambda >0$, and $\lambda < 0$. When attempting to apply the boundary conditions i get: $$(ae^{\sqrt\lambda c^{2}l} + be^{-\sqrt\lambda c^{2}l})(d\cos(\sqrt\lambda c^{2}l) + f\sin(\sqrt\lambda c^{2}l))= (a+b)c$$ This is confusing since I can't determine the value of $\lambda$.
I am assuming that I would get the general solution: $$X(x) = \sum_{n=0}^{\infty }C_{n}(ae^{\sqrt\lambda c^{2}x} + be^{-\sqrt\lambda c^{2}x})(d\cos(\sqrt\lambda c^{2}x) + f\sin(\sqrt\lambda c^{2}x))$$ Since we aren't given boundary conditions for $T(t)$ I would assume the solution also takes a similar form as above.
Also I am reaching a problem when trying to apply the initial conditions: $$u(x,0) = \sum_{n = -\infty }^{\infty}u_{n}e^{ik_{n}x}, k_{n} = \frac{2\pi n}{l}$$ $$\frac{\partial u}{\partial t}(x,0) = \sum_{n = -\infty }^{\infty}v_{n}e^{ik_{n}x}$$ How would apply the boundary conditions and determine coefficients to the solution if my general series I got isn't complex. Is there a way to solve using a different method I should research? If my question is confusing, let me know where and I could illuminate more on what I did to achieve a specific result. Help is much appreciated, Thank you