1. ## Understanding the Equation

I'm asked to show that $\frac{\pi}{4} = \displaystyle \sum^{\infty}_{n = 1} \frac{sin(2n+1)x}{2n+1}$ for $0 < x < \pi$, but if that were true then the function should be independent of $x$ on the interval... This seems odd. And going to Wolfram|Alpha, it tells me that, at .5, this equality doesn't hold... Am I misunderstand something here? This seems bizarre.

2. The series is

[LaTeX ERROR: Convert failed]

I checked it for some values in the interval and the identity does hold.

3. Originally Posted by ragnar
I'm asked to show that $\frac{\pi}{4} = \displaystyle \sum^{\infty}_{n = 1} \frac{sin(2n+1)x}{2n+1}$ for $0 < x < \pi$, but if that were true then the function should be independent of $x$ on the interval... This seems odd. And going to Wolfram|Alpha, it tells me that, at .5, this equality doesn't hold... Am I misunderstand something here? This seems bizarre.
When one develops $f(x)= \frac{\pi}{4}$ for $0 and $f(x)= -\frac{\pi}{4}$ for $-\pi < x<0$ (the value at zero doesn't really matter) as a Fourier series over $[-\pi , \pi ]$ one sees that only the coefficients of the sine will appear since $f$ is an odd function, so one gets:

$f(x)= \sum_{k=1}^{\infty} a_k\sin (kx)$ where $a_k=\frac{1}{\sqrt{\pi }} \int_{-\pi}^{\pi } f(x)\sin (kx)dx =\frac{\sqrt{\pi }}{2k}((-1)^{k+1}+1)$ so the Fourier series for f becomes $\sqrt{\pi } \sum_{k=1}^{\infty } \frac{\sin((2k+1)x)}{2k+1}$.

There is a constant there that doesn't appear in your sum...

4. But

$\displaystyle \int_{-\pi}^{\pi}c \sin(k x) dx = 0$

for any constants c and k since $\sin$ is an odd function

EDIT: Nevermind, i missed that f(x) is negative on $[-\pi,0]$

Now that I look at it, isn't it the case that

[LaTeX ERROR: Convert failed]

And then the sum becomes

[LaTeX ERROR: Convert failed]

Notice that the last sum starts at k=0 and that's the proper range.

5. Regarding this, I'm putting several values of the series into Wolfram alpha but they don't seem to coincide (they all give different values!), so maybe I made a mistake in my caculations.

6. You need to sum from n = 0 not n = 1. I think that's the problem in your calculation on wolfram alpha.

EDIT: link sum of sin&#40;&#40;2n&#43;1&#41;x&#41;&#47;&#40;2n&#43;1 &#41; from n &#61; 0 to infinity - Wolfram|Alpha

You can see that the sum is constant from $x = 0$ to $x = \pi$. That is precisely $\pi/4$

7. This is so frustrating... I tried just doing the Fourier series of the constant function and I don't get it. Since $f(x) = f(-x) = \frac{\pi}{4}$ I can just use $f(x) \sim \frac{a_{0}}{2} + \displaystyle \sum^{\infty}_{n=1} a_{n} cos(nx)$, right? And $a_{0} = \frac{1}{\pi} \displaystyle \int^{\pi}_{-\pi} \frac{\pi}{4}dx = 0$, $a_{n} = \displaystyle 4 \int^{\pi}_{-\pi} cos(nx)dx = 0$, no? If we integrate from 0 to $\pi$, then don't we get $a_{0} = \frac{\pi}{4}$, so that no matter what the sum is, if it's not 0 then we get a contradiction--and if it is, we get no information?

8. Er, Jose, I think I see what you're doing. You're construction the function $f(x) = \begin{cases} \frac{\pi}{4} \text{ if } 0 < x < \pi \\ -\frac{\pi}{4} \text{ if } -\pi < x < 0 \end{cases}$? I'll work on this.

9. Yes, that's correct. The reason you get 0 is that the sine function is odd. However, when you multiply it by f as defined in your last post, then you have the product of 2 odd functions, which gives an even function and the integral is non-zero.

10. Okay, I've done all the computations and I seem to get basically the right thing, but in the step $\sum_{k=1}^{\infty} \frac{1}{2k}((-1)^{k+1}+1)\sin (kx) = \sum_{k=0}^{\infty } \frac{\sin((2k+1)x)}{2k+1}$, I see why we only take the odd values in the top. The exponent is odd iff the numerator is 0 and the exponent is odd iff k is even.

\strikethrough{However, why does this carry over to the denominator, since in the LHS the denominator is always even. So even if we're skipping some terms because the numerator is 0, the denominator should still be even on the other terms too.}

I see. When the k is odd, the numerator has 2, cancelling the 2 on bottom. Nevermind.