I might need some help on this question:
Consider $\dfrac {\partial T}{\partial t} = k\cdot \left(\dfrac {\partial^2T}{\partial x^2}\right), 0\le x\le L$, where $k>0$ and $T(0,t)=T(L,t)=0$.
Solve for $T(x,t)$ w/ the following,
a). $T(x,0) = T_0 \sin\left(\dfrac{n\pi x}{L}\right)$
b). $T(x,0) = T_0 \cos\left(\dfrac{n\pi x}{L}\right)$
I got the idea of solving these equations for the separation constant. I just confused on when to initialize the initial conditions
Using separation of variables, you will have two ODE's in terms of time and space, apply initial conditions T(x,0) to the time variant ODE and apply boundary conditions for space variant ODE.
In this $c^2 = \frac{1}{k}$
Put T(x,0) the intitial condition and equate
a) $$T(x,0) = b_nsin(\frac{n\pi x}{L}) = T_0sin(\frac{n\pi x}{L})$$
Leading to $$b_n = T_0$$
In part b)
$$T(x,0) = b_nsin(\frac{n\pi x}{L}) = T_0cos(\frac{n\pi x}{L})$$
Leading to $$b_n = T_0cot(\frac{n\pi x}{L})$$
Now $T(x,t) = X_n(t).T_n(t)$ in the both the parts.