0% found this document useful (0 votes)
13 views45 pages

Solutions of Nonlinerar Equations

The document outlines the course CVE326 on Numerical Solutions to Civil Engineering problems, detailing topics covered in midterms and finals, including methods for solving nonlinear equations, systems of linear equations, numerical integration, and ordinary differential equations. It also specifies course requirements and grading criteria. The bisection method is highlighted as a key numerical technique for finding roots of nonlinear equations.

Uploaded by

Fedor Emperor
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)
13 views45 pages

Solutions of Nonlinerar Equations

The document outlines the course CVE326 on Numerical Solutions to Civil Engineering problems, detailing topics covered in midterms and finals, including methods for solving nonlinear equations, systems of linear equations, numerical integration, and ordinary differential equations. It also specifies course requirements and grading criteria. The bisection method is highlighted as a key numerical technique for finding roots of nonlinear equations.

Uploaded by

Fedor Emperor
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/ 45

NUMERICAL SOLUTIONS

About the Subject


Subject: Numerical Solutions to CE Problems
Code: CVE326
Schedule: B3 (8:00-12:30)
Units: Lec-2, Lab-2.25
Room: SB 302
Teacher: Sanddy H. Madera
Topics
Midterm:
1. Solutions of Nonlinear Equations
1.1 Bracketing Methods
1.1a Bisection Method
1.1b False Position Method
2. Fixed Point Method
2.2a Newton’s Method
2.2b The Secant Method
Topics
Midterm:
2. Systems of Linear Equations
2.1 Gaussian Elimination Method
2.2 LU-Decomposition Method
2.3 Gauss-Seidel Method
2.4 Gauss-Jacobi Method
Topics
Midterm:
3. The Interpolating Polynomial
3.1 The Langrange Form of the Interpolating Polynomials
3.2 The Method of Undetermined Coeficients
3.3 Divided Differences
3.4 Newton’s Forward-Difference and Backward-Difference Formulas
3.5 Error of Polynomial Interpolation
Topics
Final:
1. Numerical Integration and Differentiation
1.1 Numerical Differentiation using the Interpolating Polynomial
1.2 Newton-Cotes Formulas
1.3 Composite Rules for Numerical Integration
1.3a Trapeziodal Rule
1.3b Simpson’s 1/3 Rule
1.3c Simpson’s 3/8 Rule
1.3d Romberg Integration
1.3e Gaussian Integration
1.3f Errors of Quadrature Formulas
Topics
Final:
2. Numerical Solutions of Ordinary Differential Equations
2.1 One Step Methods
2.1a Euler’s Method
2.1b Taylor’s Series Methods of Order k
2.1c Runge-Kutta Methods
2.2 Linear Multi-Step Methods
2.2a Adam’s Method as Predictor-Corrector Methods
2.2b Milne’s Method
Topics
Final:
3. Eigenvalues and Eigen Vectors
3.1 Power Method
3.2 Inverse Power Method
3.3 Reyleigh Quotients
Subject Requirements
• Attendance & Class Standing – 5%
• Quizzes and Problems Sets – 20%
• Laboratory Exercise and Machine Problems – 30%
• Capstone Project – 15%
• Major Exams – 30%
Solutions of Nonlinear Equations
A nonlinear equation is an equation in which the variable(s) are not all raised only to the first power and
do not appear in a straight-line form. In other words, the relationship between the variables is not
linear—meaning it cannot be represented by a straight line when graphed.

Root/s
Solutions of Nonlinear Equations
Key Characteristics:
•May have more than one root (or no real root at all)
•Cannot be solved using basic algebraic methods alone
•Often require numerical methods or graphical solutions
•Graph is not a straight line

Numerical analysis is the study of techniques for finding approximate


solutions to mathematical problems that cannot be solved exactly.

Numerical solutions are approximate answers obtained


through iterative algorithms using calculators or computers.
Solutions of Nonlinear Equations
Numerical Methods:
1.1 Bracketing Methods
1.1a Bisection Method
1.1b False Position Method
2. Fixed Point Methods
2.1a The Fixed Point Problem
2.2b Newton’s Method
3. The Secant Method
Bracketing Methods
Bisection Method

Bracketing methods are numerical techniques used to find the root of a nonlinear equation 𝑓(𝑥) = 0 by starting
with two initial guesses that bracket or "trap" the root — meaning one gives a positive value and the other a
negative one.

𝑓(𝑏)
𝑓(𝑐)

(𝑥, 𝑓 𝑥 )
𝑎
𝑐 𝑏

𝑓(𝑎)
Bracketing Methods
Bisection Method
Bisection Method
Goal: Repeatedly divide the interval [a,b] in half to narrow in on the root.
Example
Determine the root of 3𝑥 4 + 7𝑥 3 − 15𝑥 2 + 5𝑥 = 17 between [0,2]. Use the bisection method and
perform seven iterations

Initial Step:

3𝑥 4 + 7𝑥 3 − 15𝑥 2 + 5𝑥 = 17 𝑓 𝑥 = 3𝑥 4 + 7𝑥 3 − 15𝑥 2 + 5𝑥 − 17

Step 1:

𝑓 0 = 3(0)4 +7(0)3 −15 0 2 + 5 0 − 17 = −17

𝑓 2 = 3(2)4 +7(2)3 −15 2 2 + 5 2 − 17 = 37

Since 𝑓 0 * 𝑓 2 < 0, hence 𝑓 𝑥 contains at least one root between [0,2].


Example
Determine the root of 3𝑥 4 + 7𝑥 3 − 15𝑥 2 + 5𝑥 = 17 between [0,2]. Use the bisection method and
perform seven iterations
Iterations 𝑎 𝑐 𝑏 𝑓(𝑎) 𝑓(𝑐) 𝑓(𝑏) New Interval
1 0 1 2 −17 −17 37 [1,2]

𝑎+𝑏 0+2
Step 2: 𝑐= = =1
2 2

Step 3: 𝑓 1 = 3(1)4+7(1)3 −15 1 2 + 5 1 − 17 = −17


Example
Determine the root of 3𝑥 4 + 7𝑥 3 − 15𝑥 2 + 5𝑥 = 17 between [0,2]. Use the bisection method and
perform seven iterations
Iterations 𝑎 𝑐 𝑏 𝑓(𝑎) 𝑓(𝑐) 𝑓(𝑏) New Interval
1 0 1 2 −17 −17 37 [1,2]
2 1 1.5 2 −17 −4.4375 37 [1.5,2]

𝑎+𝑏 1+2
Step 2: 𝑐 = 2 = 2 = 1.5

Step 3: 𝑓 1 = 3(1.5)4 +7(1.5)3 −15 1.5 2 + 5 1.5 − 17 = −4.4375


Example
Determine the root of 3𝑥 4 + 7𝑥 3 − 15𝑥 2 + 5𝑥 = 17 between [0,2]. Use the bisection method and
perform seven iterations
Iterations 𝑎 𝑐 𝑏 𝑓(𝑎) 𝑓(𝑐) 𝑓(𝑏) New Interval
1 0 1 2 −17 −17 37 [1,2]
2 1 1.5 2 −17 −4.4375 37 [1.5,2]
3 1.5 1.75 2 −4.4375 11.46484375 37 [1.5,1.75]

𝑎 + 𝑏 1.5 + 2
Step 2: 𝑐 = 2
=
2
= 1.75

Step 3: 𝑓 1 = 3(1.75)4 +7(1.75)3 −15 1.75 2 + 5 1.75 − 17 = 11.4648437


Example
Determine the root of 3𝑥 4 + 7𝑥 3 − 15𝑥 2 + 5𝑥 = 17 between [0,2]. Use the bisection method and
perform seven iterations
Iterations 𝑎 𝑐 𝑏 𝑓(𝑎) 𝑓(𝑐) 𝑓(𝑏) New Interval
1 0 1 2 −17 −17 37 [1,2]
2 1 1.5 2 −17 −4.4375 37 [1.5,2]
3 1.5 1.75 2 −4.4375 11.46484375 37 [1.5,1.75]
4 1.5 1.625 1.75 −4.4375 2.471435547 11.46484375 [1.5,1.625]

𝑎 + 𝑏 1.5 + 1.75
Step 2: 𝑐 = 2
=
2
= 1.625

Step 3: 𝑓 1 = 3(1.625)4 +7(1.625)3 −15 1.625 2 + 5 1.625 − 17 = 2.471435547


Example
Determine the root of 3𝑥 4 + 7𝑥 3 − 15𝑥 2 + 5𝑥 = 17 between [0,2]. Use the bisection method and
perform seven iterations
Iterations 𝑎 𝑐 𝑏 𝑓(𝑎) 𝑓(𝑐) 𝑓(𝑏) New Interval
1 0 1 2 −17 −17 37 [1,2]
2 1 1.5 2 −17 −4.4375 37 [1.5,2]
3 1.5 1.75 2 −4.4375 11.46484375 37 [1.5,1.75]
4 1.5 1.625 1.75 −4.4375 2.471435547 11.46484375 [1.5,1.625]
5 1.5 1.5625 1.625 −4.4375 −1.224319458 2.471435547 [1.5625,1.625]

𝑎 + 𝑏 1.5 + 1.625
Step 2: 𝑐 = 2
=
2
= 1.5625

Step 3: 𝑓 1 = 3(1.5625)4 +7(1.5625)3 −15 1.5625 2 + 5 1.5625 − 17 = −1.224319458


Example
Determine the root of 3𝑥 4 + 7𝑥 3 − 15𝑥 2 + 5𝑥 = 17 between [0,2]. Use the bisection method and
perform seven iterations
Iterations 𝑎 𝑐 𝑏 𝑓(𝑎) 𝑓(𝑐) 𝑓(𝑏) New Interval
1 0 1 2 −17 −17 37 [1,2]
2 1 1.5 2 −17 −4.4375 37 [1.5,2]
3 1.5 1.75 2 −4.4375 11.46484375 37 [1.5,1.75]
4 1.5 1.625 1.75 −4.4375 2.471435547 11.46484375 [1.5,1.625]
5 1.5 1.5625 1.625 −4.4375 −1.224319458 2.471435547 [1.5625,1.625]
6 1.5625 1.59375 1.625 −1.224319458 0.560870171 2.471435547 [1.5625,1.59375]

𝑎 + 𝑏 1.5625 + 1.625
Step 2: 𝑐 = 2
=
2
= 1.59375

Step 3: 𝑓 1 = 3(1.59375)4 +7(1.59375)3 −151.59375)2 + 5(1.59375) − 17 = 0.560870171


Example
Determine the root of 3𝑥 4 + 7𝑥 3 − 15𝑥 2 + 5𝑥 = 17 between [0,2]. Use the bisection method and
perform seven iterations
Iterations 𝑎 𝑐 𝑏 𝑓(𝑎) 𝑓(𝑐) 𝑓(𝑏) New Interval
1 0 1 2 −17 −17 37 [1,2]
2 1 1.5 2 −17 −4.4375 37 [1.5,2]
3 1.5 1.75 2 −4.4375 11.46484375 37 [1.5,1.75]
4 1.5 1.625 1.75 −4.4375 2.471435547 11.46484375 [1.5,1.625]
5 1.5 1.5625 1.625 −4.4375 −1.224319458 2.471435547 [1.5625,1.625]
6 1.5625 1.59375 1.625 −1.224319458 0.560870171 2.471435547 [1.5625,1.59375]
7 1.5625 1.578125 1.59375 −1.224319458 −0.34709817171 0.560870171 [1.578125,1.59375

𝑎 + 𝑏 1.5625 + 1.59375
Step 2: 𝑐 = 2
=
2
= 1.578125

Step 3: 𝑓 1 = 3(1.59375)4 +7(1.59375)3 −151.59375)2 + 5(1.59375) − 17 = −0.34709817171


0.10300548

Example
Determine the root of 3𝑥 4 + 7𝑥 3 − 15𝑥 2 + 5𝑥 = 17 between [0,2]. Use the bisection method and
perform seven iterations
Iterations 𝑎 𝑐 𝑏 𝑓(𝑎) 𝑓(𝑐) 𝑓(𝑏) New Interval
7 1.5625 1.578125 1.59375 −1.224319458 −0.34709817171 0.560870171 [1.578125,1.59375

Thus, the approximate value of x with 7 iterations is


1.578125 + 1.59375
𝑐= = 1.5859375
2
𝑓 1.5859375 = 3(1.59375)4 +7(1.59375)3 −151.59375)2 + 5(1.59375) − 17 = 0.103005480021238

In 14th iteration, 𝑐 = 1.58416748046875 with 𝑓 1.58416748046875 = 0.000351547850947043. This is


accurate to the nearest thousandths of the true root between [0,2].
Bisection Method

Advantages:
•Always converges (if f is continuous)
•Simple and reliable

Disadvantages:
•Slower compared to other methods
•Requires initial interval with sign change
False Position Method (Regula Falsi Method)
Goal: Improve bisection method by using a linear interpolation between 𝑎 and 𝑏 to estimate the root more
accurately.
Equation of a line with slope and one point
𝑦2 − 𝑦1
𝑦 − 𝑦1 = (𝑥 − 𝑥1 )
𝑥2 − 𝑥1
𝑓(𝑏)
𝑓(𝑐) 𝑦2 − 𝑦1 𝑓 𝑏 − 𝑓(𝑎)
𝑚= =
𝑥2 − 𝑥1 𝑏−𝑎
(𝑥, 𝑓 𝑥 )
𝑎 𝑐, 0 : One Point
𝑐 𝑏
False Position
𝑓 𝑏 − 𝑓(𝑎)
0 − 𝑓(𝑎) = (𝑐 − 𝑎)
𝑏−𝑎
−𝑓(𝑎)(𝑏 − 𝑎)
𝑓(𝑎) 𝑐=𝑎−
𝑓 𝑏 − 𝑓(𝑎)
−𝑓(𝑎)(𝑏 − 𝑎)
𝑐=𝑎−
𝑓 𝑏 − 𝑓(𝑎)
𝑎𝑓 𝑏 − 𝑏𝑓(𝑎)
𝑐=
𝑓 𝑏 − 𝑓(𝑎)
False Position Method (Regula Falsi Method)
Goal: Improve bisection method by using a linear interpolation between 𝑎 and 𝑏 to estimate the root more
accurately.

𝑓(𝑏)
𝑓(𝑐)
False position
𝑎𝑓 𝑏 − 𝑏𝑓(𝑎) (𝑥, 𝑓 𝑥 )
𝑐= 𝑎
𝑓 𝑏 − 𝑓(𝑎) 𝑐 𝑏
False Position

𝑓(𝑎)
Example
Determine the root of 3𝑥 4 + 7𝑥 3 − 15𝑥 2 + 5𝑥 = 17 between [0,2]. Use the false position method and
perform seven iterations

Initial Step:

3𝑥 4 + 7𝑥 3 − 15𝑥 2 + 5𝑥 = 17 𝑓 𝑥 = 3𝑥 4 + 7𝑥 3 − 15𝑥 2 + 5𝑥 − 17

Step 1:

𝑓 0 = 3(0)4 +7(0)3 −15 0 2 + 5 0 − 17 = −17

𝑓 2 = 3(2)4 +7(2)3 −15 2 2 + 5 2 − 17 = 37

Since 𝑓 0 * 𝑓 2 < 0, hence 𝑓 𝑥 contains at least one root between [0,2].


Example
Determine the root of 3𝑥 4 + 7𝑥 3 − 15𝑥 2 + 5𝑥 = 17 between [0,2]. Use the bisection method and
perform seven iterations
Iterations 𝑎 𝑐 𝑏 𝑓(𝑎) 𝑓(𝑐) 𝑓(𝑏) New Interval
1 0 0.62962963 2 −17 −17.5796316053899 37 [1,2]

𝑎𝑓 𝑏 − 𝑏𝑓(𝑎) 0 37 − 2(−17) 34
Step 2: 𝑐=
𝑓 𝑏 − 𝑓(𝑎) = 37 − (−17) = 54 = 0.62962963

Step 3: 𝑓 1 = 3(1)4+7(1)3 −15 1 2 + 5 1 − 17 = −17.5796316053899


Example
Determine the root of 3𝑥 4 + 7𝑥 3 − 15𝑥 2 + 5𝑥 = 17 between [0,2]. Use the bisection method and
perform seven iterations
Iterations a c b f(a) f(c) f(b)
1 0 0.62962963 2 -17.00000000000 -17.57963160539 37.00000000000
2 0.62962962963 1.071014182 2 -17.57963160539 -16.30397352411 37.00000000000
3 1.07101418217 1.355161107 2 -16.30397352411 -10.23243534134 37.00000000000
4 1.355161107 1.494859013 2 -10.23243534134 -4.68147904868 37.00000000000
5 1.494859013 1.55159421 2 -4.68147904868 -1.81868979709 37.00000000000
6 1.55159421 1.572602416 2 -1.81868979709 -0.66063056860 37.00000000000
7 1.572602416 1.580099686 2 -0.66063056860 -0.23405888563 37.00000000000
8 1.580099686 1.582739242 2 -0.23405888563 -0.08219061868 37.00000000000
9 1.582739242 1.583664078 2 -0.08219061868 -0.02877111751 37.00000000000
10 1.583664078 1.583987568 2 -0.02877111751 -0.01006036496 37.00000000000
11 1.583987568 1.584100652 2 -0.01006036496 -0.00351644415 37.00000000000
12 1.584100652 1.584140175 2 -0.00351644415 -0.00122895315 37.00000000000
13 1.584140175 1.584153987 2 -0.00122895315 -0.00042948354 37.00000000000
Thus, the approximate value of x is
𝑐 = 1.584153987
𝑓(1.584153987 = 3(1.584153987)4+7(1.584153987)3 −15(1.584153987)2+5(1.584153987) − 17
= −0.0004294835
This is accurate to the nearest thousandths of the true root between [0,2].
Advantages of False Position Method
1.Faster than Bisection (Usually):
It often converges more quickly because it uses linear interpolation rather than simply halving the interval.
2.Guaranteed Convergence (if root is bracketed):
As long as the initial guesses bracket the root and f(x)f(x) is continuous, it will converge.
3.Simple Concept:
Based on a geometric idea (finding where a straight line between two points crosses the x-axis), making it easy to understand and
visualize.
4.Better Approximation Early On:
Especially when the function behaves nearly linearly between the brackets, it can give a good estimate faster than other methods.

Disadvantages of False Position Method


1.Slower Convergence in Some Cases:
If one end of the interval stays fixed (because the function’s value barely changes there), the method may get stuck and converge
very slowly.
2.Requires Sign Change:
Like bisection, it requires the initial interval to satisfy f(a)⋅f(b)<0f(a)⋅f(b)<0. You can’t start unless you already know the root is
bracketed.
3.Does Not Always Halve the Interval:
Unlike bisection, the size of the interval may not shrink symmetrically, especially for skewed functions.
4.Not Suitable for Multiple Roots:
It may fail or behave poorly if there are multiple roots close together in the interval.
Fixed Point Methods

Fixed-point methods are a family of iterative numerical techniques used to solve equations by finding a
value x that satisfies:
𝑥 = 𝑔(𝑥)
This value x is called a fixed point, because once the function is applied, it maps back to itself — it stays
fixed.
Example:
3
𝑓 𝑥 = 𝑥2 + 2𝑥 − 3 𝑥 = 𝑔(𝑥) ;𝑔 𝑥 =
𝑥+2
; 𝑔 𝑥 = 3 − 2𝑥
3 − 𝑥2
;𝑔 𝑥 =
2
Basic Fixed Point Iteration
𝑦 = 𝑔(𝑥) intersection
𝑓 𝑥 =0 𝑥 = 𝑔(𝑥) Root/s of the nonlinear equation
𝑦=𝑥
𝑦=𝑥
𝑦 = 𝑔(𝑥)

𝑦 = 𝑔(𝑥0) 𝑥1 = 𝑔(𝑥0)
𝑦 = 𝑔(𝑥1 ) 𝑥2 = 𝑔(𝑥1 )
.
.
𝑥0 𝑥1 𝑥2 …
𝑥 .
𝑦 = 𝑔(𝑥𝑛 ) 𝑥𝑛+1 = 𝑔(𝑥𝑛 )
𝑟𝑜𝑜𝑡𝑠 𝑎𝑟𝑒 1.618 and −0.618
Determine the root of 𝑥 2 − 𝑥 − 1 = 0 . Use the basic fixed point iteration method

𝑥=
1 1
𝑥+1 𝑥 =1+ 𝑥 = 𝑥2 − 1
𝑥
1
𝑥𝑛+1 = 1 𝑥𝑛+1 = 𝑥𝑛 2 − 1
𝑥𝑛 +1 𝑥𝑛+1 =1+
𝑥𝑛

iterations 𝑥𝑛 𝑥𝑛+1 iterations 𝑥𝑛 𝑥𝑛+1 iterations 𝑥𝑛 𝑥𝑛+1


1 1 0.5 1 1 2 1 1 0
2 0.5 0.666666667 2 2 1.5 2 0 -1
3 0.666666667 0.6 3 1.5 1.66666667 3 -1 0
4 0.6 0.625 4 1.66666667 1.6 4 0 -1
5 0.625 0.615384615 5 1.6 1.625 5 -1 0
6 0.615384615 0.619047619 6 1.625 1.61538462 6 0 -1
7 0.619047619 0.617647059 7 1.61538462 1.61904762
8 0.617647059 0.618181818 8 1.61904762 1.61764706 𝐷𝑖𝑣𝑒𝑟𝑔𝑒𝑛𝑡
9 0.618181818 0.617977528 9 1.61764706 1.61818182
10 0.617977528 0.618055556 10 1.61818182 1.61797753
Advantages of Fixed-Point Iteration
1.Simplicity:
1. Easy to understand and implement. The basic idea is just plugging a value into a
function repeatedly.
2.Low Computational Cost:
1. Each iteration requires only one function evaluation—no need to calculate
derivatives like in Newton-Raphson.
3.Useful for Convergence Analysis:
1. Helps in understanding the behavior of iterative methods and the role of
contraction mappings.
4.Can Be Used When Derivatives Are Hard to Compute:
1. Good alternative when the function’s derivative (needed in methods like
Newton-Raphson) is difficult or expensive to calculate.
Disadvantages of Fixed-Point Iteration
1.Convergence Not Guaranteed:
1.The method only converges if the function g(x)g(x) satisfies certain
conditions (like being a contraction on the interval). If not, the iteration
may diverge.
2.Slow Convergence:
1.Even when it converges, it can do so very slowly compared to other
methods like Newton-Raphson or Secant method.
3.Sensitive to Initial Guess:
1.A poor initial guess can lead to divergence or convergence to a wrong
solution.
4.Requires Proper Function Rearrangement:
1.You need to express the original equation 𝑓 𝑥 = 0 as 𝑥 = 𝑔(𝑥)
appropriately, and not every rearrangement leads to convergence.
Newton-Raphson Method

Equation of a line with slope and one point


𝑦2 − 𝑦1
𝑦 − 𝑦1 = (𝑥 − 𝑥1)
𝑥2 − 𝑥1
0 − 𝑓(𝑥𝑛 ) = 𝑓′(𝑥𝑛 )(𝑥𝑛+1 − 𝑥𝑛 )
𝑓(𝑥𝑛 )
− = (𝑥𝑛+1 − 𝑥𝑛 )
𝑓(𝑥𝑛 ) 𝑓′(𝑥𝑛 )
𝑓(𝑥𝑛 )
𝑥𝑛+1 = 𝑥𝑛 −
𝑓′(𝑥𝑛 )

𝑥 𝑥𝑛+1 𝑥𝑛
Newton-Raphson Method
Determine the root of 𝑥 2 − 𝑥 − 1 = 0 𝑟𝑜𝑜𝑡𝑠 𝑎𝑟𝑒 1.618 and −0.618

𝑓 𝑥 = 𝑥2 − 𝑥 − 1
𝑓 ′ 𝑥 = 2𝑥 − 1

Iterations 𝑥𝑛 𝑓(𝑥𝑛 ) 𝑓′(𝑥𝑛 ) 𝑥𝑛+1


1 1 -1 1 2
2 2 1 3 1.66666667
3 1.66666667 0.111111111 2.33333333 1.61904762
4 1.61904762 0.002267574 2.23809524 1.61803445
5 1.61803445 0.00000102651593 2.2360689 1.61803399
6 1.61803399 0.00000000000021 2.23606798 1.61803399
Newton-Raphson Basic Steps
Advantages of Newton-Raphson Method
1.Fast Convergence:
1. When close to the root, convergence is quadratic, meaning the error
decreases very quickly with each iteration.
2.Efficient for Well-Behaved Functions:
1. Often requires fewer iterations compared to other methods like bisection or
fixed-point iteration.
3.High Accuracy:
1. Delivers highly accurate results with relatively few steps (again, assuming a
good starting point).
4.Widely Applicable:
1. Useful in many scientific, engineering, and financial applications for solving
nonlinear equations.
Disadvantages of Newton-Raphson Method
1.Needs Derivative:
1. You must compute or know the derivative f′(x)f′(x), which may be complex or
unavailable.
2.Not Always Convergent:
1. It may diverge if:
1.The initial guess is far from the root.
2.The function has inflection points or local extrema near the guess.
3.f′(x) is zero or near-zero, causing division by a small number (leading to
instability).
3.Sensitive to Initial Guess:
1. A poor choice of x​ can lead to divergence or convergence to the wrong root.
4.No Bracketing:
1. Unlike methods like the bisection method, Newton-Raphson doesn’t guarantee
the root lies within an interval—it just keeps updating based on tangents.
Secant Method

𝑓(𝑥𝑛 )
𝑥𝑛+1 = 𝑥𝑛 −
𝑓 𝑥𝑛 − 𝑓(𝑥𝑛−1 )
𝑥𝑛 − 𝑥𝑛−1 𝑓(𝑥𝑛 )

Formula:
𝑥 𝑥𝑛+1 𝑥𝑛−1 𝑥𝑛
Secant Method
Determine the root of 𝑥 2 − 𝑥 − 1 = 0 𝑟𝑜𝑜𝑡𝑠 𝑎𝑟𝑒 1.618 and −0.618

Iterations 𝑥𝑛 𝑥𝑛−1 𝑓(𝑥𝑛 ) 𝑓(𝑥𝑛−1 ) 𝑥𝑛+1


1 1.5 0 -0.25 -1.000000000000000 2.00000000000000

2 2 1.5 1 -0.250000000000000 1.60000000000000


3 1.6 2 -0.04 1.000000000000000 1.61538461538462

4 1.615384615 1.6 -0.0059171597633134200 -0.040000000000000 1.61805555555556

5 1.618055556 1.615384615 0.0000482253086422357 -0.005917159763313 1.61803396316671

6 1.618033963 1.618055556 -0.0000000572057476944 0.000048225308642 1.61803398874965


End.

You might also like