# Fourier Series

1. Nov 10, 2005

### stunner5000pt

Find the FOurier Series in terms of $\phi_{n} = \sin(nx)$ of the step function

f(x) = 0 for $0 \leq x \leq \frac{1}{2} \pi [/tex] f(x) =1 for [itex] \frac{1}{2} \pi < x \leq \pi$

now i have no problem finding the series for each branch. But how would i combine them?

for the 0 to 1/2 pi
$$\frac{4}{\pi} \sum_{n=1}^{\infty} \sin nx$$
for the 1/2 pi to pi
$$\frac{-4}{\pi} \sum_{n=1}^{\infty} \frac{1}{n} \left((-1)^n + \cos(\frac{n \pi}{2}) \right)$$

2. Nov 11, 2005

### HallsofIvy

Staff Emeritus
Strictly speaking, you are not finding the Fourier series for two different functions, you are finding the cn in $\Sum c_n sin(nx)$ by integrating a single function.
And, I might point out, you have NOT found the Fourier series on x between 0 and $\frac{\pi}{2}$. f(x)= 0 there so the Fourier series is just 0.
$$c_n= \frac{2}{\pi}\int_0^\pi f(x)sin(nx)dx= \frac{2}{/pi}\left(\int_0^{\frac{\pi}{2}}0 sin(nx)dx+ \int_{\frac{\pi}{2}}^\pi 1 sin(nx)dx\right)$$

That is just
$$c_n= \frac{2}{\pi}\int_{\frac{\pi}{2}}^\pi sin(nx)dx$$