# Thread: Secant Method - Calculating the number of steps required

1. ## Secant Method - Calculating the number of steps required

I need to calculate the number of steps required to reach a specified accuracy by using the Secant method. Here is the question:

$\displaystyle Secant: |x_{n+1} - r| \leq C_{sct}. |x_n - r|^{\alpha_{sct}}$ with $\displaystyle \alpha_{sct} \approx 1.618$
If an initial guess, $\displaystyle x_0$, is supplied such that $\displaystyle |x_n - r| = 10^{-2}$, and we assume that $\displaystyle C_{sct} = 3$, how many steps of each method are necessary to ensure that $\displaystyle |x_n - r| \leq 10^{-14}$?

Hope someone can help!

Thanks

2. Originally Posted by bobby
I need to calculate the number of steps required to reach a specified accuracy by using the Secant method. Here is the question:

$\displaystyle Secant: |x_{n+1} - r| \leq C_{sct}. |x_n - r|^{\alpha_{sct}}$ with $\displaystyle \alpha_{sct} \approx 1.618$
If an initial guess, $\displaystyle x_0$, is supplied such that $\displaystyle |x_n - r| = 10^{-2}$, and we assume that $\displaystyle C_{sct} = 3$, how many steps of each method are necessary to ensure that $\displaystyle |x_n - r| \leq 10^{-14}$?

Hope someone can help!

Thanks
So $\displaystyle |x_1- r|\le C_{sct}|x_0- r|^{1.618}= 3|0.01|^{1.618}$
Then $\displaystyle |x_2- r|\le 3(3|0.01|^{1.618})^{1.618}= 3^{1.618}(0.01)^{2(1.618)}$, $\displaystyle x_3- r|\le 3(3^{1.618}(0.01)^{1.618})^{1.618}= 3^{2(1.618)}(0.01)^{3(1.618)}$.

It looks to me like $\displaystyle |x_n- r|\le 3^{(n-1)1.618}(0.01)^{n(1.618)}$.

Set that equal to $\displaystyle 10^{-14}$ and solve for n, using logarithms, and round up to the next nearest integer, of course.

3. Originally Posted by HallsofIvy
So $\displaystyle |x_1- r|\le C_{sct}|x_0- r|^{1.618}= 3|0.01|^{1.618}$
Then $\displaystyle |x_2- r|\le 3(3|0.01|^{1.618})^{1.618}= 3^{1.618}(0.01)^{2(1.618)}$, $\displaystyle x_3- r|\le 3(3^{1.618}(0.01)^{1.618})^{1.618}= 3^{2(1.618)}(0.01)^{3(1.618)}$.

It looks to me like $\displaystyle |x_n- r|\le 3^{(n-1)1.618}(0.01)^{n(1.618)}$.

Set that equal to $\displaystyle 10^{-14}$ and solve for n, using logarithms, and round up to the next nearest integer, of course.
I'm not sure if some of your maths is correct there? When you wrote

$\displaystyle |x_2- r|\le 3(3|0.01|^{1.618})^{1.618}= 3^{1.618}(0.01)^{2(1.618)}$

is this not

$\displaystyle |x_2- r|\le 3(3|0.01|^{1.618})^{1.618}= 3(3^{1.618}(0.01)^{(1.618^2)})$