Madhava–Leibniz Series

Poetry of Logical Ideas

Author

Abhirup Moitra

Published

July 30, 2023

"It has long been an axiom of mine that the little things are infinitely the most important." ~Sherlock Holmes (A Case of Identity)

Madhava–Leibniz Formula for \(\pi\)

In mathematics, the Leibniz formula for \(\pi\) , named after Gottfried Wilhelm Leibniz, states that\(\displaystyle \dfrac{\pi}{4}=1-\dfrac{1}{3}+\dfrac{1}{5}-\dfrac{1}{7}+…\) . an alternating series. It is sometimes called the Madhava–Leibniz series as it was first discovered by the Indian mathematician Madhava of Sangamagrama or his followers in the 14th–15th century (see Madhava series), and was later independently rediscovered by James Gregory in 1671 and Leibniz in 1673.

The Fascinating \(\dfrac{\pi}{4}\)

\[ \displaystyle \dfrac{\pi}{4}=1-\dfrac{1}{3}+\dfrac{1}{5}-\dfrac{1}{7}+… \]

But how do we get here?

Let’s take a look at the series, \(\boxed{\sum_{n=1}^{\infty} \frac{\sin(nx)}{n}}\). We’re looking at this sum because if we evaluate at \(\dfrac{\pi}{2}\) we get our sum in the question. i.e.,

\[\dfrac{\pi}{4}=1-\dfrac{1}{3}+\dfrac{1}{5}-\dfrac{1}{7}+...\]

\[=\sum_{n=1}^{\infty}\dfrac{\sin(n.\frac{\pi}{2})}{n}\ \ \ \ ...(1)\]Then all we have to do is figure out what this \(\displaystyle \boxed{\sum_{n=1}^{\infty}\dfrac{\sin(nx)}{n}}\) series will be all set. Getting there might be tricky though we’re going to use a different representation for \(sine\). In fact, we’re going to use one of the famous Euler’s formula \(e^{ix}= \cos x+i\sin x\) .

instead of this \(x\) replace with \(nx\) i.e., \(e^{inx}= \cos(nx)+i\sin(nx)\). Now we’ll replace \(\boxed{\sin(nx)}\) with \(e^{inx}\). However, in Euler’s formula, only the \(sine\) part is imaginary. So the way we get around this, we replace \(sine\) with \(e\). However, we restrict it to only the imaginary part.

\[\sum_{n=1}^{\infty} \frac{\sin(nx)}{n} = \text{Im}\bigg(\sum_{n=1}^{\infty}\dfrac{e^{inx}}{n}\bigg)\]

\[=\text{Im}\bigg(\sum_{n=1}^{\infty}\dfrac{(e^{ix})^n}{n}\bigg)\] This time with the \(n\) in the exponent rearranging things slightly looks like a fairly well-known power series. In fact, this is the Maclaurin series representation of \(\displaystyle -\ln(1-x)=\sum_{n=1}^{\infty}\dfrac{x^n}{n}\) just with \(e^{ix}\) substituted in. So, the imaginary part of this series will be written as,

\[ \boxed{ -\ln(1-e^{ix})=\sum_{n=1}^{\infty}\dfrac{(e^{ix})^n}{n} } \ \ \ \ \ \ \ \ ...(2) \]

Now, our job comes down to evaluating a complex logarithm. We know any complex number can be represented in its polar form i.e.,

\[z= x+iy\]

\[\implies z=re^{i\theta}\]

\(\displaystyle \text{here},\ r=\sqrt{x^{2}+y^{2}}\, \ \ ,\ \ \theta=\tan^{-1}\bigg(\dfrac{y}{x}\bigg)\)

\[ \text{Hence},\ \boxed{\ln(z)=\ln\big(re^{i\theta}\big)=\ln(r)+i\theta} \ \ \ \ \ ...(3) \]

So, we need to figure out what’s \(r\) and what’s \(\theta\) for our complex value.

In this case, we have \(-\ln(1-e^{ix})\) . We need to figure out what’s the real part and what’s the imaginary part. Fortunately, again Euler’s formula comes to the rescue.

Therefore, \(-\ln(1-e^{ix})=-\ln(1-\cos x-i \sin x)\)

\[=\ln\big((1-\cos x)^2+\sin^2x\big)-i\ \tan^{-1}\bigg(\dfrac{-\sin x}{1-\cos x}\bigg)\]

So, we have just replaced the value of \(e^{ix}\). Now, you can see that inside the natural logarithm, \(1-\cos x\) is the real part and \(- \sin x\) is the imaginary part. In this case, \(\displaystyle r=\sqrt{(1-\cos x)^2+ \sin^2x}\) and \(\theta= \tan^{-1}\bigg(\dfrac{- \sin x}{1- \cos x}\bigg)\) . As we are only concerned with the imaginary part of the above equation i.e.,\(-i\tan^{-1}\bigg(\dfrac{- \sin x}{1- \cos x}\bigg)\) , so we don’t need to look for the real part.

\[ \text{Im}\bigg(\sum_{n=1}^{\infty}\dfrac{(e^{ix})^n}{n}\bigg)=-\tan^{-1}\bigg(\dfrac{-\sin x}{1-\cos x}\bigg) \ \ \ \ \ \ \ \ ...(4) \]

If you string this all the way back to the beginning in \(eqation\ (1)\) that was connected to the original series by substituting \(\dfrac{\pi}{2}\) . If we plug in \(\dfrac{\pi}{2}\) in both side of \(equation\ (4)\) we’ll get,

\[ \text{Im}\bigg(\sum_{n=1}^{\infty}\dfrac{(e^{ix})^n}{n}\bigg)=-\tan^{-1}\bigg(\dfrac{-\sin x}{1- \cos x}\bigg) \]

\[=-\tan^{-1}\bigg(\dfrac{-\sin(\frac{\pi}{2})}{1-\cos(\frac{\pi}{2})}\bigg)\]

\[\\=\tan^{-1}\bigg(\dfrac{1}{1-0}\bigg)=\dfrac{\pi}{4}\]

I think this is a nice way to elaborate but it would be better if you do it yourself in pen and paper.

Prove that \(\Biggl( 1- \dfrac{1}{3^2}\Biggl)\Biggl( 1- \dfrac{1}{5^2}\Biggl) \Biggl( 1- \dfrac{1}{7^2}\Biggl)\ldots \infty= \dfrac{\pi}{4}\)

One can solve this problem by resolving \(\cos \theta\) into factors i.e., expressing \(\cos \theta\) as an infinite product form. You can see Resolve \(\sin \theta\) Into Factors. The rigorous solution of expressing\(\cos \theta\) as infinite products I’m leaving for the readers to provide some hints.

Hint

  • Encounter the problem as it is shown in Resolve \(\sin \theta\) Into Factors. Till equation \(4\) there will be no change.

  • As you are willing to resolve \(\cos \theta\) instead of \(\sin \theta\). Replace \(\theta\) by \(\frac{\pi}{2}+ \theta\) in equation \(4\). and you will see something like the equation below.

    \(\hspace{3 cm}\displaystyle \boxed{\cos\theta = 2^{p-1} \sin \frac{\pi+2\theta}{2p}\;\sin \frac{3\pi+2\theta}{{2p}} \ldots \sin \frac{(2p-1)\pi+2\theta}{2p}} \hspace{0.6 cm}\ldots (*)\)

  • In equation \((*)\) the last factor \(\displaystyle \sin \frac{(2p-1)\pi+2\theta}{2p} =\sin\frac{\pi-2\theta}{2p}\) and the last but one-factor \(\displaystyle \sin \frac{(2p-3)\pi+2\theta}{2p} = \sin \frac{3\pi-2\theta}{2p}\) and so on.

  • Hence by combining the first and the last factors, the second and the last but one factors and so on, the equation \((*)\) becomes,

    \[ \cos \theta = 2^{p-1}\Bigg[\sin \frac{\pi+2\theta}{2p}\ \sin\frac{\pi-2\theta}{2p} \Bigg] \Bigg[\sin\frac{3\pi+2\theta}{2p}\ \sin \frac{3\pi-2\theta}{2p} \Bigg] \ldots\ldots \]

    \[=2^{p-1} \Bigg[\sin^2 \frac{\pi}{2p} - \sin^2\frac{2\theta}{2p} \Bigg] \Bigg[ \sin^2 \frac{3\pi}{2p}- \sin^2\frac{2\theta}{2p} \Bigg] \ldots \ldots\]

  • Finally, use the limit laws as it’s shown in resolution into factors of \(\sin \theta.\)

Now, we will solve the problem which is mentioned here. If you resolve \(\cos \theta\) into factors you will get,

\(\displaystyle \cos \theta = \Biggl( 1- \dfrac{4 {\theta}^2}{ {\pi}^2}\Biggl)\Biggl( 1- \dfrac{4 {\theta}^2}{3^2 {\pi}^2}\Biggl)\Biggl( 1- \dfrac{4 {\theta}^2}{5^2 {\pi}^2}\Biggl) \Biggl( 1- \dfrac{4 {\theta}^2}{7^2 {\pi}^2}\Biggl)\ldots \infty\)

\(\displaystyle \implies \dfrac{\cos \theta}{\Biggl( 1- \dfrac{4 {\theta}^2}{ {\pi}^2}\Biggl)} = \Biggl( 1- \dfrac{4 {\theta}^2}{3^2 {\pi}^2}\Biggl)\Biggl( 1- \dfrac{4 {\theta}^2}{5^2 {\pi}^2}\Biggl) \Biggl( 1- \dfrac{4 {\theta}^2}{7^2 {\pi}^2}\Biggl)\ldots \infty\)

\(\displaystyle \text{Putting}\; \theta = \frac{\pi}{2},\; \text{i.e.,}\; \frac{2\theta}{\pi} =1, \text{we get,}\)

\(\displaystyle \implies \lim_{\theta\ \to\ \pi/2} \dfrac{\cos \theta}{\Biggl( 1- \dfrac{4 {\theta}^2}{ {\pi}^2}\Biggl)} = \lim_{\theta\ \to\ \pi/2} \Biggl( 1- \dfrac{4 {\theta}^2}{3^2 {\pi}^2}\Biggl)\Biggl( 1- \dfrac{4 {\theta}^2}{5^2 {\pi}^2}\Biggl) \Biggl( 1- \dfrac{4 {\theta}^2}{7^2 {\pi}^2}\Biggl)\ldots \infty\)

\(\text{Using L'Hospital's Rule in the L.H.S., we get}\)

\(\displaystyle \lim_{\theta\ \to\ \pi/2} \dfrac{- \sin \theta}{\dfrac{8\theta}{{\pi}^2}} = \Biggl( 1- \dfrac{1}{3^2}\Biggl)\Biggl( 1- \dfrac{1}{5^2}\Biggl) \Biggl( 1- \dfrac{1}{7^2}\Biggl)\ldots \infty\)

\(\implies \dfrac{\pi}{4} = \Biggl( 1- \dfrac{1}{3^2}\Biggl)\Biggl( 1- \dfrac{1}{5^2}\Biggl) \Biggl( 1- \dfrac{1}{7^2}\Biggl)\ldots \infty\)

\[ \therefore \displaystyle \boxed{\Biggl( 1- \dfrac{1}{3^2}\Biggl)\Biggl( 1- \dfrac{1}{5^2}\Biggl) \Biggl( 1- \dfrac{1}{7^2}\Biggl)\ldots \infty = \dfrac{\pi}{4}} \hspace{1 cm} \text{(Proved)} \]

Let’s play with some integral !

\(\displaystyle\text{Evaluate}\iint_R x^2 dx\ dy\; \text{where}\;R \; \text{is the circle}\; x^2+y^2 = 1.\)

\(\displaystyle x = r \cos \theta \;,\; y = r \sin \theta\) \(\;\;\;\text{Again,}\hspace{0.36 cm}\dfrac{\partial x}{\partial r} = \cos \theta ,\; \dfrac{\partial x}{\partial \theta} = -r \sin \theta , \; \dfrac{\partial y}{\partial r} = \sin \theta,\;\; \dfrac{\partial y}{\partial \theta} = r \cos \theta\)

\[ \dfrac{\partial(x,y)}{\partial(r,\theta)} = \begin{vmatrix} \dfrac{\partial x}{\partial r} & \dfrac{\partial x}{\partial \theta} \\ \dfrac{\partial y}{\partial r} & \dfrac{\partial y}{\partial \theta}\end{vmatrix}= \begin{vmatrix} \cos \theta & -r\sin \theta \\ \sin \theta & r\cos \theta\end{vmatrix} = r \]

\(\text{Now, we know that}\)

\[ \displaystyle\iint_{R} f(x,y) \ dx\ dy= \iint_{R'} f\Big(\phi(u,v),\psi(u,v)\Big) \begin{vmatrix}\dfrac{\partial(x,y)}{\partial(u,v)}\end{vmatrix} du\ dv \]

\[ \displaystyle \therefore \iint_R x^2 dx\ dy= \int_{r=0}^{r=1} \int_{\theta=0}^{\theta=2\pi} (r \cos \theta)^2 \begin{vmatrix}\dfrac{\partial(x,y)}{\partial(r,\theta)}\end{vmatrix} dr\ d\theta \]

\[ \text{Since for a circular region}\; x^2+y^2 =1, r\; \text{varies from 0 to 1 and} \;\theta\; \text{varies from 0 to}\; 2\pi. \]

\[ = \int_{r=0}^{r=1} \int_{\theta=0}^{\theta=2\pi} r^3 \cos^2 \theta\ dr\ d\theta =\int_0^1 r^3dr \int_0^{2\pi} \cos^2\theta \; d\theta \]

\[ =\Bigg[\dfrac{r^4}{4}\Bigg]_0^1 \dfrac{1}{2}\int_0^{2\pi} (1+ \cos 2\theta)d \theta = \dfrac{1}{8} \Bigg[\theta\;+ \dfrac{\sin 2\theta}{2} \Bigg]_0^{2\pi}= \dfrac{\pi}{4} \]

\[ \therefore\iint_R x^2 dx\ dy = \dfrac{\pi}{4} \; \text{where}\; R\; \text{is a circle}\; x^2+y^2 = 1 \]

\(\text{Evaluate} \; \displaystyle \int_0^{\infty}\int_0^{\infty} e^{-(x^2+y^2)}dx \ dy\)

\(\displaystyle \text{Let}\; x = r \cos\theta, \; y = r \sin \theta,\; \text{so that}\; x^2+y^2 = r^2\; \text{Again,}\;\ r^2 = t \implies rdr = \frac{1}{2} dt\)

\(\text{Also,}\) \(\displaystyle dx\ dy = \dfrac{\partial (x,y)}{\partial (r,\theta)} \ dr\ d\theta = \begin{vmatrix} \cos \theta & -r\sin \theta \\ \sin \theta & r\cos \theta\end{vmatrix} dr\ d\theta = r \ dr \ d\theta = r \ dr\ d\theta\)

\(\text{Here the limits of}\;x\; \text{are from 0 to}\; \infty\; \text{and those of y are also from 0 to}\ \infty,\text{so the region of}\) \(\text{integration covers the positive quadrants in which}\ r \ \text{varies from 0 to}\ \infty. \ \text{Since}\ \theta \ \text{varies}\) \(\text{from 0 to}\ \displaystyle\frac{\pi}{2}, \text{so}\; r^2 =t \ \text{varies from 0 to} \ \infty.\)

\(\hspace{2.5 cm} \displaystyle \therefore \text{the given integral} = \int_{\theta=0}^{\theta= \frac{\pi}{2}} \int_{r=0}^{r=\infty}e^{-r^2}r.dr\ d \theta\)

\[ =\dfrac{1}{2} \int_{\theta=0}^{\theta= \frac{\pi}{2}} \int_{t=0}^{t=\infty} e^{-t} dt \ d\theta \]

\[ = \dfrac{1}{2} \int_{\theta = 0}^{\theta\ =\ \pi/2} \Big[-e^{-t}\Big]_{0}^{\infty} d \theta \]

\[ = \dfrac{1}{2} \int_{\theta = 0}^{\theta\ =\ \pi/2} d \theta = \dfrac{1}{2}\Big[\theta \Big]_0^{\frac{\pi}{2}} = \dfrac{\pi}{4} \]

\[ \boxed{\int_0^{\infty}\int_0^{\infty} e^{-(x^2+y^2)}dx \ dy = \dfrac{\pi}{4}} \]

Conclusion

There are lots of fascinating fact related to this \(\displaystyle\frac{\pi}{4},\) may be in another problem solving episode I will discuss about that or I will provide and update.

See Also

  1. Leibniz formula for \(\pi.\)

  2. List of formulae involving \(\pi.\)

  3. Machin-like formula.

  4. Euler product.

References

  1. Roy, Ranjan (1990). “The Discovery of the Series Formula for π by Leibniz, Gregory and Nilakantha” (PDF). Mathematics Magazine.63(5): 291–306. doi:10.1080/0025570X.1990.11977541.

  2. Ian G. Pearce (2002). Madhava of SangamagrammaMacTutor History of Mathematics archiveUniversity of St Andrews.

  3. Horvath, Miklos (1983). “On the Leibnizian quadrature of the circle” (PDF). Annales Universitatis Scientiarum Budapestiensis (Sectio Computatorica)4: 75–83.

  4. Debnath, Lokenath (2010), The Legacy of Leonhard Euler: A Tricentennial Tribute, World Scientific, p. 214, ISBN 9781848165267.

  5. Plofker, Kim (November 2012), “Tantrasaṅgraha of Nīlakaṇṭha Somayājī by K. Ramasubramanian and M. S. Sriram”, The Mathematical Intelligencer, 35 (1): 86–88, doi:10.1007/s00283-012-9344-6, S2CID 124507583.