0% found this document useful (0 votes)
50 views12 pages

Numerical Analysis

The document describes the Newton-Raphson method, an iterative algorithm for finding the roots of a function by using the function's tangent line to improve its guesses of the root. It provides examples of applying the method to find the root of an equation and discusses why Newton-Raphson is useful due to its fast convergence but also has limitations like being sensitive to the initial guess.

Uploaded by

Ahmed Khan
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
50 views12 pages

Numerical Analysis

The document describes the Newton-Raphson method, an iterative algorithm for finding the roots of a function by using the function's tangent line to improve its guesses of the root. It provides examples of applying the method to find the root of an equation and discusses why Newton-Raphson is useful due to its fast convergence but also has limitations like being sensitive to the initial guess.

Uploaded by

Ahmed Khan
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 12

Numerical Analysis

(GSC-320)

NEWTON RAPHSON’S METHOD

Prepared by:
Mir Muhammad Ali (02-134202-043)
Moazzam Shah Khan (02-134192-041)
Ahmed Khan (02-134191-106)

DEPARTMENT OF COMPUTER SCIENCE


BAHRIA UNIVERSITY KARACHI CAMPUS
NEWTON RAPHSON’S METHOD
Abstract:
The Newton-Raphson method, or Newton Method, is a powerful technique for
solving equations numerically. Like so much of the differential calculus, it is based
on the simple idea of linear approximation. The Newton-Raphson method is a
widely recognized and powerful iterative technique in the field of numerical
analysis, utilized for finding solutions to nonlinear equations. Solve functions in
both one dimensional and multidimensional cases, or solve systems of equations
with many unknowns in both one dimensional and multidimensional cases. The
main objective of Document is to provide a universal approach to the theory and
practice of the NR method. In addition, we focus the discussion on applications in
decision science, statistics, portfolio optimization and education, among others
Interesting Possible research directions of the NR method are also discussed.

Introduction:
The Newton-Raphson method (also known as Newton's method) is an iterative
algorithm for finding the roots of a real-valued function, f(x) = 0. It starts with an
initial guess, x0, for the root and then uses the tangent line to the function at x0
to improve the guess. The process is repeated until the root is found to within a
desired accuracy.
The method works by approximating the function with a straight-line tangent to it
at the current guess, xn, and finding the x-intercept of this line. This x-intercept is
then used as the next guess, xn+1. The process is repeated until the difference
between successive guesses is small enough.
NEWTON RAPHSON’S METHOD:
In numerical analysis, Newton's method, also known as the Newton-Raphson
method, named after Isaac Newton and Joseph Raphson, is a root-seeking
algorithm that yields progressively better approximations to the roots (or zeros)
of a real value function. the intersection of the x-axis and the tangent of the graph
of f at (x0, f(x0)): that is, the improved guess is the unique root of the linear
approximation at the initial point. The process is repeated as

Geometric Representation:
Here is a picture to demonstrate what Newton's method actually does:
Applications:
 Optimization: Broyden (1967) presented the quasi-Newton method for
functional minimization. Polyak (2007) developed some properties for the
Newton-Raphson method and applied it to optimization. Pho and Nguyen
(2018) compared the Newton-Raphson algorithm and the Maxlik function
to find optimal solutions in an estimation problem.
 Elastic stability: Riks (1972) applied the Newton-Raphson method to the
problem of elastic stability.
 Vibration problems: Irvine (2010) applied the Newton-Raphson method to
vibration problems.
 Power flow equations: Derakhshandeh et al. (2016) introduced high-order
Newton-like methods to solve some power flow equations. Dutto et al.
(2019) extended the Newton-Raphson variants and compared their
performance in solving some power-flow equations.
 Lifetime spectroscopy: Zhu et al. (2017) presented some applications of the
Newton-Raphson method to lifetime spectroscopy for the extraction of
defect parameters.
 Estimation of regression models with missing data: Wang et al. (2002)
applied the Newton Raphson method to the logistic regression model with
missing covariates. Lukusa et al. (2016) employed the Newton-Raphson
method for optimization in the zero-inflated Poisson (ZIP) regression model
with missing covariates. Hiesh et al. (2009, 2010) applied the Newton
Raphson method to semiparametric analysis of randomized response data
with missing covariates in logistic regression. Lee et al. (2012) employed the
Newton-Raphson method for semiparametric estimation of the logistic
regression model with missing covariates and outcomes. Lee et al. (2016)
applied the Newton-Raphson method in the estimation of the closed
capture-recapture model when covariates are missing randomly.
The Newton-Raphson Iteration:
Let x0 be a good estimate of r and let r = x0 + h. Since the true root is r, and h = r −
x0, the number h measures how far the estimate x0 is from the truth. Since h is
‘small,’ we can use the linear (tangent line) approximation to conclude that:

and therefore, unless f’(x0) is close to 0,

Our new improved (?) estimate x1 of r is therefore given by:

The next estimate x2 is obtained from x1 in exactly the same way as x1 was
obtained from x0:

Continue in this way. If xn is the current estimate, then the next estimate xn+1 is
given by:
Example:
Find a root of an equation f(x)=x3-x-1 using Newton Raphson method
Solution:
Here x3-x-1=0

Let f(x)=x3-x-1

∴f′(x)=3x2-1
Here
x 0 1 2
f(x) -1 -1 5

Here f(1)=-1<0andf(2)=5>0

∴ Root lies between 1 and 2

x0=(1+2)/2=1.5
1st iteration :

f(x0)=f(1.5)=0.875

f′(x0)=f′(1.5)=5.75

𝑓(𝑥0)
x1=x0-
𝑓′(𝑥0)

0.875
x1=1.5-
5.75
x1=1.34783
2nd iteration :

f(x1)=f(1.34783)=0.10068

f′(x1)=f′(1.34783)=4.44991
𝑓(𝑥0)
X2=x1-
𝑓′(𝑥0)

x2=1.34783-0.10068/4.44991

x2=1.3252
3rd iteration :

f(x2)=f(1.3252)=0.00206

f′(x2)=f′(1.3252)=4.26847

𝑓(𝑥0)
X3=x2-
𝑓′(𝑥0)

x3=1.3252-0.00206/4.26847

x3=1.32472
4th iteration :

f(x3)=f(1.32472)=0

f′(x3)=f′(1.32472)=4.26463

𝑓(𝑥0)
X4=x3-
𝑓′(𝑥0)

x4=1.32472-04.26463
x4=1.32472
Approximate root of the equation x3-x-1=0 using Newton Raphson method
is 1.32472

n x0 f(x0) f′(x0) x1 Update


1 1.5 0.875 5.75 1.34783 x0=x1
2 1.34783 0.10068 4.44991 1.3252 x0=x1
3 1.3252 0.00206 4.26847 1.32472 x0=x1
4 1.32472 0 4.26463 1.32472 x0=x1

Python Code for Solving the above example:


def f(x):

return x**3 - x - 1

def df(x):

return 3*x**2 - 1

def newton_raphson(f, df, x0, tolerance=1e-6, max_iterations=100):

"""

Newton-Raphson method for finding the root of a function.

Parameters:

f: Function for which we want to find the root.

df: Derivative of the function.

x0: Initial guess for the root.

tolerance: Tolerance level for convergence (default: 1e-6).

max_iterations: Maximum number of iterations (default: 100).

Returns:

The root of the function if it is found within the tolerance,

or None if the maximum number of iterations is reached.

"""

x = x0

for i in range(max_iterations):

fx = f(x)

if abs(fx) < tolerance:

return x

dfx = df(x)

if dfx == 0:

break

x = x - fx / dfx

return None

# Example usage

root = newton_raphson(f, df, 1)

print("Root:", root)
Why Newton-Raphson?
The Newton-Raphson method has several advantages over other numerical
methods for finding roots of equations:
1. Fast convergence: The Newton-Raphson method converges to the root of an
equation at a fast rate, often quadratically. This means that with each iteration,
the number of accurate digits approximately doubles. As a result, it can converge
to the solution in fewer iterations compared to other methods.
2. Efficient for well-behaved functions: If the function and its derivative are well-
behaved and smooth, the Newton-Raphson method can converge quickly and
accurately. It is particularly effective for functions with simple roots.
3. Local convergence: The method converges to a root in the vicinity of the initial
guess. This local convergence property is useful when you have an initial estimate
of the root close to the actual solution.
4. Flexibility: The Newton-Raphson method can be applied to both scalar and
vector equations, allowing for the solution of systems of nonlinear equations. It
can also be extended to find complex roots.

5. Iterative refinement: The method can be refined and improved by employing


techniques such as modified Newton-Raphson or hybrid methods. These
modifications can enhance its stability, efficiency, and applicability to a wider
range of functions.

However, it's important to note that the Newton-Raphson method also has
limitations and considerations:
1. Sensitivity to initial guess: The method heavily relies on an initial guess close to
the root. If the initial guess is far from the root or in the vicinity of a different
root, the method may fail to converge or converge to a different solution.
2. Dependency on the derivative: The Newton-Raphson method requires the
evaluation of the derivative of the function. In some cases, obtaining an accurate
derivative can be challenging or computationally expensive.
3. Possibility of divergence: The method may diverge or oscillate if the derivative
is zero or near zero at the root or if the function exhibits certain behaviors, such
as sharp turns or multiple roots in close proximity.
4. Limited global convergence: The Newton-Raphson method provides local
convergence guarantees, meaning it may not find all possible roots or diverge
when applied to certain functions with complex root structures.
Conclusion:
In conclusion, the Newton-Raphson method is a powerful numerical technique for
finding roots of equations. It offers fast convergence, especially for well-behaved
functions, and provides local convergence guarantees. The method is efficient,
flexible, and can be extended to solve systems of equations and find complex
roots. It is particularly useful when an initial estimate close to the root is available.
However, the Newton-Raphson method also has limitations. It relies heavily on
the initial guess, and if the guess is far from the root or in the vicinity of a
different root, convergence may fail. The method requires the evaluation of the
derivative, which can be challenging or computationally expensive in some cases.
There is also a possibility of divergence or oscillation if certain conditions are met.
Additionally, the method's convergence is limited to the local region and does not
guarantee finding all possible roots or handling complex root structures.
Despite these considerations, the Newton-Raphson method remains a valuable
tool in numerical analysis and is widely used in various fields of mathematics,
science, and engineering. It provides a balance between speed and accuracy and
can be further refined and enhanced with modifications and hybrid approaches.
When applied appropriately and with careful consideration of its limitations, the
Newton-Raphson method can be a reliable and efficient choice for root-finding
problems.

References:
 https://www.researchgate.net/publication/297871911_Application_of_N
ewton-
Raphson_method_in_optimal_design_of_water_distribution_networks
 https://brilliant.org/wiki/newton-raphson-method/
 https://personal.math.ubc.ca/~anstee/math104/newtonmethod.pdf
 https://atozmath.com/example/CONM/Bisection.aspx?q=nr&q1=E1
 https://www.researchgate.net/publication/297871911_Application_of_N
ewton-
Raphson_method_in_optimal_design_of_water_distribution_networks

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy