I am learning to solve PDEs, I found a example the following from a book,
$u_{tt}(x,t)$=$u_{xx}(x,t)$
$u_x(0,t)=0$, $u(L,t)=0$
$u_x(x,0)=\sin\frac{3\pi x}{2}$, $u_t(L,t)=\cos\frac{3\pi x}{2}$.
Now by separating the variables,
$T''(t)+\lambda T(t)=0$,
and a regular S_L problem
$X''(x)+\lambda X(x)=0$, $X'(0)=0$, $X(L)=0$
The eigenvalue-eigenfuntion are
$\lambda_n=\frac{(2n-1^2)\pi^2}{4L}$, $X_n(x)=\cos\frac{(2n-1)\pi x}{2L}$, $n=1,2,...$
Now I don't know how to generates the solution for $T_n(t)$?
You have equation $T''(t) + \lambda T(t) = 0$. This equation has a general solution $T_n(t) = A_n \cos(2^{-1} L^{-1} (2 n -1) \pi) + B_n \sin(2^{-1} L^{-1} (2 n -1) \pi)$. Now you can write $$u(x, t) = \sum_{n=1}^{\infty} ((A_n \cos(2^{-1} L^{-1} (2 n -1) t \pi) + B_n \sin(2^{-1} L^{-1} (2 n -1) t \pi) \times \\ \times \cos(2^{-1} L^{-1} (2 n -1) \pi x)).$$ Now you can define $A_n$ and $B_n$ using initial conditions.