0

I have been given the following question.

"The function $f(x)$ is odd, has a period $2\pi$ and satisfies:

$$f(x)=\begin{cases} 1 & 0\lt x \lt \pi \\ -1 & \pi \lt x \lt 2\pi \end{cases}$$

Find its fourier series.

As it is an odd function I have put that $a_0=0$ and $a_n=0$.

I have worked out that $b_n=\frac{2}{n\pi}(-1)^{n+1}$

Thus the solution $f(x)$ would be $ \sum_{n=1}^{\infty}b_n \sin(nx)$

Is this correct? I cannot find the solution.

Thanks.

Hannah
  • 41
  • here's an tutorial for mathjax http://meta.math.stackexchange.com/questions/5020/mathjax-basic-tutorial-and-quick-reference , by using this you can type set your question and make your question look better, It will allow people to understand your question easier and attract more positive answer. :) @hannah – Someone May 13 '15 at 18:20
  • 1
    Thankyou for editing it @Mann I was trying for ages! – Hannah May 13 '15 at 18:48
  • No problem, just right click my edited text , show math -> text too see what command i used and i think $b_n=\frac{2}{n\pi}(1-(-1)^n)$ – Someone May 13 '15 at 18:49
  • How did you get that answer? I am currently in proccess of trying to write how I got mine @Mann – Hannah May 13 '15 at 18:59

1 Answers1

0

$b_n=\frac 1\pi \int_0^{2\pi}f(x)\sin nx dx$

$b_n=\frac 1\pi \int_0^{\pi}\sin nx dx-\frac 1\pi \int_0^{\pi}\sin nx dx$

$b_n=\frac 1\pi \left|-\frac{\cos nx}{n}\right|^{\pi}_{0}-\frac 1\pi \left|-\frac{\cos nx}{n}\right|^{2\pi}_{\pi}$

$b_n=\frac {-1}{n\pi} \left|\frac{\cos nx}{n}\right|^{\pi}_{0}+\frac {1}{n\pi} \left|\frac{\cos nx}{n}\right|^{2\pi}_{\pi}$

$b_n=\frac{-1}{n\pi}((-1)^ n-1)+\frac{1}{n\pi}(1-(-1)^n)$

$b_n=\frac{1}{n\pi}(1-(-1)^ n)+\frac{1}{n\pi}(1-(-1)^n)$

Someone
  • 2,865
  • I did this:

    $b_n=\frac{1}{\pi}\int_0^\pi\sin(nx)dx+\frac{1}{\pi}\int_\pi^{2\pi}-\sin(nx)dx$

    $=\frac{1}{\pi}[\frac{-cos(nx)}{n}]\bigg|0^\pi+\frac{1}{\pi}[\frac{cos(nx)}{n}]\Bigg|\pi^{2\pi}$

    $=\frac{1}{\pi}(\frac{-(-1)^n-1}{n})+\frac{1}{\pi}(\frac{1-(-1)^n}{n})$

    $=\frac{1}{\pi}(\frac{-(-1)^n-1+1-(-1)^n}{n})$

    $=\frac{1}{n\pi}({-(-1)^n-1+1-(-1)^n})$

    $=\frac{1}{n\pi}({-(-1)^n-(-1)^n})$

    $=\frac{1}{n\pi}({-2*(-1)^n})$

    $=\frac{1}{n\pi}({2-1(-1)^n})$

    $=\frac{2}{n\pi}({-1*(-1)^n})$

    $=\frac{2}{n\pi}({-1*(-1)^n})$

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

    – Hannah May 13 '15 at 19:19
  • I think you are doing an error somewhere carefully see. @Hannah – Someone May 13 '15 at 19:26
  • I can't see where my error is though. @mann – Hannah May 13 '15 at 19:27
  • I tnink your second step , first term should be $-(-1)^n+1\neq -(-1)^n-1 $ @Hannah – Someone May 13 '15 at 19:30