Professional Documents
Culture Documents
We use cookies to improve your experience on our site and to show you relevant advertising. By browsing this website, you agree to our use of cookies. Learn more Accept
Support us
I want to sell my website www.AtoZmath.com with complete code
Ad
Algorithm
Secant method Steps (Rule)
Step-1:
( ) ( )
Find points x 0 and x 1 such that x 0 < x 1 and f x 0 ⋅ f x 1 < 0.
x 0 ⋅ f (x 1 ) - x 1 ⋅ f (x 0 )
or Formula-2 : x 2 =
f (x 1 ) - f (x 0 )
https://atozmath.com/example/CONM/Bisection.aspx?q=se&q1=E1 1/4
7/15/23, 2:42 PM Secant method Algorithm & Example-1 f(x)=x^3-x-1
x1 - x0
( )
or Formula-3 : x 2 = x 1 - f x 1 ⋅
( ) ( )
f x1 - f x0
(Using any of the formula, you will get same x2 value)
Step-3:
( )
If f x 2 = 0 then x 2 is an exact root,
else x 0 = x 1 and x 1 = x 2
Step-4:
()
Repeat steps 2 & 3 until f x i = 0 or f x i| ( )| ≤ Accuracy
Example-1
Find a root of an equation f(x) = x 3 - x - 1 using Secant method
Solution:
Here x 3 - x - 1 = 0
Let f(x) = x 3 - x - 1
Here
x 0 1 2
f(x) -1 -1 5
1 st iteration :
x 0 = 1 and x 1 = 2
( ) ( )
f x 0 = f(1) = - 1 and f x 1 = f(2) = 5
x1 - x0
∴ x2 = x0 - f x0 ⋅( )
( ) ( )
f x1 - f x0
2-1
x 2 = 1 - ( - 1) ×
5 - ( - 1)
x 2 = 1.16667
( )
∴ f x 2 = f(1.16667) = - 0.5787
2 nd iteration :
x 1 = 2 and x 2 = 1.16667
( ) ( )
f x 1 = f(2) = 5 and f x 2 = f(1.16667) = - 0.5787
x2 - x1
∴ x3 = x1 - f x1 ⋅( )
( ) ( )
f x2 - f x1
1.16667 - 2
x3 = 2 - 5 ×
- 0.5787 - 5
x 3 = 1.25311
( )
∴ f x 3 = f(1.25311) = - 0.28536
( ) ( )
f x 2 = f(1.16667) = - 0.5787 and f x 3 = f(1.25311) = - 0.28536
https://atozmath.com/example/CONM/Bisection.aspx?q=se&q1=E1 2/4
7/15/23, 2:42 PM Secant method Algorithm & Example-1 f(x)=x^3-x-1
x3 - x2
( )
∴ x4 = x2 - f x2 ⋅
( ) ( )
f x3 - f x2
1.25311 - 1.16667
x 4 = 1.16667 - ( - 0.5787) ×
- 0.28536 - ( - 0.5787)
x 4 = 1.33721
( )
∴ f x 4 = f(1.33721) = 0.05388
4 th iteration :
( ) ( )
f x 3 = f(1.25311) = - 0.28536 and f x 4 = f(1.33721) = 0.05388
x4 - x3
( )
∴ x5 = x3 - f x3 ⋅
( ) ( )
f x4 - f x3
1.33721 - 1.25311
x 5 = 1.25311 - ( - 0.28536) ×
0.05388 - ( - 0.28536)
x 5 = 1.32385
( )
∴ f x 5 = f(1.32385) = - 0.0037
5 th iteration :
( ) ( )
f x 4 = f(1.33721) = 0.05388 and f x 5 = f(1.32385) = - 0.0037
x5 - x4
( )
∴ x6 = x4 - f x4 ⋅
( ) ( )
f x5 - f x4
1.32385 - 1.33721
x 6 = 1.33721 - 0.05388 ×
- 0.0037 - 0.05388
x 6 = 1.32471
( )
∴ f x 6 = f(1.32471) = - 0.00004
n x0 ( )
f x0 x1 ( )
f x1 x2 ( )
f x2
1 1 -1 2 5 1.16667 -0.5787
https://atozmath.com/example/CONM/Bisection.aspx?q=se&q1=E1 3/4
7/15/23, 2:42 PM Secant method Algorithm & Example-1 f(x)=x^3-x-1
This material is intended as a summary. Use your textbook for detail explanation.
Any bug, improvement, feedback then Submit Here
NOW
PLAYING
.
.
https://atozmath.com/example/CONM/Bisection.aspx?q=se&q1=E1 4/4