# Differential Equation with Fourier Series

I'm having problems finding the final solution $u(x,t)$ to this differential equation.

$$u_n(x,t) = \sin(nπx)[C\cos(nπt) + D\sin(nπt)]$$

Conditions: $$u(x,0) = \sin(πx)$$ $$u'_t(x,0) = \sin(2πx)$$

Can somebody help me?

• Unless there's a typo, you should have no problem combining $\cos(nπt)$ and $\cos(nπt)$ – Kaynex Jul 11 '18 at 17:16
• That's right. It should be sin – emee Jul 11 '18 at 17:24
• Where is your differential equation? – Nosrati Jul 11 '18 at 17:36

By looking at the initial conditions, it's clear that the coefficients are only non-zero for $n=1$ and $n=2$, so we can simplify
$$u(x,t) = \sin(\pi x)\big[C_1\cos(\pi t) + D_1\sin(\pi t)\big] +\sin(2\pi x)\big[C_2\cos(2\pi t) + D_2\sin(2\pi t)\big]$$
$$u(x,t) = \sin(\pi x)\cos(\pi t) + \frac{1}{2\pi}\sin(2\pi x)\sin(2\pi t)$$