1
$\begingroup$

The Fourier series of the function $f(x) = \left\{ \begin{array}{rcl} -4\,x & \text{if} & -\pi<x<0 \\ 4\,x & \text{if} & 0<x<\pi \end{array}\right.$

is given by $f(x) \sim c_0 - \displaystyle \sum\limits_{n=0}^\infty c_n\;\cos\big((2\,n+1)\,x\big) - \sum\limits_{n=1}^\infty b_n\;\sin\big(n\,x\big)$

I'm asked to find $c_0$, $c_n$, and $b_n$.

Given that this is an even function, we get $b_n =0$.

I have already found $c_0=4\pi$, but I am having trouble finding $c_n$.

Here is where I get confused. The general formula that I am given to find $c_n$ is given as

$$c_n=\frac{2}{L} \int_{0}^{L} f(x)\cos(\frac{n\pi x}{L})dx$$

where $L$ are the boundary conditions.

However, given that I have $cos((2n+1)x)$, I'm assuming I would have to modify the general formula to accommodate this term.

Solving for $c_n$, I get

$$c_n=\frac{2}{\pi} \int_{0}^{\pi} 4x\cos((2n+1)x)dx$$

$$c_n=\frac{2}{\pi} [\frac{-4\pi(2n+1)\sin(2\pi n)-4\cos(2\pi n)}{(2n+1)^2} -\frac{4}{(2n+1)^2}]$$

$$c_n=\frac{-8}{\pi} \frac{\pi(2n+1)\sin(2\pi n)+\cos(2\pi n)+1}{(2n+1)^2}$$

Apparently this is not correct, so I'm not sure what I'm doing wrong. Any help would be appreciated!

$\endgroup$
  • $\begingroup$ Why do you have $\cos((2n+1)x)$? Where did that come from? $\endgroup$ – Dylan Dec 12 '17 at 20:52
  • $\begingroup$ Please show additional steps leading to your answer, then we can find the mistake $\endgroup$ – Dylan Dec 12 '17 at 20:58
  • $\begingroup$ $\sin 2\pi n = 0, \cos 2\pi n = 1$ $\endgroup$ – Doug M Dec 12 '17 at 21:07
  • $\begingroup$ @Dylan $cos((2n+1)x)$ is given to me in the question. $\endgroup$ – grizzly.bear Dec 12 '17 at 21:26
  • $\begingroup$ How did $2n+1$ become $2n$ in the second line? $\endgroup$ – Dylan Dec 12 '17 at 22:56
2
$\begingroup$

I think you had the correct anti-derivative, but you evaluated the limits incorrectly $$ c_n = \frac{2}{\pi} \left.\left( -\frac{4x\sin \big((2n+1)x\big)}{2n+1} - \frac{4\cos\big((2n+1)x\big)}{(2n+1)^2} \right)\right|_{x=0}^{\pi} \\ = \frac{8}{\pi} \left(-\frac{\pi\sin \big((2n+1)\pi\big)}{2n+1} - \frac{\cos\big((2n+1)\pi\big)-1}{(2n+1)^2} \right) $$

Since $\sin\big((2n+1)\pi\big) = \sin(\pi) = 0$ and $\cos\big((2n+1)\pi\big) = \cos(\pi) = -1$, this simplifies to

$$ c_n = \frac{16}{\pi(2n+1)^2} $$

$\endgroup$
1
$\begingroup$

use $-\pi$ and $\pi$ as your boundary conditions, and your period is $L = 2\pi$

$a_n = $$\frac {1}{\pi} \int_{-\pi}^{\pi} f(x)\cos nx\ dx\\ \frac {1}{\pi} \int_{-\pi}^{0} -x\cos nx\ dx + \int_{0}^{\pi} x\cos nx\ dx\\ \frac {2}{\pi}\int_{0}^{\pi} x\cos nx\ dx\\ \frac {2}{\pi}(\frac {x}{n}\sin nx - \frac {1}{n^2} \cos nx)|_0^{\pi}\\ \frac {4}{n^2\pi}$

If $n$ is odd, and $0$ if $n$ is even.

$a_{2n+1} = \frac {4}{(2n+1)^2\pi}$

$\endgroup$
  • $\begingroup$ The function is $4x$ not $x$ $\endgroup$ – Dylan Dec 12 '17 at 22:53

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.