butiran

secant method

intro

If the derivative of function, whose root is to be found, does not exist or hard to find, secant method can be used instead of Newton raphson method, since it does not required the derivative but it requires two initial guesses for the roots (Mohan, 2021). Since this method retains only the most recent estimate, the root does not necessary bracketed (Weisstein). Because of that secant method may not converge (Han, 2017). There is a report explaining origin and evolution of secont method in 1-d (Papakonstantinou & Tapia, 2013).

formula

flowchart

algorithm

  1. Start.
  2. Input $f(x)$, $\varepsilon$, $x_0$, $x_1$.
  3. Set $n = 0$.
  4. Calculate $x_{n+2} = x_{n+1} - (x_{n+1} - x_n) f(x_{n+1}) / [ f(x_{n+1}) - f(x_n) ]$.
  5. If $f(x_{n+2}) < \varepsilon$, go to Step 8.
  6. Increase $n$ using $n = n + 1$.
  7. Go to Step 4.
  8. Print $x_{n+2}$.
  9. End.

problem

code

graphics

challenges

refs