# hi I want to solve this problem using posted script.

1 view (last 30 days)
Matthew Worker on 2 Sep 2021
Commented: Walter Roberson on 3 Sep 2021
Problem: Another formula for computing "pi" can be deduced from the identity pi/4 = 4arctan1/5— arctan1/239. Determine the number of terms that must be summed to ensure an approximation to pi to within 1e-3.
Can some one tell me how to use a script to solve the problem.
Walter Roberson on 3 Sep 2021
I discussed the script as the very first thing in my Answer.

Walter Roberson on 2 Sep 2021
That script cannot be used to solve that problem. That script is for the case where a continuous variable x must be found such that f(x) is close to 0.
However, the current problem instead requires that you find the discrete variable n such that
4 * (approximating arctan 1/5 by n terms) - (approximating arctan 1/239 by n terms)
is within 1e-3 of pi/4
It is a completely different kind of problem.
N/A on 2 Sep 2021
Thank you so much for your kind help. I really appreciate it.