6

$$\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?

infinitylord
  • 4,777
  • 1
    First two lines of my answer shows how one usually attempts this series. – Simply Beautiful Art May 22 '17 at 22:11
  • @SimplyBeautifulArt: That is a very nice and easy way, but alas, I am now invested in this method, and will be quite bothered if I can't see it to completion. – infinitylord May 22 '17 at 22:14
  • 1
    It may be because $1-\sin(x)\in[0,2]$ rather than $[-1,1]$, though I am not so familiar with the Weierstrass factorization theorem to be sure how this has an effect. – Simply Beautiful Art May 22 '17 at 22:15
  • 2
    The equality $1-\sin(x)=\left(1-\frac2\pi x\right)\left(1+\frac2{3\pi}x\right)\left(1-\frac2{5\pi}x\right)\ldots$ is false. If you take $x=\pi$, then $1-\sin(x)=1$ and $\left(1-\frac2\pi x\right)\left(1+\frac2{3\pi}x\right)\left(1-\frac2{5\pi}x\right)\ldots=(-1)\times\left(1+\frac23\right)\left(1-\frac25\right)\ldots\leqslant0$. – José Carlos Santos May 22 '17 at 22:24
  • 3
    The roots you mention of $1 - sin x$ are actually double roots, so the factorisation isn't correct. – B. Mehta May 22 '17 at 22:27
  • @B.Mehta: Good catch, that fixes the problem. You can write this as an answer and I will accept it for closure's sake. – infinitylord May 22 '17 at 22:54
  • @infinitylord Perhaps I am not seeing the jest of this question, but your stated series is really the series of $arctanx$ where $x=1$. This forms an alternating series that perfectly meets the criteria for convergent alternating series test. And $arctan1=\pi/4$ so done – imranfat May 22 '17 at 23:06
  • @imranfat: indeed you are correct. However beginning this problem, I was unaware that it was the Taylor expansion of $\arctan(x)$, so I was trying another method (one more succinct with Euler's solution to the Basel problem) – infinitylord May 22 '17 at 23:14
  • @infinitylord I see. Well the approach I mentioned is a classic one and actually discovered by Gottfried Leibniz. You can find it in any standard Calculus book. If I am not mistaken, it was the first infinite series to "describe" $\pi$ as an infinite sum however, the series converges very slow and thus is not widely used in technology. There are better infinite series out there to "make" $\pi$. – imranfat May 23 '17 at 03:23

6 Answers6

4

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.

Chappers
  • 67,606
3

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.

B. Mehta
  • 12,774
3

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!

Mark Viola
  • 179,405
  • Nice approach, I've seen similar methods before in finding $\sum_{n=1}^\infty \frac1{n^2} $. However, doesn't the result also follow from the Monotone Convergence Theorem? (I'm not arguing with the validity of this approach by any means, but Monotone Convergence Theorem is typically taught to students before Dominated Convergence Theorem. I've not ever heard it it, myself) – infinitylord May 23 '17 at 02:18
  • 1
    Pleased to hear that this was useful. I've edited to provide a way forward that forgoes the DCT, and uses only integration by parts. In addition, I posted a solutionHERE to evaluate $\sum_{n=1}^\infty\frac1{n^2}=\int_0^1\int_0^1 \frac{1}{1-xy},dx,dy$ using the fact that $\frac1n =\int_0^1 x^{n-1},dx$. As for appealing to the MCT, note that $(-x^2)^{N+1}$ is not monotonic. -Mark – Mark Viola May 23 '17 at 18:27
2

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

$\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}

Felix Marin
  • 89,464
0

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.