0
$\begingroup$

I am trying to find the Fourier sine series of the following function:

$$ f\left(x\right)= \begin{cases} 1&x<L/2,\\ 0&x>L/2.\tag{1} \end{cases} $$

Let $L=1$. Then, this is what $\left(1\right)$ looks like:

                                enter image description here

I know that to find the Fourier sine series of $\left(1\right)$, I first need to find its odd extension $f_o$:

$$ f_o\left(x\right)= \begin{cases} 1&0<x<L/2,\\ 0&L/2<x<L\text{ & }-L<x<L/2,\\ -1&-L/2<x<0.\tag{2} \end{cases} $$

Again, letting $L=1$, this is what $\left(2\right)$ looks like:

                                enter image description here

Finally, the Fourier sines series of a piecewise smooth, odd function $f\left(x\right)$ is given by

$$ f\left(x\right)\sim\sum_{n=1}^{\infty}B_n\sin\frac{n\pi x}{L}, $$

where

$$ B_n=\frac{2}{L}\int_{0}^{L}f\left(x\right)\sin\frac{n\pi x}{L}.\tag{3} $$

Now, I am having a really hard time trying to find $\left(3\right)$ because, for the case where $0<x<L/2$, I get

$$ \frac{2}{n\pi}\left(1-\cos\left(n\pi\right)\right), $$

and for the case where $-L/2<x<0$, I get

$$ \frac{2}{n\pi}\left(\cos\left(n\pi\right)-1\right). $$

So, it is piecewise defined, but my book only gives one solution, that is,

$$ \frac{2}{n\pi}\left(1-\cos\frac{n\pi}{2}\right). $$

What am I missing!?

$\endgroup$

1 Answer 1

1
$\begingroup$

$$B_n=\frac 2L \int_0^{L/2}\sin(\frac{n\pi}L x) dx$$ $$B_n=-\frac 2L \cos(\frac{n\pi}Lx)\frac{L}{n\pi}\bigg]_0^{L/2}$$ $$B_n=\frac{2}{n\pi}\left(1-\cos(\frac{n\pi}2)\right)$$

I have no idea what you did. Do you see where your derivation looks different from this one? Keep in mind that the first integral you gave is the whole solution. You don't have to do it on both sides.

$\endgroup$
3
  • $\begingroup$ Why did you integrate from $0$ to $L/2$ and not from $0$ to $L$? $\endgroup$
    – wjmolina
    Oct 23, 2012 at 4:10
  • 2
    $\begingroup$ I essentially did integrate from $0$ to $L$, but the function is zero from $L/2$ to $L$ so we can just ignore that part, since it will integrate to $0$ anyway. $\endgroup$ Oct 23, 2012 at 4:13
  • $\begingroup$ Thank you. Aside from that question, I now know where I went wrong; I tried integrating from $-L$ to $L$! $\endgroup$
    – wjmolina
    Oct 23, 2012 at 4:17

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .