So im given an equation $f(x) = \frac{1}x - c$ and told to use $f(x) = 0$ and using the secant method to find the iteration scheme for the said equation.
The secant method is: $x_{n+1}$ = $x_n$ - $\dfrac{f(x_n)(x_n - x_{n-1})}{f(x_n)-f(x_{n-1})}$
So i proceed to place the $f(x)= \frac{1}x-c$ for every $f(x)$ in the secant equation making sure to keep the $n$ and $n-1$ subscripts, then just try and work it out algebraically? like so?:
$x_n$ - $\dfrac{\left(\dfrac{1}{x_n}-c\right)(x_n - x_{n-1})}{\dfrac{1}{x_n}-c-\dfrac{1}{x_{n-1}}-c}$
If so, what is the point of f(x) = 0, will that be plugged in after i have found the iteration? Or must $f(x) = 0$ take the place of $x_n$? I worked a similar problem except it asked to use Newtons Method, but there was no use $f(x) = 0$.
@khonglagica here is how far i made it trying to condense the formula:
First of all, any iterative scheme needs some starting points, in this case, is two.
Secondly, did you try to simplify your formula? I think you will get something like $x_{n} - F(x_{n},x_{n-1})$ in a simple form.
Then for some starting point $x_{0} , x_{1}$, compute $x_{n+1}$ by your formula.
Finally, the loop will end when some stopping criteria are met, in this case, I guess it would be $f(x_{n+1})=0$. And that also the place where $f(x) = 0$ are used, which makes sense in Newton method as there is no $f$ in that formula, I guess.
Update: I guess that it should be \begin{align} x_{n+1} & = x_{n} - \dfrac{\left( \dfrac{1}{x_{n}} - c \right) \left( x_{n} - x_{n-1} \right)}{\dfrac{1}{x_{n}} - c - \dfrac{1}{x_{n-1}} + c} \\ & = x_{n} - \dfrac{\left( \dfrac{1}{x_{n}} - c \right) \left( x_{n} - x_{n-1} \right)}{\dfrac{x_{n-1} - x_{n}}{x_{n} x_{n-1}}} \\ & = x_{n} + x_{n} x_{n-1} \left( \dfrac{1}{x_{n}} - c \right) \\ & = x_{n} + x_{n-1} - c x_{n} x_{n-1} \end{align} here the second equality from below is obtained by multiply $\dfrac{x_{n} x_{n-1}}{x_{n-1} - x_{n}}$ to both denominator and numerator .