Newton Raphson Method:Explanation, algorithm and flowchart
Newton raphson method:
Newton-Raphson method, also known as the Newton’s Method, is the simplest and fastest approach to find the root of a function. It is an open bracket method and requires only one initial guess. The C program for Newton Raphson method presented here is a programming approach which can be used to find the real roots of not only a nonlinear function, but also those of algebraic and transcendental equations.
Newton’s method is often used to improve the result or value of the root obtained from other methods. This method is more useful when the first derivative of f(x) is a large value.
The programming effort for Newton Raphson Method in C language is relatively simple and fast. The convergence is the fastest of all the root finding methods discussed in Numerical Methods Tutorial section – the bisection method, the secant method and the regula-falsi method.
Features of Newton Raphson Method:
- Type – open bracket
- No. of initial guesses – 1
- Convergence – quadratic
- Rate of convergence – faster
- Accuracy – good
- Programming effort – easy
- Approach – Taylor’s series
Below is a very short and simple source code in C program for Newton’s method to find the root of x*log10(x) – 1.2.
Variables:
- itr – a counter which keeps track of the no. of iterations performed
- maxmitr – maximum number of iterations to be performed
- df(x) – the derivative of f(x) with respect to x
- x0 – the value of root at nth iteration
- x1 – the value of root at (n+1)th iteration
- allerr – allowed error
f(x) = x*log10(x) – 1.2
C PROGRAM FOR NEWTON RAPHSON METHOD:
Comments
Post a Comment