# Homework Help: Fourier Series

1. Oct 31, 2006

### Mindscrape

I was going through trying to solve various Fourier problems, and I came across this one.

$$f(x) = \left\{\begin{array} {c}0 \ \ \mbox{for} \ \ - \pi <x<0 & x \ \ \mbox{for} \ \ 0<x<\pi$$

Here is how far I have gotten, using that
$$a_n = \frac{1}{\pi} \int_{- \pi}^{\pi} xcosnx dx$$
and
$$b_n = \frac{1}{\pi} \int_{- \pi}^{\pi} xsinnx dx$$
arriving at

$$f(x) = \frac{\pi}{4} + (sinx - \frac{sin2x}{2} + \frac{sin3x}{3}- ...) + (unknown)$$

So, I figured out the "b" terms, and the initial "a" term was easy, but here is where I have a few doubts; hence, the "unknown." For values when the b term is not zero, I found the integration by parts to be

$$\frac{1}{\pi}([\frac{x}{n}sinnx]^{\pi}_{0} + \frac{1}{n}\int^{\pi}_{0}sinnx dx)$$ (1)

I know that the integral will come out to give

$$2(cosx+\frac{cos3x}{3^2} + \frac{cos5x}{5^2} + ...)$$

and the first term in the parts equation (1) will always be zero

So, then I think the answer will be

$$f(x) = \frac{\pi}{4} + (sinx - \frac{sin2x}{2} + \frac{sin3x}{3}- ...) + \frac{2}{\pi}(cosx+\frac{cos3x}{3^2} + \frac{cos5x}{5^2} + ...)$$

But, it just seems a little strange that a_n terms go by squares. Fourier analysis is new to me, and so I can't really gauge how certain functions look like.

Also, the other thing I wanted to double check on was how the function looked; this is a sawtooth, right?

P.S.
Does anybody know the piecewise function command for LaTeX? I thought it was \cases.
P.S.S
Thanks, hopefully the formatting is better now.

Last edited: Oct 31, 2006
2. Oct 31, 2006

### quasar987

u mean like this?

$$|ax|=\left\{ \begin{array} {c} -ax \ \ \mbox{for} \ \ ax<0 & +ax \ \ \mbox{for} \ \ ax\geq 0 \end{array}$$

Last edited: Nov 1, 2006
3. Oct 31, 2006

### Mindscrape

Another thing I am confused about is Dirichlet's theorem. An example I was looking at said that

$$f(x) = \frac{1}{4} + \frac{1}{\pi}(\frac{cosx}{1} - \frac{cos3x}{3} + \frac{cos5x}{5} ...) + \frac{1}{\pi}(\frac{sinx}{1} - \frac{2sin2x}{2} + \frac{sin3x}{3} + \frac{sin5x}{5} - \frac{2sin6x}{6} ...)$$
converges to 1/2 at x=0.

I can't see how the equation converges to that value. The fourier series is some sort of pulse train, right? I have a guess, but it doesn't much sense in general. Approaching zero from the left the value will be one, and approaching from the right it will be zero, so take the average?

4. Nov 1, 2006

### quasar987

Dirichlet's thm gives a weak conditon for convergence and says that when the series converges, it does so to the average value of the limit of the "generating function"* from the right and the limit from the left. This is useful when you want to know to which value does the fourier series converges at points where there is a pointwise discontinuity.

*the function that we're considering the fourier series of.

5. Nov 1, 2006

### quasar987

the moral of the story is that you only have to look at the generating function to know what its associated fourier series converges to. you were looking at the series itself.