# numerical analysis finding $f(x)$of iteration formula using secant method

The iteration formula given below was obtained by applying secant method to some function $f(x)$. What was $f(x)$? What can this formula be used for?

$$x_{n+1} = x_n + \frac{(3-10^{x_n})(x_n - x_{n-1})}{10^{x_n}- 10^{x_{n-1}}}$$

-
How do we compute f(x) when xn is raised as a power? –  Avinesh Mar 29 '13 at 4:00
@MJD.Thanks for editing –  Avinesh Mar 29 '13 at 4:05

The formula for the secant iteration is: $$x_{n + 1} = x_n - f(x_n) \frac{x_n - x_{n - 1}}{f(x_n) - f(x_{n - 1})}$$ So you must identify the second term with your second term: $$f(x_n) \frac{x_n - x_{n -1}}{f(x_n) - f(x_{n - 1})} = - \frac{(3 - 10^{x_n})(x_n - x_{n - 1})}{10^{x_n} - 10^{x_{n - 1}}}$$ Thus the function must be such that $f(x_n) - f(x_{n - 1}) = \alpha(10^{x_n} - 10^{x_{n - 1}})$, so $f(x) = \alpha (c - 10^x)$ for constants $\alpha$ and $c$; and the factor $3 - 10^{x_n}$ gives away that $c = 3$, so $f(x) = \alpha (3 - 10^x)$. As long as $\alpha \ne 0$ it is arbitrary. (Yes, part of this is really unnecessary; but is serves to make sure we aren't being given a fake.)
Somebody is looking for $\log 3$...
@Avinesh, what is $f(x_n) - f(x_{n - 1})$ for the $f$ I give? –  vonbrand Mar 29 '13 at 4:48
@Avinesh, yes, and I'm checking it is so. But the denominator is $f(x_n) - f(x_{n - 1})$, not just one $f(x_n)$. –  vonbrand Mar 29 '13 at 6:03