Download as pdf or txt
Download as pdf or txt
You are on page 1of 24

Newton-Raphson Method

CE 223
BY ENGR. JUNNIE O. RASCO
Newton-Raphson Method
History
Isaac Newton (1643-1727)

Isaac Newton is one of the most


influential scientists in history
and has contributed significantly
to mathematics and physics. His
work laid the foundation for the
method although he did not
publish it in its modern form.
Newton-Raphson Method
History
The name "Newton's method" is
derived from Isaac Newton's
description of a special case of
the method in De analysi per
aequationes numero
terminorum infinitas (written
in 1669, published in 1711 by
William Jones) and in De
metodis fluxionum et
serierum infinitarum (written
in 1671, translated and
published as Method of Fluxions
in 1736 by John Colson).
Newton-Raphson Method
History
Newton's method was first published
in 1685 in A Treatise of Algebra
both Historical and Practical by
John Wallis.
In 1690, Joseph Raphson, an English
mathematician, published a simplified
description in Analysis Aequationum
Universalis. Raphson also applied the
method only to polynomials, but he
avoided Newton's tedious rewriting
process by extracting each successive
correction from the original
polynomial.
Newton-Raphson Method
𝑟𝑖𝑠𝑒
𝑠𝑙𝑜𝑝𝑒 =
𝑟𝑢𝑛

𝑓 𝑥𝑛 − 0
𝑓′ 𝑥𝑛 =
𝑥𝑛 − 𝑥𝑛+1

𝑓 𝑥𝑛
𝑥𝑛 − 𝑥𝑛+1 = ′
𝑓 𝑥𝑛

𝑓(𝑥𝑛 )
𝑥𝑛+1 = 𝑥𝑛 −
𝑓′(𝑥𝑛 )
Newton-Raphson Method
The basic idea behind the Newton-Raphson method is to start with
an initial guess for the root of the equation and then iteratively
refine that guess to get closer and closer to the actual root. Here's
how it works:

1. Start with an initial guess, let's call it x0.


2. Calculate the function value at this guess, f(x0).
3. Calculate the derivative of the function at this guess, f’(x0).
4. Update the guess using the formula:
𝑓(𝑥𝑛 )
𝑥𝑛+1 = 𝑥𝑛 − 𝑓′(𝑥𝑛 )
5. Repeat steps 2-4 with the new guess xn+1 until you reach an
approximation of the root that meets your desired level of
accuracy.
Newton-Raphson Method
The equation 2𝑥 3 + 𝑥 2 − 1 = 0 has exactly one root. Find its
solution, accurate to four decimal places using Newton-Raphson
Method.

Solution:
Assume an interval to check for the possible location of the root.
Say, [0,1]

𝑓 0 =2 0 3 + 0 2 − 1 = −1
𝑓 1 =2 1 3 + 1 2 −1 =2 The sign of the value of f(x) changed,
therefore, the root lies on the interval
Newton-Raphson Method
The process is repeated until the difference between consecutive
guesses (xn+1and xn) becomes very small, indicating that you're
getting close to the root.

The Newton-Raphson method is a powerful tool for finding


solutions to equations, and it can converge quickly if you start
with a reasonably good initial guess. However, it's important to
note that it may not always converge, or it might converge to a
local minimum or maximum instead of the desired root.
Additionally, it can be sensitive to the choice of the initial guess.
Newton-Raphson Method
𝑓 𝑥 = 2𝑥 3 + 𝑥 2 − 1
𝑓′ 𝑥 = 6𝑥 2 + 2𝑥

Let x0=1

1st iteration
.75 − 1
% 𝑒𝑟𝑟𝑜𝑟 = ∗ 100 = 33.33%
.75
𝑓 𝑥0
𝑥1 = 𝑥0 −
𝑓′ 𝑥0

2 1 3+ 1 2 −1
𝑥1 = 1 − 2
= .75
6 1 +2 1
Newton-Raphson Method
2nd iteration
𝑓 𝑥1 2
𝑥2 = 𝑥1 − 3 − .75
𝑓′ 𝑥1 % 𝑒𝑟𝑟𝑜𝑟 = ∗ 100 = 12.5%
2
3
2 .75 3 + .75 2 − 1 2
𝑥2 = .75 − 2
=
6 .75 + 2 .75 3

3rd iteration
𝑓 𝑥2
𝑥3 = 𝑥2 −
𝑓′ 𝑥2 2
. 6574 − 3
3 2 % 𝑒𝑟𝑟𝑜𝑟 = ∗ 100 = 1.41%
2 2 .6574
2 2 3 + 3 −1
𝑥3 = − 2 = 0.6574
3 2 2
6 3 +2 3
Newton-Raphson Method
4th iteration
𝑓 𝑥3
𝑥4 = 𝑥3 −
𝑓′ 𝑥3

2 0.6574 3 + 0.6574 2 − 1
𝑥4 = 0.6574 − 2
= 0.6573
6 0.6574 + 2 0.6574

.6573 − .6574
% 𝑒𝑟𝑟𝑜𝑟 = ∗ 100 = 0.02%
.6573
Newton-Raphson Method
Assignment
Part 1
Newton-Raphson Method
The equation 𝑒 𝑥 + 𝑥 − 4 = 0 has exactly one root. Find its solution,
accurate to four decimal places using Newton-Raphson Method.

Solution:
Assume an interval to check for the possible location of the root.
Say, [1,2]
Newton-Raphson Method
Newton-Raphson Method
3𝑅 − ℎ 𝜋ℎ 3
𝑉 = 𝜋ℎ2 𝑉 = 𝜋𝑅ℎ2 −
3 3
3
𝜋ℎ
30 = 3𝜋ℎ2 − 90 = 9𝜋ℎ2 − 𝜋ℎ3 𝑓 ℎ = 𝜋ℎ3 − 9𝜋ℎ2 + 90
3

Solution:
Assume an interval to check for the possible location of the root.
Say, [8,9]
The sign of the value of f(x)
𝑓 8 = 𝜋(8)3 −9𝜋 8 2
+ 90 = −111.06 changed, therefore, the root
𝑓 9 = 𝜋(9)3 −9𝜋 9 2 + 90 = 90 lies on the interval
Newton-Raphson Method
𝑓 ℎ = 𝜋ℎ3 − 9𝜋ℎ2 + 90
𝑓′ ℎ = 3𝜋ℎ2 − 18𝜋ℎ

Let h0 = 9

1st iteration
8.6463 − 9
𝑓 ℎ0 % 𝑒𝑟𝑟𝑜𝑟 = ∗ 100 = 4.09%
ℎ1 = ℎ0 − 8.6463
𝑓′ ℎ0

𝜋 9 3 − 9𝜋 9 2 + 90
ℎ1 = 9 − 2
= 8.6463
3𝜋 9 − 18𝜋 9
Newton-Raphson Method
2nd iteration
𝑓 ℎ1 8.6142 − 8.6463
ℎ2 = ℎ1 − % 𝑒𝑟𝑟𝑜𝑟 = ∗ 100 = .37%
𝑓′ ℎ1 8.6142

𝜋 8.6463 3 − 9𝜋 8.6463 2 + 90
ℎ2 = 8.6463 − 2
= 8.6142
3𝜋 8.6463 − 18𝜋 8.6463

3rd iteration % 𝑒𝑟𝑟𝑜𝑟 =


8.6139 − 8.6142
∗ 100 = 0.0035%
𝑓 ℎ2 8.6139
ℎ3 = ℎ2 −
𝑓′ ℎ2

𝜋 8.6142 3 − 9𝜋 8.6142 2 + 90
ℎ3 = 8.6142 − 2
= 8.6139
3𝜋 8.6142 − 18𝜋 8.6142
Newton-Raphson Method
Assignment
Part 2
Newton-Raphson Method
3𝑅 − ℎ 𝜋ℎ 3
𝑉 = 𝜋ℎ2 𝑉 = 𝜋𝑅ℎ2 −
3 3
3
𝜋ℎ
30 = 3𝜋ℎ2 − 90 = 9𝜋ℎ2 − 𝜋ℎ3 𝑓 ℎ = 𝜋ℎ3 − 9𝜋ℎ2 + 90
3

Solution:
Assume an interval to check for the possible location of the root.
Say, [1,3]
Newton-Raphson Method
Practical Applications

The Newton-Raphson can be utilized in practical applications in


various fields including but not limited to:

1. Engineering: Finding solutions to nonlinear equations in


structural analysis.
2. Science: Solving complex equations in physics and chemistry.
3. Finance: Calculating implied volatility in option pricing.
4. Machine learning: Training algorithms that require solving
optimization problems.
Newton-Raphson Method
Advantages of the Method

The Newton-Raphson method has several advantages that make it


a popular choice for finding approximate solutions to the roots of
real-valued functions. A few of them are:

1. Rapid Convergence
2. Accurate results when a good initial guess is available
3. Efficiency and Versatility
Newton-Raphson Method
Disadvantages of the Method

Although the Newton-Raphson method is often efficient, there are


situations where it performs poorly. There are a few disadvantages
such as:

1. Sensitivity to Initial Guess


2. Convergence Behavior

You might also like