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.

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.
