- #1
Silversonic
- 130
- 1
Homework Statement
This is for an exam I had a couple weeks ago. It was a part of a "show that" question and the answer I got was completely wrong. Yet oddly I've been given full marks for the question, and looking at the paper now I still don't see why I have been. Full solutions haven't been given, and I don't really want to ask my tutor.
Determine the coefficients [itex] a_{n} [/itex] for the Fourier sine series;
[itex] x = \sum_{n=1}^{\infty} a_{n} sin(nx) [/itex]
In the interval [itex] x = [0,\pi] [/itex]Hence show that [itex] \pi = \sum_{r=0}^{\infty} \frac{4}{2r+1}(-1)^{r} = 4 - \frac{4}{3} + \frac{4}{5} - \frac{4}{7} + ... [/itex]
Homework Equations
Just knowledge of orthogonal sine functions.
The Attempt at a Solution
This is what I've done, and cheers for anyone that's patient enough to look through.
We multiply both sides of the equation given by sin(mx) and integrate with respect to x over pi and zero. Due to the orthogonality of the sin functions, if n =/= m then the integral is zero. So we are left with;
[itex] \int_{0}^{\pi} xsin(nx) dx = \int_{0}^{\pi} a_{n} sin^{2}(nx) dx [/itex]Looking at the right hand side first, we get;
[itex] \frac{1}{2} a_{n} \int_{0}^{\pi} 1- cos(2nx) dx [/itex]
=
[itex] \frac{1}{2} a_{n} [x- \frac{1}{2n}sin(2nx)]_{0}^{\pi} [/itex]
= [itex] \frac{1}{2} a_{n} \pi [/itex]Now to the left hand side we get;
[itex] \int_{0}^{\pi} xsin(nx) dx [/itex]
= [itex] [-\frac{xcos(nx)}{n}]_{0}^{\pi} + \int_{0}^{\pi} \frac{cos(nx)}{n} dx [/itex]
= [itex] -\frac{\pi cos(n\pi)}{n}[/itex]So if n is even, [itex] cos(n\pi) = 1 [/itex]
If n is odd [itex]cos(n\pi) = -1 [/itex]
So the LHS is equal to
[itex] -\frac {\pi (-1)^{n}}{n} [/itex]Equating the LHS to the RHS, I get;
[itex] a_{n} = -\frac {2(-1)^{n}}{n} [/itex] So I have an equation for the co-efficients, if I shove this in the original equation I get;
[itex] x = \sum_{n=1}^{\infty} -\frac {2(-1)^{n}}{n} sin(nx) [/itex]
Now for the second part of the question, I assume I'd shove in [itex] x = \pi [/itex], but doing that I get;
[itex] \pi = \sum_{n=1}^{\infty} -\frac {2(-1)^{n}}{n} sin(n\pi) [/itex]
But [itex] sin(n\pi) [/itex] is always zero since n is a natural number! So I would get [itex] \pi = 0 [/itex]?! Lol. That's where my answer is so massively wrong, and is nothing like the "show that" part. Yet I have full marks for the question. What have I done wrong?