# Fourier Series Problem

• Sep 23rd 2007, 02:31 PM
Fourier Series Problem
Problem: Find the Fourier Series Representation of -
$f(x)=sin \pi x +3sin2 \pi x - sin 5 \pi x$
$g(x) =0$ $c=1, L=1$

Solution from professor:

$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
• Sep 23rd 2007, 07:17 PM
ThePerfectHacker
Quote:

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

No! You are not finding a Fourier Series representation you are solving the equation:
$\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,
$\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,
$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 $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,
$A_n = \frac{2}{1}\int_0^1 u(x,0)\sin \pi n x dx$ $= 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,
$\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 $n\not = 1$. It does not vanish when $n=1$ in that case the integral is $1$. So $A_1= 2(1+0+0)=2$. Similarly $A_3 = 2$ and $A_5 = -2$.

Thus,
$\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,
$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$
• Sep 24th 2007, 08:24 PM
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 $A_{1} = (2) \int^{1}_{0}sin \pi x sin \pi xdx$

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

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

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