Expanding a periodic function into a Fourier series

1.9k Views Asked by At

enter image description here

The solutions say that $$b_n=-\frac{4}{n\pi}$$ but I keep getting $$b_n=-\frac{2}{n\pi}$$

I checked with Wolfram Alpha and it seems that my integrals are right. Is this just a mistake in the solutions? What is the right answer for $b_n$?

Steps: $$ b_n=\frac{1}{2}\left[\int_{-2}^{0}2\sin\left(\frac{n\cdot\pi\cdot x}{2}\right)dx+\int_{0}^{2}x\sin\left(\frac{n\cdot\pi\cdot x}{2}\right)dx\right] \\2b_n=\frac{4[(-1)^n-1]}{n\cdot\pi}+\frac{-4\cos(n\cdot\pi)}{n\cdot\pi} \\b_n=\frac{-2}{n\pi} $$

1

There are 1 best solutions below

0
On BEST ANSWER

Your answer is correct: the sine part of the Fourier series of this function is indeed
$$\sum_{n=1}^\infty \frac{-2}{\pi n}\sin \frac{\pi n x}{2} \tag{1}$$ One way to double-check is to simply plot a partial sum, as I did below. The sine part of the Fourier series of $f$ converges to $\frac12(f(x)-f(-x))$, the odd part of $f$. (The cosine part of the Fourier series converges to $\frac12(f(x)+f(-x))$, the even part of $f$.) For this function, $\frac12(f(x)-f(-x))$ rises with constant slope from $-1 $ to $1$ on the interval $(0,4)$; it is periodic with period $4$. The sum in (1) matches this:

enter image description here

Concerning Kaster's comment: taking two periods instead of one does not change the Fourier series of a function, except maybe in notation. You would get $$\sum_{n \text{ even}} \frac{-4}{\pi n}\sin \frac{\pi n x}{4} \tag{2}$$ which is of course the same as (1). Maybe (2) is what the solution author had in mind.

General remark: when discussing coefficients, it is a good idea to say what function the coefficient is attached to. Your textbook's author may decide that $b_n$ always goes with [something], but other people don't have to share that convention.