hi I want to solve this problem using posted script.

1 view (last 30 days)
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
Walter Roberson on 3 Sep 2021
I discussed the script as the very first thing in my Answer.

Sign in to comment.

Accepted Answer

Walter Roberson
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.

Sign in to comment.

More Answers (0)

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by