Calculate $\pi$ precisely using integrals?

If you want to calculate $\pi$ in this way, note that the expansion of

$$\sqrt{1-x^2} = 1 - \sum_{n=1}^\infty \frac{(2n)!}{(2n-1)2^{2n}(n!)^2} x^{2n} $$

and so if we integrate term by term and evaluate from $-1$ to $1$ we will end up with the following formula for $\pi$:

$$ \pi = 4 \left\lbrace 1 - \sum_{n=1}^\infty \frac{(2n)!}{(4n^2-1)2^{2n}(n!)^2} \right\rbrace .$$


In fact, the indefinite integral of $\sqrt{1-x^2}$ is $\frac12(x\sqrt{1-x^2} + \arcsin{x}) + C$, so you are actually "using" $\pi$ in the arcsine if you solve this somehow symbolically, as

$$\int_{-1}^1 \sqrt{1-x^2}\,\mathrm dx = \arcsin 1 = \frac{\pi}{2}$$


Yes, this integral converges to $\pi/2$. If you evaluate the integral numerically, with your favorite integration scheme, you can compute digits of $\pi$.