# Math Help - 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:

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

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

Hope someone can help!

Thanks
So $|x_1- r|\le C_{sct}|x_0- r|^{1.618}= 3|0.01|^{1.618}$
Then $|x_2- r|\le 3(3|0.01|^{1.618})^{1.618}= 3^{1.618}(0.01)^{2(1.618)}$, $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 $|x_n- r|\le 3^{(n-1)1.618}(0.01)^{n(1.618)}$.

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

3. Originally Posted by HallsofIvy
So $|x_1- r|\le C_{sct}|x_0- r|^{1.618}= 3|0.01|^{1.618}$
Then $|x_2- r|\le 3(3|0.01|^{1.618})^{1.618}= 3^{1.618}(0.01)^{2(1.618)}$, $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 $|x_n- r|\le 3^{(n-1)1.618}(0.01)^{n(1.618)}$.

Set that equal to $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

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

is this not

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