Find the function given its Fourier series

I am solving an exercise in which I'm asked to show that

$$1=\frac{4}{\pi}\sum_{n=1}^\infty{\frac{\sin((2n-1)x)}{2n-1}}, 0<x<\pi$$

I am considering solving this exercise by finding the function given by this sum, but I am pretty sure there is a more elegant solution.

Thanks!

• Well, if this is not on an exam or anything, I would just plot the partial sums and "see" what the partial sums are converging to. Nov 6, 2016 at 6:49

I thought it might be instructive to present a way forward without appealing to Fourier Series, but rather to using the "Feynman-like Trick" for differentiating under the series. To that end, we proceed.

First, we let $f(\lambda)$ be represented by the series

$$f(\lambda)=\sum_{n=1}^\infty \lambda^{2n-1}\frac{e^{i(2n-1)x}}{2n-1} \tag 1$$

for $\lambda<1$. Note that $\frac4\pi \text{Im}(f(1))=\frac4\pi \sum_{n=1}\frac{\sin((2n-1)x)}{2n-1}$.

Next, for $\lambda \le r<1$, the series formed by differentiating term-by-term the series in $(1)$ converges uniformly. Therefore, we find

\begin{align} f'(\lambda)&=\frac{1}{\lambda}\sum_{n=1}^\infty (\lambda e^{ix})^{2n-1}\\\\ &=\frac{1}{\lambda}\frac{1}{1-\lambda^2e^{i2x}} \tag 2 \end{align}

for $\lambda \le r<1$.

Then, integrating $(2)$ and using $f(0)=0$ reveals

$$f(\lambda)=\frac12\log\left(\frac{1+\lambda e^{ix}}{1-\lambda e^{ix}}\right) \tag 3$$

for $\lambda \le r<1$.

Finally, letting $\lambda \to 1$ in $(3)$, we obtain

$$\frac4\pi\sum_{n=1}^\infty \frac{\sin((2n-1)x)}{2n-1}=\frac4\pi \text{Im}(f(1))=1$$

as was to be shown!

Hint: Calculate the Fourier Series of $$f(x) =\left\{ \begin{array}{c c} 1 & \mbox{ if } 0 \leq x \leq \pi \\ -1 & \mbox{ if } -\pi \leq x \leq 0 \end{array} \right.$$

• But how did you figure that out? This idea came because you've had lot of experience, or is there an analytical way of solving it? Nov 5, 2016 at 16:02
• @ViníciusLopesSimões The LHS is the constant function 1 and the RHS is a Fourier or a sin series. So the problem is asking you to prove that the RHS is the Fourier Series of the LHS on that interval. The main question is what you should set on the rest of the interval, the most natural choice is $0$. If this doesn't work, $f(x)=-1$ should work on $(-\pi, 0)$ Nov 5, 2016 at 16:05
• Yeah, it seems pretty obvious now that you've just written. Thank you very much!!! Nov 5, 2016 at 16:11
• Well, since there is no constant term (and only odd functions of period $2\pi$) then it must be $f(x)=-1$ on the other half of the interval. Nov 5, 2016 at 17:07
• @LegionMammal978 For the Fourier series it is irrelevant what you set at $x=0$. But be careful, the theory says: for every point inside $(- \pi, \pi)$ where the function is continuous, the FS converges to $f(x)$. for every point inside $(- \pi, \pi)$ where the function is discontinuous but has one side limits, the FS converges to the average of the one side limits.... So no matter what you set $f(0)$, you get the same FS and the FS will converge to $0$ at $x=0$. Nov 5, 2016 at 22:46

We may consider tha meromorphic function $f(z)=\frac{1}{1-z^2}$. This function has simple poles at $z=\pm 1$, but it is a holomorphic function over the region $\left\{z:\left|\text{arg}\,z\right|\geq\varepsilon, \left|\pi-\text{arg}\,z\right|\geq\varepsilon\right\}$, for instance. It follows that for any $x\in(0,\pi)$ $$\begin{eqnarray*} \int_{0}^{e^{ix}}f(z)\,dz &=& \int_{0}^{i}f(z)\,dz + \int_{i}^{e^{ix}}f(z)\,dz\\ &=&\frac{i\pi}{4}+\int_{\pi/2}^{x}\frac{i e^{i\theta}}{1-e^{2i\theta}}\,d\theta\\&=&\frac{i\pi}{4}+\frac{1}{2}\int_{x}^{\pi/2}\frac{d\theta}{\sin\theta}\end{eqnarray*}$$ and in particular the imaginary part of the integral equals $\frac{\pi}{4}$.
On the other hand, as soon as $z$ lies in the previous region and in $\|z\|\leq 1$, $$f(z) = 1 + z^2 + z^4 + \ldots\qquad \int_0^z f(t)\,dt = z+\frac{z^3}{3}+\frac{z^5}{5}+\ldots$$ hence by considering $z=e^{ix}$ and switching to the imaginary parts: $$\sum_{n\geq 1}\frac{\sin((2n-1)x)}{2n-1}=\frac{\pi}{4}$$ as wanted. By considering the real parts, instead, we get: $$\forall x\in(0,\pi),\qquad \sum_{n\geq 1}\frac{\cos((2n-1)x)}{2n-1}=-\frac{1}{2}\log\tan\frac{x}{2}.$$

Unrelated, but interesting consequence: the functions $\frac{\pi}{2}$ and $-\log\tan\frac{t}{2}$ have the same $L^2$ norm over $(0,\pi)$, hence: $$\begin{eqnarray*}\frac{\pi^3}{4}=\int_{0}^{\pi}\log^2\tan\left(\frac{t}{2}\right)\,dt &=& 2\int_{0}^{+\infty}\frac{\log^2(u)}{1+u^2}\,du=4\int_{0}^{1}\frac{\log^2(u)}{1+u^2}\,du\end{eqnarray*}$$ and since $\int_{0}^{1}u^{2k}\log^2(u)\,du = \frac{2}{(2k+1)^3}$, $$\frac{\pi^3}{32}=\sum_{k\geq 0}\frac{(-1)^k}{(2k+1)^3},\qquad \frac{\pi}{2}\sum_{n\geq 0}\frac{1}{(2n+1)^2}=\frac{\pi^3}{16},$$ finding both the value of $\zeta(2)$ and the first case of this identity.

let $$f(x)=\sum_{n=1}^\infty \frac{ \sin((2n-1)x ) }{2n-1}$$

It would suffice to show that $f'(x)=0$ and $f(\frac\pi 2)=\frac\pi 4$ $$f'(x)=\sum_{n=1}^\infty \cos((2n-1)x )$$

$$f(\frac\pi 2)= \sum_{n=1}^\infty \frac{ \sin((2n-1) \frac\pi 2 ) }{2n-1}= \sum_{n=1}^\infty \frac{ (-1)^{n-1} }{2n-1} =\tan^{-1}(1)$$

• Differentiating the series term-by-term results in a divergent series. Nov 5, 2016 at 16:52