Professional Documents
Culture Documents
NEWTON-RAPHSON METHOD
Based on forming the tangent line to the f(x) curve at some
guess point x, then following the tangent line to where it crosses
the x-axis
𝑠𝑙𝑜𝑝𝑒 𝑓 𝑥 tan 𝜃
f(xi )
𝑓 𝑥 xi 1 = xi -
f ' (xi )
This equation can be thought of 𝜃
NEWTON-RAPHSON METHOD
You can also think of it using Taylor’s series:
The point at which this equation has an answer is when f(x)=0, thus
Numerical Methods Course
Dr. Khaled Ahmida
NEWTON-RAPHSON METHOD
Newton-Raphson Method is called “open method” because it is not bracketed
The function to be solved should be continuous and differentiable
the 1st derivative is always needed
f(xi )
xi 1 = xi -
f ' (xi )
Numerical Methods Course
Dr. Khaled Ahmida
NEWTON-RAPHSON METHOD
input x0, tol
Flowchart:
delta = -f(x)/df(x)
x=x+delta
Solution
obtaind
x
no
yes
end
Numerical Methods Course
Dr. Khaled Ahmida
NEWTON-RAPHSON METHOD
Example: Graph of y=f(x)
3
2.5
f ( x) x sin( x) 1
2
1.5
df ( x)
2 x sin( x) x 2 cos( x)
1
y
dx 0.5
-0.5
-1
0 0.2 0.4 0.6 0.8 1 1.2 1.4 1.6 1.8 2
x
Numerical Methods Course
Dr. Khaled Ahmida
NEWTON-RAPHSON METHOD
Example: results
NEWTON-RAPHSON METHOD
Difficulties: Newton-Raphson method may
diverge and root is hard to find
There is no simple method to avoid this
kind of problems. Graphing may help
Numerical Methods Course
Dr. Khaled Ahmida
NEWTON-RAPHSON METHOD
1D (1-equation in 1 variable), 2D (2 equations in 2 variables)
nD (n equations in n variables)
x2 6x 9 0
1D non-linear eqn.
x cos( x) 0
e x log( x 2 ) x cos( x) 0
y 2 (1 x) x 3
2D non-linear eqn.
x2 y2 1
Numerical Methods Course
Dr. Khaled Ahmida
NEWTON-RAPHSON METHOD
Numerical Methods Course
Dr. Khaled Ahmida
NEWTON-RAPHSON METHOD
Why do we need Newton-Raphson method in 2D?
For linear system of equations, we can use Gauss elimination, Gauss
Seidel, …etc.
y 2 (1 x) x 3
how to solve these?
x y 1
2 2