How to Use Newton's Method for Computing 1/\sqrt{a} for a Simple Processor

In summary, a Newton-based algorithm is devised for a processor which only supports addition, subtraction, multiplication, and halving (a subtraction of one in the exponent), to compute 1/\sqrt{a}.
  • #1
Scootertaj
97
0

Homework Statement


The most commonly used algorithm for computing [itex]\sqrt{a}[/itex] is the recursion xn+1 = 1/2 (xn + a/xn), easily derived by means of Newton's method. Assume that we have available to us a very simple processor which only supports addition, subtraction, multiplication, and halving (a subtraction of one in the exponent), but not a general divide operation. Devise a Newton-based algorithm for this processor to compute 1/[itex]\sqrt{a}[/itex] (it then only remains to multiply by a to get [itex]\sqrt{a}[/itex].

Homework Equations


xn+1 = 1/2 (xn + a/xn)
xn+1 = xn - f(xn)/f'(xn)

The Attempt at a Solution


I found something that says the following:
Essentially try to compute a single reciprocal A = 1/a and
then solve f(x) = 1/x^2 - A = 0 (whose solution is x = sqrt(a))
iteratively using Newton's method:
xn+1 = (xn) (3 - A (xn)^2) / 2

I can see how this gets rid of the division, and we can account for the halving by subtracting one in the exponent, but how does this solve for 1/[itex]\sqrt{a}[/itex] ?
Moreover, how do they get to the equation?
 
Physics news on Phys.org
  • #2
Scootertaj said:

Homework Statement


The most commonly used algorithm for computing [itex]\sqrt{a}[/itex] is the recursion xn+1 = 1/2 (xn + a/xn), easily derived by means of Newton's method. Assume that we have available to us a very simple processor which only supports addition, subtraction, multiplication, and halving (a subtraction of one in the exponent), but not a general divide operation. Devise a Newton-based algorithm for this processor to compute 1/[itex]\sqrt{a}[/itex] (it then only remains to multiply by a to get [itex]\sqrt{a}[/itex].



Homework Equations


xn+1 = 1/2 (xn + a/xn)
xn+1 = xn - f(xn)/f'(xn)


The Attempt at a Solution


I found something that says the following:
Essentially try to compute a single reciprocal A = 1/a and
then solve f(x) = 1/x^2 - A = 0 (whose solution is x = sqrt(a))
iteratively using Newton's method:
xn+1 = (xn) (3 - A (xn)^2) / 2

I can see how this gets rid of the division, and we can account for the halving by subtracting one in the exponent, but how does this solve for 1/[itex]\sqrt{a}[/itex] ?
Moreover, how do they get to the equation?

Skip finding the single reciprocal. Just use Newton's method to solve f(x)=a-1/x^2. The solution to that is x=1/sqrt(a), yes?
 
  • #3
Update: I figured out I believe... This is what I did:

xn+1 = xn - f(xn) / f'(xn) = xn - (1/xn2 - A)(-xn3/2) = xn - xn(-1/2 + Axn2) = xn(1+1/2-Axn2) = xn/2 * (3-Axn2).
 
Last edited:
  • #4
Dick said:
Skip finding the single reciprocal. Just use Newton's method to solve f(x)=a-1/x^2. The solution to that is x=1/sqrt(a), yes?

Ahh, that would make it easier, I'll go with that! (afterall, it gives the same solution).
 

1. What is Newton's Method Variation?

Newton's Method Variation is a mathematical technique used to find the root of a function. It is a variation of Newton's Method, which is a well-known algorithm for finding roots of a function. This variation is used when the original method fails to converge or when the function has multiple roots.

2. How does Newton's Method Variation work?

Newton's Method Variation works by using the tangent line to approximate the root of a function. It starts with an initial guess and iteratively improves the guess until it reaches a root. This is done by finding the intersection of the tangent line with the x-axis and using that point as the new guess. The process is repeated until the desired level of accuracy is achieved.

3. What are the advantages of using Newton's Method Variation?

One advantage of using Newton's Method Variation is that it can converge to the root of a function faster than other methods, such as the bisection method. It also allows for finding multiple roots of a function, which is not possible with the original Newton's Method. Additionally, it is a relatively simple and intuitive method to understand and implement.

4. What are the limitations of Newton's Method Variation?

One limitation of Newton's Method Variation is that it requires a good initial guess in order to converge to the root. If the initial guess is too far from the actual root, the method may fail to converge or converge to a different root. Additionally, the method may not work for functions with discontinuities or sharp turns.

5. In what fields of science is Newton's Method Variation commonly used?

Newton's Method Variation is commonly used in fields such as physics, engineering, and economics. It is especially useful for solving equations that cannot be solved analytically, such as differential equations. It is also commonly used in optimization problems, such as finding the maximum or minimum of a function.

Similar threads

  • Calculus and Beyond Homework Help
Replies
11
Views
1K
  • Calculus and Beyond Homework Help
Replies
9
Views
716
  • Calculus and Beyond Homework Help
Replies
2
Views
834
  • Precalculus Mathematics Homework Help
Replies
3
Views
3K
  • Calculus and Beyond Homework Help
Replies
12
Views
2K
  • Calculus and Beyond Homework Help
Replies
8
Views
1K
Replies
1
Views
3K
  • Calculus and Beyond Homework Help
Replies
4
Views
679
  • Calculus and Beyond Homework Help
Replies
1
Views
906
  • Calculus and Beyond Homework Help
Replies
1
Views
2K
Back
Top