Numerical Methods - Newton Raphson

In summary, the two-page example shows how the Newton-Raphson technique can be used to solve for roots of functions, both in a single variable and in a system of non-linear equations. The technique is illustrated through various examples, including division and computing Taylor series of functions. The algorithm is efficient and allows for computing a large number of accurate terms in a short amount of iterations. It can also be used for computing the series expansion of logarithmic and exponential functions, making it a versatile tool for solving a wide range of problems.
  • #1
hotvette
Homework Helper
1,008
7
The following 2 page example illustrates the use of the Newton-Raphson technique for solving for roots of functions. Examples included:

1. Function in a single variable
2. System of non-linear equations
 

Attachments

  • Newton Raphson.pdf
    57.5 KB · Views: 1,589
Mathematics news on Phys.org
  • #2
Nicely formatted... great examples too; interesting to finally find something on its use with non-linear systems. :)
Thanks!
 
  • #3
Thanks for the nice comments. My objective is to make things clear, concise, and practical. I need to see examples to understand things, so I figured others do also.:cool:
 
  • #4
Division using Newton-Raphson. :smile:

We want to compute [itex]1/y[/itex] for some number [itex]y[/itex]. This amounts to solving the equation:

[tex]
\frac{1}{x} - y = 0
[/tex]

for [itex]x[/itex]. If we do that using Newton-Raphson, we get:

[tex]
x_{n+1} = 2x_{n} - x_{n}^{2}y
[/tex]

This is indeed a true division algorithm as it doesn't contain any divisions. Also, due to quadratic convergence, you double the number of significant digits at each step. Long division will only yield one significant digit per step.

The above algorithm can also be used to compute the Taylor series of a function [itex]1/f(x)[/itex] if the Taylor series of [itex]f(x)[/itex] is known. You just take [itex]P_{0}(x)[/itex] to be the first term of the expansion, e.g. if [itex]f(0)[/itex] is nonzero then [itex]P_{0}=1/f(0)[/itex] and you iterate using the algorithm:

[tex]
P_{n+1}(x) = 2P_{n}(x) - P_{n}(x)^{2}f(x)
[/tex]

At each step the number of correct terms will double, so [itex]P_{n}(x)[/itex] will contain the first [itex]2^{n}[/itex] terms of the series expansion of [itex]1/f(x)[/itex]. Note that this means that the term [itex]P_{n}(x)^{2}f(x)[/itex] has to be computed to order [itex]\mathcal{O}\left(x^{2^{n+1}-1}\right)[/itex].

So, computing the first billion terms of [itex]1/f(x)[/itex] only requires 30 iterations :smile: But we can do much more than computing reciprocals. Computing the series expansion of [itex]\log(f(x))[/itex] is almost as easy as computing the reciprocal of [itex]f(x)[/itex] as all you have to do is integrate [itex]f'(x)/f(x)[/itex] term by term. And using this algorithm for [itex]\log(f(x))[/itex] you can also compute [itex]\exp\left(f(x)\right)[/itex] using Newton-Raphson to solve for that function that yields [itex]f(x)[/itex] after taking the logarithm using Newton-Raphson and the algorithm for computing the logarithm of a series expansion.

Since a large class of functions can be expressed in terms of logarithms and exponentials, the series expansion of pretty much any awkward function can be computed this way.
 
Last edited by a moderator:

FAQ: Numerical Methods - Newton Raphson

What is the Newton-Raphson method?

The Newton-Raphson method is a numerical method used to find the roots of a function. It is an iterative process that uses the derivative of the function to approximate the root. This method is often used when there is no analytical solution available for finding the root.

How does the Newton-Raphson method work?

The Newton-Raphson method starts with an initial guess for the root and then uses the derivative of the function to find a better approximation for the root. This process is repeated until the desired level of accuracy is achieved.

What are the advantages of using the Newton-Raphson method?

One advantage of the Newton-Raphson method is that it can converge to the root quickly, especially if the initial guess is close to the actual root. It also works well for functions with multiple roots and can handle complex functions.

What are the limitations of the Newton-Raphson method?

The Newton-Raphson method may fail to converge if the initial guess is too far from the root or if the function has a vertical tangent at the root. It also requires knowledge of the derivative of the function, which may not always be readily available.

How is the convergence of the Newton-Raphson method determined?

The convergence of the Newton-Raphson method can be determined by checking the difference between the consecutive approximations for the root. If this difference becomes smaller with each iteration, the method is considered to be converging. Additionally, the convergence can be evaluated by comparing the final approximation to the actual root of the function.

Similar threads

Replies
7
Views
2K
Replies
9
Views
2K
Replies
8
Views
1K
Replies
11
Views
2K
Replies
5
Views
1K
Back
Top