I have this function
(1) $f(x) = {\sqrt (x+1) - \sqrt x}$
then I make it (by multiply with : $\frac{\sqrt (x+1)+\sqrt x}{\sqrt (x+1)+\sqrt x}$) into:
(2) $f(x) = \frac{1}{\sqrt (x+1)+\sqrt x}$
the function should be the same (according to my knowledge), but when I put in X the value of $1e+15$, I get different values (maybe it's just my calculator but it also does not make sense).
In (1) I get 0, in (2) I get $1.581e-8$. the values are very close of course, but they are not the same, and I don't understand why, and it drives me crazy.
This mess happens on other kinds of equations with the $sqrt$, can someone explain it to me?
It's a round of error, (1) and (2) are indeed the same functions. If you plug in a very large number for x, then, by round-off errors, $\sqrt{x+1} \approx \sqrt{x}$. This leads to $\sqrt{x+1} - \sqrt{x} \approx 0$, while $\frac{1}{\sqrt{x+1} + \sqrt{x}} \neq 0$