1. ## Past Exam help

My Exam proctor know little to know English, and he grades from a solutions guide....and doesn't correct us or reveal solutions to us after the exams have been graded. So could anyone help me solve this:

It can be shown that pi=4-(4/3)+(4/5)-(4/7)+... . Determine the minimum number of terms that must be included in the sum in order for the sum to differ from the true value of p by less than EPS, where EPS has previously been defined.

Due to the University's lack of Numerical Methods, and my weak analytical/math skills this question was near impossible to solve. An ideas? Does Recursion come into play?

2. Originally Posted by GenghisAhn
My Exam proctor know little to know English, and he grades from a solutions guide....and doesn't correct us or reveal solutions to us after the exams have been graded. So could anyone help me solve this:

It can be shown that pi=4-(4/3)+(4/5)-(4/7)+... . Determine the minimum number of terms that must be included in the sum in order for the sum to differ from the true value of p by less than EPS, where EPS has previously been defined.

Due to the University's lack of Numerical Methods, and my weak analytical/math skills this question was near impossible to solve. An ideas? Does Recursion come into play?

Sure - What have you come up with so far?

3. Start by writing a little program to print the first estimate of pi, (4), the second estimate (4 -4/3), and so on. Use an accurate value to about 14 decimal places as the true value. Then print out the difference between the estimate and the true value, for each step.

4. Since each successive fraction approaches zero, the least number of terms is simply as many until the fraction < EPS. Therefore the number of terms is at least 2 / EPS + 0.5.

However, since it's a sum, we don't know whether the accumulated effect could affect the result after many more terms. My guess is that this problem did not call for an analytical solution but rather a programmatic one. Write the code and let the computer find the answer. No, recursion is not called for.