1
$\begingroup$

I am trying to see if I got the right answer so far for:

Using the Secant Method for $f(x) = \ln(x-1) +\cos(x-1)$, interval $1.3 \leq x \leq 2$

$p_0 = 1.3$
$p_1 = 2$
$p_2 = 1.520607$
$p_3 = 1.2043557751$

1 Answers 1

2

For the Secant Method for approximating a root of $f(x)$, the iteration turns out to be $x_{n+1}=x_n - f(x_n)\frac{x_n-x_{n-1}}{f(x_n)-f(x_{n-1}}.$ The derivation is not difficult. The number $x_{n+1}$ is where the line through $(x_{n-1},f(x_{n-1}))$ and $(x_{n},f(x_{n}))$ meets the $x$-axis.

I calculated $p_2$. It agrees with what you wrote, exactly. (My cheap calculator only displayed $6$ digits after the decimal point.)

For $p_3$, I got $1.204357$. There is obvious agreement. Of course you have a bunch more digits, but they don't mean much, since we are clearly not yet close to the root.

Conclusion: We are both making the same mistake, or you are on the right track.

Remark: The Secant Method can be more computationally efficient than the Newton Method. True, in general we need more iterations to get the same accuracy, but often the iterations are enough cheaper to make up for it. This is the case when the values of derivative needed in the Newton Method are expensive to compute.