How do you prove $\pi =\sqrt{12}\sum_{n\ge 0}\frac{(-1)^n}{3^n(2n+1)}$? In the book Pi: A Source Book I found the following:

Extract the square root of twelve times the diameter squared. This is the first term. Dividing the first term repeatedly by 3, obtain other terms: the second after one division by 3, the third after more division and so on. Divide the terms in order by the odd integers $1,\,3,\,5,\,\ldots$; add the odd-order terms to, and subtract the even order terms from, the preceding. The result is the circumference.

That is equivalent to
$$\pi =\sqrt{12}\sum_{n\ge 0}\frac{(-1)^n}{3^n(2n+1)}.$$
The formula is due to an Indian mathematician Madhava of Sangamagrama.
The proof of this formula should be in the treatise Yuktibhāṣā written in c. 1530 by an Indian astronomer Jyesthadeva, which I don't have access to. I've been trying to find a proof of the formula elsewhere but with no success.
Maybe this could be proved from
$$\arctan x=\sum_{n\ge 0}\frac{(-1)^n x^{2n+1}}{2n+1}$$
which is mentioned in Yuktibhāṣā as well, but I don't see how could that be done.
 A: In fact $\frac{\pi}{6}=\arctan\frac{1}{\sqrt{3}}=\frac{1}{\sqrt{3}}\sum_{n\ge0}\frac{(-1)^n}{3^n(2n+1)}$, so $\sqrt{12}\sum_{n\ge0}\frac{(-1)^n}{3^n(2n+1)}=\sqrt{12}\sqrt{3}\frac{\pi}{6}=\pi$.
A: \begin{align*}
\displaystyle\sum_{n=0}^{\infty}\frac{(-1)^n}{3^n(2n+1)}&=\sqrt{3}\displaystyle\sum_{n=0}^{\infty}\frac{(-1)^n(\frac{1}{\sqrt{3}})^{2n+1}}{2n+1}\\
&=\sqrt{3}\arctan(\frac{1}{\sqrt{3}})\\
&=\sqrt{3}\frac{\pi}{6}\\
&=\frac{\pi}{\sqrt{12}}
\end{align*}
A: Another answer
\begin{align*}
\frac{\pi}{\sqrt{12}}&=\sqrt{3}\arctan(\frac{1}{\sqrt{3}})\\
&=\sqrt{3}\displaystyle\int_0^{\frac{1}{\sqrt{3}}}\frac{1}{1+t^2}dt\\
&=\sqrt{3}\displaystyle\int_0^{\frac{1}{\sqrt{3}}}\displaystyle\sum_{n=0}^{\infty}(-t^2)^ndt\\
&=\sqrt{3}\displaystyle\sum_{n=0}^{\infty}(-1)^n\displaystyle\int_0^{\frac{1}{\sqrt{3}}}t^{2n}dt\\
&=\sqrt{3}\displaystyle\sum_{n=0}^{\infty}(-1)^n\left[\frac{t^{2n+1}}{2n+1}\right]_0^{\frac{1}{\sqrt{3}}}\\
&=\sqrt{3}\displaystyle\sum_{n=0}^{\infty}\frac{(-1)^n}{2n+1}\left((\frac{1}{\sqrt{3}})^{2n+1}-0\right)\\
&=\frac{\sqrt{3}}{\sqrt{3}}\displaystyle\sum_{n=0}^{\infty}\frac{(-1)^n}{(\sqrt{3})^{2n}(2n+1)}\\
&=\displaystyle\sum_{n=0}^{\infty}\frac{(-1)^n}{3^n(2n+1)}\\
\end{align*}
So $$\pi=\sqrt{12}\displaystyle\sum_{n=0}^{\infty}\frac{(-1)^n}{3^n(2n+1)}$$
A: $\newcommand{\bbx}[1]{\,\bbox[15px,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}$
$\ds{\Large\left. a\right)}$
\begin{align}
\root{12}\sum_{n \geq 0}{\pars{-1}^{n} \over 3^{n}\pars{2n + 1}} & =
-\root{12}\ic\sum_{n = 0}^{\infty}{\ic^{2n + 1} \over
3^{\bracks{\pars{2n + 1} - 1}/2}\pars{2n + 1}}
\\[5mm] & =
-6\,\ic\sum_{n = 1}^{\infty}{\pars{\ic/\root{3}}^{n} \over n}\,
{1 - \pars{-1}^{n} \over 2} =
6\,\Im\sum_{n = 0}^{\infty}{\pars{\root{3}\ic/3}^{n} \over n}
\\[5mm] & =
-6\,\Im\ln\pars{1 - {\root{3} \over 3}\,\ic} =
-6\bracks{\arctan\pars{-\root{3}/3 \over 1}}
\\[5mm] & =
-6\pars{-\,{\pi \over 6}} = \bbx{\large\pi} \\ &
\end{align}

$\ds{\Large\left. b\right)}$
\begin{align}
\root{12}\sum_{n \geq 0}{\pars{-1}^{n} \over 3^{n}\pars{2n + 1}} & =
\root{12}\sum_{n = 0}^{\infty}{\pars{-1}^{n} \over 3^{n}}
\int_{0}^{1}x^{2n}\,\dd x
\\[5mm] & =
\root{12}\int_{0}^{1}\sum_{n = 0}^{\infty}
\pars{-\,{x^{2} \over 3}}^{n}\,\dd x
\\[5mm] & =
\root{12}\int_{0}^{1}{\dd x \over 1 - \pars{-x^{2}/3}}
\\[5mm] & =
\root{12}\root{3}\int_{0}^{1}{\dd x/\root{3} \over
\pars{x/\root{3}}^{2} + 1}
\\[5mm] & =
6\int_{0}^{\root{3}/3}{\dd x \over x^{2} + 1} =
6\arctan\pars{\root{3} \over 3}
\\[5mm] & = 6\,{\pi \over 6} = \bbx{\large\pi} \\ &
\end{align}
A: Consider that
$$\sum_{n=0}^\infty (-1)^n\frac{ x^{2 n+1}}{2 n+1}=\tan ^{-1}(x)$$
$$\sum_{n=0}^\infty (-1)^n\frac{ x^{2 n}}{2 n+1}=\frac{\tan ^{-1}(x)}x$$ Make $x=\frac 1{\sqrt 3}$ and the rhs is $\frac{\pi }{2 \sqrt{3}}$.
Multiply by $\sqrt{12}$ to get $\pi$ as desired.
