You are on page 1of 4

7/15/23, 2:42 PM Secant method Algorithm & Example-1 f(x)=x^3-x-1

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

Try our new - Enter problem or search problem


Home What's new College Algebra Games Feedback
Algebra Matrix & Vector Numerical Methods Statistical Methods Operation Research Word Problems Calculu

Home > Numerical methods calculators > Secant method example

5. Secant method example ( Enter your problem )


Other related methods
1. Algorithm & Example-1 f(x) = x 3 - x - 1
2. Example-2 f(x) = 2x 3 - 2x - 5 1. Bisection method
3. Example-3 x = √12 2. False Position method (regula falsi method)
3
3. Newton Raphson method
4. Example-4 x = √48 4. Fixed Point Iteration method
5. Example-5 f(x) = x 3 + 2x 2 + x - 1 5. Secant method
6. Muller method
7. Halley's method
8. Steffensen's method
9. Ridder's method

4. Fixed Point Iteration method 2. Example-2 f(x


(Previous method) (Ne

1. Algorithm & Example-1 f(x) = x 3 - x - 1

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.

Step-2: find next value using


x1 - x0
( )
Formula-1 : x 2 = x 0 - f x 0 ⋅
( Enter your problem )
( ) ( )
f x1 - f x0

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

( Enter your problem )


3 rd iteration :

x 2 = 1.16667 and x 3 = 1.25311

( ) ( )
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 :

x 3 = 1.25311 and x 4 = 1.33721

( ) ( )
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 :

x 4 = 1.33721 and x 5 = 1.32385

( ) ( )
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

Approximate root of the equation x 3 - x - 1 = 0 using Secant method is 1.32471

n x0 ( )
f x0 x1 ( )
f x1 x2 ( )
f x2

1 1 -1 2 5 1.16667 -0.5787

2 2 5 1.16667 -0.5787 1.25311 -0.28536

3 1.16667 -0.5787 1.25311 -0.28536 1.33721 0.05388


( Enter your problem )

4 1.25311 -0.28536 1.33721 0.05388 1.32385 -0.0037

5 1.33721 0.05388 1.32385 -0.0037 1.32471 -0.00004

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

4. Fixed Point Iteration method 2. Example-2 f(x


(Previous method) (Ne

Share this solution or page with your friends.

Home What's new College Algebra Games Feedback

Copyright © 2023. All rights reserved. Terms, Privacy

NOW
PLAYING

.
.

( Enter your problem )

https://atozmath.com/example/CONM/Bisection.aspx?q=se&q1=E1 4/4

You might also like