<s>[INST] Rewriting function Given function
$$
f(x) = \frac{-2 + 2 \sqrt{x+1}}{x}
$$
and
$$
g(x) = \frac{2}{1+\sqrt{x+1}}
$$
Prove that $f(x) = g(x)$ where $x\neq 0$.
This question is from a 2018 examen in the Netherlands. I tried rewriting f(x) as follows:
$$
f(x) = \frac{-2 + 2 \sqrt{x+1} * \sqrt{x+1}}{x*\sqrt{x+1}}
$$
$$
f(x) = \frac{-2 + 2(x+1)}{x*\sqrt{x+1}}
$$
$$
f(x) = \frac{-2 + 2x + 2}{x*\sqrt{x+1}}
$$
$$
f(x) = \frac{2x}{x*\sqrt{x+1}}
$$
$$
f(x) = \frac{2}{\sqrt{x+1}}
$$
However, I can't find a way to get to the $h(x)$ function where the denominator has a 1 + still.
EDIT:
Just as I post this I notice that I made a mistake in the first step. By not multiplying against the whole numerator. I'll leave the question open anyways.
 [/INST] Hint: consider the following identity
$$
(\sqrt{x+1} + 1)(\sqrt{x+1} - 1) = (\sqrt{x+1})^2 - 1^2 = x + 1 - 1 = x
$$
</s>