Secant Method
Secant Method
GEOMETRIC REPRESENTATION
Example
Use Secant method to find solution accurate to within 10−5 for 𝑓(𝑥 ) =
𝑥 3 − 2𝑥 2 − 5 in [1, 4].
Solution: For Secant method, let us take 𝑝0 = 2 and 𝑝1 = 3, from [1, 4].
Formula for Secant method is
𝑓(𝑝𝑛−1 )(𝑝𝑛−1 − 𝑝𝑛−2 )
𝑝𝑛 = 𝑝𝑛−1 −
𝑓(𝑝𝑛−1 ) − 𝑓(𝑝𝑛−2 )
* For calculator take 𝑝0 = 𝑥 and 𝑝1 = 𝑦 and write function as
(𝑦 3 − 2𝑦 2 − 5)(𝑦 − 𝑥)
𝑦−
((𝑦 3 − 2𝑦 2 − 5) − (𝑥 3 − 2𝑥 2 − 5))
and for 𝑝2 𝑡𝑎𝑘𝑒 𝑥 = 2 and 𝑦 = 3.
For 𝑝3 𝑡𝑎𝑘𝑒 𝑥 = 3 and 𝑦 = 2.55556 and so on.
So for n=2, we have
𝑓(𝑝1 )(𝑝1 − 𝑝0 )
𝑝2 = 𝑝1 − = 2.55556
𝑓 (𝑝1 ) − 𝑓 (𝑝0 )
𝑓(𝑝2 )(𝑝2 − 𝑝1 )
𝑝3 = 𝑝2 − = 2.66905
𝑓(𝑝2 ) − 𝑓 (𝑝1 )
𝑝4 = 2.69237
𝑝5 = 2.69063
𝑝6 = 2.69065 = 𝑝7 is the solution of f(x).
PROBLEM STATEMENT
As a software developer working on a financial modeling application, you need to
implement a feature that calculates the break-even point for various investment
projects. To find the break-even point, you’ve modeled it using the equation
2𝑥 cos(2𝑥) − (𝑥 − 2)2 = 0
and need to solve for 𝑥 within the range of 2 ≤ 𝑥 ≤ 3. To ensure accurate results,
you decide to apply the Secant Method to find a solution that is accurate to within
10−3 . This implementation will allow users to quickly assess the profitability of their
investments, making your software a valuable tool for financial decision-making.
PRACTICE
Q1. The accumulated value of a savings account based on regular periodic
payments can be determined from the annuity due equation,