Approximating Pi using Newton-Raphson

In summary, the conversation discusses the use of the Newton-Raphson formula to approximate the value of Pi. The formula involves using the tangent function and its Maclaurin series, but it requires a starting value close to Pi for accurate results. The conversation also highlights potential issues with using this method, such as the need for a calculator and the possibility of inaccurate results if the starting value is not close enough to Pi. The conversation ends with a discussion about the effectiveness and practicality of this method.
  • #1
whit3r0se-
20
2
Ever since the discovery of Pi, Mathematicians have been obsessed with finding methods of approximating Pi. I think I've a unique way of doing so via the Newton-Raphson.
Newton-Raphson Formula:
img11.gif

Let ## ƒ(x)=Sin(x) ⇒ ƒ'(x)=Cos(x) ⇒ X_n= X_{n-1} - tan(X_{n-1})##
For example: Let ##X_0=X ⇒ X_3= (X-tan(X)-tan(X-tan(X))) - tan(X-tan(X)-tan(x-tan(X)))##
This cannot be calculated without a calculator therefore we can introduce a taylor expansion:
##Tan(x)≈x+x^3/3+(2 x^5)/15+(17 x^7)/315+...##
NOTE: For this to work the value of ##X_0 ## must be close to Pi, the rate of convergence is proportional to how close your value of ##X_0## is to Pi.
I'd appreciate any feedback on this method and ways to simplify/generalise my equation.
 
Last edited by a moderator:
Physics news on Phys.org
  • #2
whit3r0se- said:
Ever since the discovery of Pi, Mathematicians have been obsessed with finding methods of approximating Pi. I think I've a unique way of doing so via the Newton-Raphson.
Newton-Raphson Formula:
img11.gif

Let ## ƒ(x)=Sin(x) ⇒ ƒ'(x)=Cos(x) ⇒ X_n= X_{n-1} - tan(X_{n-1})##
For example: Let ##X_0=X ⇒ X_3= (X-tan(X)-tan(X-tan(X))) - tan(X-tan(X)-tan(x-tan(X)))##
This cannot be calculated without a calculator therefore we can introduce a taylor expansion:
##Tan(x)≈x+x^3/3+(2 x^5)/15+(17 x^7)/315+...##
Why is this necessary? In the Newton-Raphson formula the term that is subtracted requires division. This can't reasonably be calculated without the use of a calculator unless you stipulate that all computations be performed using pencil and paper.

In your example, you say "Let ##X_0 = X##" and then immediately write something about X3. There are two problems with this:
  • You have specified either X0 or X, so what good is it to set either one to the other?
  • After setting X0 to X (whatever that is supposed to mean), you write an expression for X3. What happened to X1 and X2?
whit3r0se- said:
NOTE: For this to work the value of ##X_0 ## must be close to Pi, the rate of convergence is proportional to how close your value of ##X_0## is to Pi.
I'd appreciate any feedback on this method and ways to simplify/generalise my equation.
 
  • #3
Mark44 said:
Why is this necessary? In the Newton-Raphson formula the term that is subtracted requires division. This can't reasonably be calculated without the use of a calculator unless you stipulate that all computations be performed using pencil and paper.

In your example, you say "Let ##X_0 = X##" and then immediately write something about X3. There are two problems with this:
  • You have specified either X0 or X, so what good is it to set either one to the other?
  • After setting X0 to X (whatever that is supposed to mean), you write an expression for X3. What happened to X1 and X2?
Well, i put ##X_3## there so people could test it out, it converges very quickly. I didn't bother writing out ## X_2 and X_1## because its fairly simple to calculate. ##X_0## refers to the original input of the formula. And as to why this is necessary, its not. There are many approximations available to use in Mathematics, but thinking of a new and creative method for another one is somehow discouraged on this forum? Pretty poor attitude.
FOR completeness:
##X_1=X-tan(X)##
##X_2=X-tan(X)-tan(X-tan(X))##
 
  • #4
whit3r0se- said:
Well, i put ##X_3## there so people could test it out, it converges very quickly.
My point is that instead of saying "Let X0 = X", you should start X0 off with a specific value, such as 1, 2, -7, whatever.
whit3r0se- said:
I didn't bother writing out ## X_2 and X_1## because its fairly simple to calculate.
Not if you don't know what X0 is.
whit3r0se- said:
##X_0## refers to the original input of the formula. And as to why this is necessary, its not. There are many approximations available to use in Mathematics, but thinking of a new and creative method for another one is somehow discouraged on this forum? Pretty poor attitude.
The only part of what you did that seems new or creative is rewriting the quotient in Newton-Raphson as ##\tan(X_{n - 1})##, and then replacing it by a few terms in the Maclaurin series for the tangent function. Possibly this is the creative part, but it seems much simpler to just use some device to do the calculation, which will probably give a more precise result.

If you post something "new and creative" here, be prepared for a critique of what you post. Here is a summary of the things I see:
  • Newton-Raphson is used to find a root of an equation. Nowhere in your post did you explain that you are using this technique to find a particular root of ##\sin(x) = 0##; namely, the one at ##(\pi, 0)##.
  • Newton-Raphson, like most root-finding algorithms has to be "seeded" with a starting value for x0. You didn't mention starting with a value near ##\pi## until the end of your post.
  • I don't see how replacing tan(x) by its Maclaurin series is any help. In your formula for X3 you have to calculate tangent of the tangent of the tangent of X0 in one place. IOW, the function composition is nested three levels, so replacing tan(x) by ##x + \frac{x^3} 3 + \dots##, and then taking the tangent of that would be problematic, not to mention taking the tangent of that.
  • Finally, what happens if you don't start off with a value close to ##\pi##? Newton-Raphson is notorious for giving bad results if the graph of the function whose root you're trying to find doesn't cross the x-axis steeply or if you start off with an initial value that isn't close enough to the root you're looking for. For example, if you start off with x0 = 1.6, Newton-Raphson converges to a root of the equation sin(x) = 0 that's pretty far away from ##(\pi, 0)##.
 
  • #5
Agree with some of your points but I recommend you actually test this out. It converges super quick.
 

1. What is the Newton-Raphson method for approximating Pi?

The Newton-Raphson method is a mathematical algorithm used to approximate the roots of a given function. In the context of approximating Pi, the method can be used to find the root of the equation sin(x) = 0, which corresponds to x = Pi. By repeatedly applying the Newton-Raphson formula to this equation, we can improve our approximation of Pi.

2. How does the Newton-Raphson method work for approximating Pi?

The method works by starting with an initial guess for the root of the equation sin(x) = 0, which can be any number between 0 and 2Pi. Then, the formula x(n+1) = x(n) - f(x(n))/f'(x(n)) is applied, where x(n) is the current approximation and f(x) and f'(x) are the original function and its derivative, respectively. This process is repeated until the desired level of accuracy is achieved.

3. What are the advantages of using the Newton-Raphson method for approximating Pi?

One advantage is that the method is relatively simple and straightforward to implement. It also converges very quickly, meaning that it can provide accurate approximations of Pi in a small number of iterations. Additionally, the method can be applied to a wide range of functions, making it a versatile tool for approximating mathematical constants like Pi.

4. Are there any limitations to using the Newton-Raphson method for approximating Pi?

One limitation is that the method requires knowledge of the original function and its derivative, which may not always be readily available. In addition, the method may fail to converge if the initial guess is not chosen carefully. Lastly, the method may not be as efficient for approximating Pi compared to other methods, such as the Monte Carlo method, when dealing with large numbers of digits.

5. How accurate is the Newton-Raphson method for approximating Pi?

The accuracy of the method depends on the number of iterations performed and the initial guess chosen. With each iteration, the approximation of Pi becomes more accurate. Generally, the method can provide accurate approximations of Pi up to several decimal places, but for higher precision, other methods may be more suitable.

Similar threads

  • Calculus
Replies
13
Views
1K
Replies
4
Views
885
Replies
24
Views
2K
Replies
1
Views
943
Replies
18
Views
2K
Replies
16
Views
2K
  • Calculus
Replies
1
Views
1K
Replies
3
Views
1K
Replies
7
Views
1K
Back
Top