# Homework Help: Computing Fourier series

1. Mar 14, 2010

### Knissp

1. The problem statement, all variables and given/known data
Find the Fourier series for $$y(x)=\begin{cases} A\sin(\frac{2\pi x}{L}) & 0\leq x\leq\frac{L}{2}\\ 0 & \frac{L}{2}\leq x\leq L\end{cases}$$

2. Relevant equations
$$B_{n}=\frac{2}{L}\int_{0}^{L}y(x)\sin(\frac{n\pi x}{L})dx$$

3. The attempt at a solution

$$B_{n}=\frac{2}{L}\int_{0}^{L/2}A\sin(\frac{2\pi x}{L})\sin(\frac{n\pi x}{L})dx$$

$$=\frac{2}{L}\int_{0}^{\frac{L}{2}}A\sin(\frac{\pi x}{L/2})\sin(\frac{(n/2)\pi x}{L/2})dx$$

$$=\frac{1}{p}\int_{0}^{p}A\sin(\frac{\pi x}{p})\sin(\frac{\frac{n}{2}\pi x}{p})dx$$

$$=\begin{cases} 0 & \frac{n}{2}=1\\ \frac{A}{2} & \frac{n}{2}\in\mathbb{Z}\text{ and }\frac{n}{2}\neq1\end{cases}$$

So this takes care of the even values of n, but I'm not sure what to do when n is odd.

$$=\frac{1}{p}\int_{0}^{p}A\sin(\frac{\pi x}{p})\sin(\frac{(\frac{2k+1}{2})\pi x}{p})dx$$

$$=\frac{1}{p}\int_{0}^{p}A\sin(\frac{\pi x}{p})\sin(\frac{(k\pi x+\frac{1}{2}\pi x}{p})dx$$

$$=\frac{1}{p}\int_{0}^{p}A\sin(\frac{\pi x}{p})[\sin(\frac{k\pi x}{p})\cos(\frac{\frac{1}{2}\pi x}{p})+\cos(\frac{k\pi x}{p})\sin(\frac{\frac{1}{2}\pi x}{p})]dx$$

I'm not really sure if this is going anywhere. The final answer should be $$B_{n}=\frac{4A(-1)^{\frac{n+1}{2}}}{\pi(n^{2}-4)}$$, where n is odd.

Any ideas? Thank you.

Last edited: Mar 14, 2010
2. Mar 14, 2010

### jbunniii

Try using a trig identity at this point.

$$\sin(a) \sin (b) = ?$$

3. Mar 14, 2010

### Knissp

Thanks, that worked perfectly!