1. ## Fourier Series Problem

Problem: Find the Fourier Series Representation of -
$\displaystyle f(x)=sin \pi x +3sin2 \pi x - sin 5 \pi x$
$\displaystyle g(x) =0$ $\displaystyle c=1, L=1$

Solution from professor:

$\displaystyle f(x)=sin \pix cos \pi t+3sin2 \pi xcos2 \pi t-sin5 \pi x cos5 \pi t$

Now, I just simply do not understand how it gets here. I use the formula for fourier series, and I got into some very difficult integral that is impossible to solve.

K

Problem: Find the Fourier Series Representation of -
$\displaystyle f(x)=sin \pi x +3sin2 \pi x - sin 5 \pi x$
$\displaystyle g(x) =0$ $\displaystyle c=1, L=1$
No! You are not finding a Fourier Series representation you are solving the equation:
$\displaystyle \frac{\partial^2 u}{\partial t^2} = (1)^2 \cdot \frac{\partial^2 u}{\partial x^2}$.
With boundary value and initial value problems, respectively,
$\displaystyle \left\{ \begin{array}{c} u(0,t) = u(1,t) = 0 \\ u(x,0) = \sin \pi x + 3\sin 2\pi x - \sin 5\pi x\\u_t(x,0)=0\end{array} \right.$

The solution to this heat equation is,
$\displaystyle u(x,t) = \sum_{n=1}^{\infty} \left( A_n \cos \pi n t + B_n \sin \pi n t \right) \sin \pi n x$

In this case $\displaystyle B_n = \frac{2}{\pi n}\int_0^1 u_t(x,0)\sin \pi n x dx = 0$ which is the easy part.

The harder part is,
$\displaystyle A_n = \frac{2}{1}\int_0^1 u(x,0)\sin \pi n x dx$$\displaystyle = 2\left( \int_0^1 \sin \pi x \sin \pi n x dx + \int_0^1 \sin 3\pi x \sin \pi n xdx - \int_0^1 \sin 5\pi x \sin \pi n x dx\right)$

Use the fact that the sines are orthogonal series of functions. This means that,
$\displaystyle \int_{-L}^L \sin \frac{\pi n x}{L}\sin \frac{\pi m x}{L} dx= \left\{ \begin{array}{c} 0\mbox{ if }n\not = m \\ L \mbox{ if }n=m \end{array} \right.$

Therefore the first integral vanishes for every $\displaystyle n\not = 1$. It does not vanish when $\displaystyle n=1$ in that case the integral is $\displaystyle 1$. So $\displaystyle A_1= 2(1+0+0)=2$. Similarly $\displaystyle A_3 = 2$ and $\displaystyle A_5 = -2$.

Thus,
$\displaystyle \sum_{n=1}^{\infty} A_n \cos \pi n t = 2\cos \pi t + 2\cos 3\pi t - 2\cos 5\pi t$

This means,
$\displaystyle u(x,t) = \sum_{n=1}^{\infty} A_n \cos \pi n t \sin \pi n x = 2\cos \pi t \sin \pi x + 2\cos 3t \sin 3t - 2\cos 5t \sin 5t$

3. I understand everything that you have posted, however, I'm stuck on actually taking the integral when n=1.

Okay, so when n=1, everything else vanish except for $\displaystyle A_{1} = (2) \int^{1}_{0}sin \pi x sin \pi xdx$

Then I have $\displaystyle (2) \int^{1}_{0}sin^2 \pi xdx$

Using the table of integrals, I have $\displaystyle (2)( \frac{1}{\pi})(\frac{\pi}{2}) = 1$

But you have $\displaystyle A_{1}=2$, what am I doing wrong here?