Prove that the iteration in the Babylonian method above converges quadratically to the square root of $S$. In particular, show that the error $\epsilon_n = \frac{x_n}{\sqrt{S}} - 1$ satifies $\epsilon_{n+1} = \frac{\epsilon_n^2}{2(\epsilon_n +1)}$
Note we were given $x_{n+1} = \frac{1}{2}(x_n + \frac{S}{x_n}) $
My atempt: $\epsilon_{n+1} = \frac{x_{n+1}}{\sqrt{S}} -1 =\frac{x_n + \frac{S}{x_n}}{2\sqrt{S}}-1$ .
I need to show that this equals $\frac{\epsilon_n^2}{2(\epsilon_n +1)}$ but I dont know where to go from here, this i tried to expand the fraction but couldn't get anywhere, any help would be great.