I am a newbie at complex math, and formulas that uses complex functions ($\sum_{i=a}^B$, $\arctan \theta$, $\tan \theta$ , etc.).
I mostly understand all functions that I said in the last sentance, but I don't understand the $\arctan \theta$ function. Also, I have always be amazed (since I learned what $\pi$ is) that $\pi$ has infinite digits. Some time later, I learned how people calculated more than millions digits of $\pi$.
I wanted to do that myself, so I found out for Leibniz series, that I yet, don't understand.
The Leibniz formula is : $\arctan 1 = \pi/4$. I am only able to calculate that with a calculator. I want to know how to calculate it on paper. I understand how to get $\pi$ with that formula ($4\arctan 1$), but how do I calculate $\arctan 1$?
Thanks for advance! Note: I haven't even started learning Trigonometry in school (I am $5^\mathrm{th}$ grade), so try to explain it well.
To make use of Leibniz formula you need to express function $\arctan x$ in the form of power series. That is $$ \arctan x = x - \frac{x^3}{3} + \frac{x^5}{5} - \frac{x^7}{7} + \dots = \sum_{n=0}^{\infty} (-1)^n \frac{x^{2n+1}}{2n+1}$$
We have only proved it for $|x|<1$, but it turns out that for $|x|=1$ the series is still convergent (just not absolutely convergent) and the equality will still hold. That means that $$ \frac\pi 4 =\arctan 1 = \sum_{n=0}^{\infty} (-1)^n \frac{1}{2n+1} = 1 - \frac13 + \frac15 - \frac17 + \dots$$ $$ \pi = 4 - \frac43 + \frac45 - \frac47 + \dots$$ Note that this series converges very slowly, so you'd need a lot of terms to get a good approximation of $\pi$. To make the calculations a bit faster you can notice that $$ \frac{1}{1}- \frac{1}{3} = \frac{2}{1\cdot 3}$$ $$ \frac{1}{5}- \frac{1}{7} = \frac{2}{5\cdot 7}$$ $$ \frac{1}{9}- \frac{1}{11} = \frac{2}{9\cdot 11}\qquad \text{etc.}$$ Which gives you the formula $$\pi = 8\big(\frac{1}{1\cdot 3} + \frac{1}{5\cdot 7} + \frac{1}{9\cdot 11} + \frac{1}{13\cdot 15} +\dots\big) $$
To get a good approximation even faster, you can use for example $$ \arctan \frac{1}{\sqrt{3}} = \frac\pi 6$$ which gives you $$ \pi = 6 \arctan \frac{1}{\sqrt{3}} = 6\sum_{n=0}^{\infty} (-1)^n \frac{(1/\sqrt{3})^{2n+1}}{2n+1} = 2\sqrt{3} \sum_{n=0}^{\infty} \frac{(-1)^n}{2n+1} \frac{1}{3^n}$$ $$ \pi = 2\sqrt{3}\Big(1 - \frac1{3\cdot 3} + \frac{1}{5\cdot 3^2} - \frac{1}{7\cdot 3^3} + \dots\Big)$$ this series will give you a good precision much faster.