Take the 2-minute tour ×
Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. It's 100% free, no registration required.

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$

share|improve this question

1 Answer 1

up vote 2 down vote accepted

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.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.