Previous page : Calculating pi using the compound formula
Now, let us use the information on the previous page to find a value of b such that eib =–1.
One way to proceed now is to use the interval halving method. Say we want to solve f(x)=0. We start with two guesses, one that gives a too big result, and one that gives a too small result. Given that the function is continuous, then we must have a 0 somewhere in between those start values.
I our case we should try to find a value for b between 2 and 4 such that the imaginary part of the compound formula is 0.
We pick the mean value of our two guesses and then calculate f(x) of that value. Say the result is positive, and, say, f( of our lower guess) is also positive, then we let the mean value be our new lower guess. We do similarly for the upper guess.
You may explore that here:
I wrote “pi” here, but remember, we are pretedning we dont know the value of pi at this stage.
The calulations are done using 1006 digit numbers, and the interval halving is done 1595 times. The result is shown with 481 digits. The digits in boldface are stable. The speed increases after 160 steps.
What we have just found is a value that is about 3.14159 26535 89793 23846.
So, what value is that? Remember, we pretend that we don’t know the value of π.
We continue with trying to find this out on the next page.
Previous page : Calculating pi using the compound formula