Computing $\sum_{n=0}^\infty \frac{(-1)^n}{2n+1} $

512 Views Asked by At

$$\sum_{n=0}^\infty \frac{(-1)^n}{2n+1} \space \text{ converges by the alternating series test, but what is its value?} $$

$1 - \sin(x) \space \text{ is an entire function} $, so by Weierstrass Factorization Theorem, it can be written as a product of its zeros, which occur at $x = \frac{(4n+1)\pi}{2} $ and $\frac{-(4n+3) \pi}{2}$

Equating this to its Taylor series, we get

$$1 - x + O(x^3) = (1 - \frac{2}{\pi}x)(1 + \frac{2}{3\pi}x)(1 - \frac{2}{5\pi}x)(1 + \frac{2}{7\pi}x)... $$

$$1 - x + O(x^3) = (1 - \frac{2}{\pi}x(1-\frac13)+O(x^2))(1 - \frac{2}{\pi}x(\frac15-\frac17)+O(x^2))... $$

$$1 - x + O(x^3) = 1 - \frac{2}{\pi}x(1-\frac13+\frac15-\frac17+...)+O(x^2)$$

$$x - O(x^3) = \frac{2}{\pi}x \sum_{n=0}^\infty \frac{(-1)^n}{2n+1}-O(x^2)$$

Equating $x$ terms,

$$\sum_{n=0}^\infty \frac{(-1)^n}{2n+1} = \frac{\pi}{2}$$

However, I seem to be off by a factor of $2$ (actual answer is $\frac{\pi}{4} $). Does anyone see where this went wrong?

6

There are 6 best solutions below

0
On BEST ANSWER

We can write $1-\sin{x}=2\cos^2{(x/2+\pi/4)}$, and I think we can now see the problem: all the roots have to be double roots. They'll be at $(4n + 1)\pi/2$ and $-(4n+3)\pi/2$, as you suggest, but all the factors have to be squared: $$ 1-\sin{x} = A \prod_{n=0}^{\infty} \left(1-\frac{2x}{(4n+1)\pi}\right)^2 \left(1+\frac{2x}{(4n+3)\pi}\right)^2, $$ and we have to worry about the value of $A$ to make sure we have the right scaling, about which the zeros tell us nothing. Of course, we actually know that $A=1$ by putting $x=0$.


Okay, so $$ 1-\sin{x} = \prod_{n=0}^{\infty} \left(1-\frac{2x}{(4n+1)\pi}\right)^2 \left(1+\frac{2x}{(4n+3)\pi}\right)^2 = \prod_{k=0}^{\infty} \left(1-(-1)^k\frac{2x}{(2k+1)\pi}\right)^2. $$ Now let's get to the series. The easiest way to differentiate a product is to differentiate the logarithm, since this turns it into a sum: $$ \log{(1-\sin{x})} = 2\sum_{k=0}^{\infty} \log{\left(1-(-1)^k\frac{2x}{(2k+1)\pi}\right)}. $$ Now differentiate: $$ -\frac{\cos{x}}{1-\sin{x}} = -\frac{4}{\pi}\sum_{k=0}^{\infty} \frac{(-1)^{k}}{4k+1} \frac{1}{1-(-1)^{k}2x/((2k+1)\pi)} $$ Putting $x=0$ and multiplying everything by $-1$ gives $$ 1 = \frac{4}{\pi} \sum_{k=0} \frac{(-1)^k}{4k+1}, $$ as required.

0
On

While $f(x) = 1 - \sin x$ is indeed an entire function, the roots at $x = \frac{(4n+1)\pi}{2}$ and $\frac{-(4n+3)\pi}{2}$ are in fact double roots, which you can check since they are also roots of $f'(x)$. So, the factorisation you give isn't valid.

2
On

I thought it might be instructive to present an approach that relies on elementary analysis only . To that end, we now proceed.

First, note that $\int_0^1 x^{2n}\,dx=\frac{1}{2n+1}$. Therefore, we can write

$$\begin{align} \sum_{n=0}^N \frac{(-1)^n}{2n+1}&=\sum_{n=0}^N(-1)^n\int_0^1x^{2n}\,dx\\\\ &=\int_0^1 \sum_{n=0}^\infty (-x^2)^n\,dx\\\\ &=\int_0^1 \frac{1-(-x^2)^{N+1}}{1+x^2}\,dx\\\\ &=\frac{\pi}{4}+(-1)^N \int_0^1 \frac{x^{2N+2}}{1+x^2}\,dx\tag 1 \end{align}$$

Noting that by integrating by parts the integral on the right-hand side of $(1)$, with $u=\frac{1}{1+x^2}$ and $v=\frac{x^{2N+3}}{2N+3}$, we see that

$$\begin{align} \left| \int_0^1 \frac{x^{2N+2}}{1+x^2}\,dx\right|&=\left|\frac{1}{2(2N+3)}+\frac{1}{2N+3}\int_0^1 \frac{2x}{(1+x^2)^2}x^{2N+3}\,dx\right|\\\\ &\le \frac{5/2}{2N+3}\\\\ &\to 0\,\,\text{as}\,\,N\to \infty\tag 2 \end{align}$$

Using the result from $(2)$, we see that

$$\lim_{N\to \infty}\sum_{n=0}^N \frac{(-1)^n}{2n+1}=\frac{\pi}{4}+\lim_{N\to \infty}\left((-1)^N \int_0^1 \frac{x^{2N+2}}{1+x^2}\,dx\right)=\frac{\pi}{4}$$

and hence we arrive at the coveted result

$$\sum_{n=0}^\infty \frac{(-1)^n}{2n+1}=\frac{\pi}{4}$$

as expected.


Alternatively, we can appeal to the Dominated Convergence Theorem. Since $-1\le -x^2\le 0$, we see that $\left|\frac{1-(-x^2)^{N+1}}{1+x^2}\right|\le \frac{2}{1+x^2}$. Since $\int_0^1 \frac{2}{1+x^2}\,dx<\infty$, then the Dominated Convergence Theorem guarantees that

$$\begin{align} \lim_{N\to \infty}\int_0^1 \frac{1-(-x^2)^{N+1}}{1+x^2}\,dx &=\int_0^1\lim_{N\to \infty}\left( \frac{1-(-x^2)^{N+1}}{1+x^2}\right)\,dx\\\\ &=\int_0^1\frac{1}{1+x^2}\,dx\\\\ &=\frac{\pi}{4} \end{align}$$

as was to be shown!

0
On

The Taylor series expansion for the arctangent function (see this) is

$$\begin{align} \arctan(x) &=\sum_{n=0}^\infty \frac {(-1)^n}{2n+1}x^{2n+1}=x-\frac 13 x^3+\frac 15x^5-\frac 17 x^7+\cdots \end{align}$$ Putting $x=1$ gives $$\arctan(1)=\color{red}{\frac {\pi}4}=\sum_{n=0}^\infty \frac {(-1)^n}{2n+1}$$

0
On

$\newcommand{\bbx}[1]{\,\bbox[8px,border:1px groove navy]{\displaystyle{#1}}\,} \newcommand{\braces}[1]{\left\lbrace\,{#1}\,\right\rbrace} \newcommand{\bracks}[1]{\left\lbrack\,{#1}\,\right\rbrack} \newcommand{\dd}{\mathrm{d}} \newcommand{\ds}[1]{\displaystyle{#1}} \newcommand{\expo}[1]{\,\mathrm{e}^{#1}\,} \newcommand{\ic}{\mathrm{i}} \newcommand{\mc}[1]{\mathcal{#1}} \newcommand{\mrm}[1]{\mathrm{#1}} \newcommand{\pars}[1]{\left(\,{#1}\,\right)} \newcommand{\partiald}[3][]{\frac{\partial^{#1} #2}{\partial #3^{#1}}} \newcommand{\root}[2][]{\,\sqrt[#1]{\,{#2}\,}\,} \newcommand{\totald}[3][]{\frac{\mathrm{d}^{#1} #2}{\mathrm{d} #3^{#1}}} \newcommand{\verts}[1]{\left\vert\,{#1}\,\right\vert}$ \begin{align} \sum_{n = 0}^{\infty}{\pars{-1}^{n} \over 2n + 1} & = -\ic\sum_{n = 0}^{\infty}{i^{2n + 1} \over 2n + 1} = -\ic\sum_{n = 1}^{\infty}{i^{n} \over n}\,{1 - \pars{-1}^{n} \over 2} = -\,{1 \over 2}\ic\sum_{n = 1}^{\infty}{i^{n} \over n} + {1 \over 2}\ic\sum_{n = 1}^{\infty}{\pars{-i}^{n} \over n} \\[5mm] & = \Im\sum_{n = 1}^{\infty}{i^{n} \over n} = -\,\Im\ln\pars{1 - \ic} = -\arctan\pars{-1 \over \phantom{-}1} = \bbx{\pi \over 4} \end{align}

0
On

This is the value of the Dirichlet beta function at the input $s=1$, which is defined as the series $$\beta(s)=\sum_{n=0}^\infty \frac{(-1)^n}{(2n+1)^s}$$ There is an integral representation related with the Gamma Function and the Dirichlet beta function. $$\beta(s)\Gamma(s)=\int_0^\infty \frac{x^{s-1}e^{-x}}{1+e^{-2x}}\, \mathrm dx$$ Sketch of the proof:\begin{align}\mathcal{I}=\int_0^\infty \frac{x^{s-1}e^{-x}}{1+e^{-2x}}\, \mathrm dx&=\int_0^\infty x^{s-1}e^{-x}\bigg(\sum_{n=0}^\infty(-e^{-2x})^k\bigg)\\&=\sum_{n=0}^\infty (-1)^k\int_0^\infty x^{s-1}e^{-(2k+1)x}\, \mathrm dx\\&=\sum_{n=0}^\infty \frac{(-1)^k}{(2k+1)^s}\Gamma(s)\\&=\beta(s)\Gamma(s)\end{align} In particular, we would find \begin{align}\sum_{n=0}^\infty \frac{(-1)^n}{2n+1}&=\beta(1)\Gamma(1)\\&=\int_0^\infty \frac{e^{-x}}{1+e^{-2x}}\, \mathrm dx\\&=\int_0^\infty \frac{e^{x}}{e^{2x}+1}\ \mathrm dx\\&=\int_0^\infty\frac{1}{1+t^2}\, \mathrm dt\, \text{, via substituting $t=e^x$}\\&=\frac{\pi}{2}\end{align} Hence proved.