Find the inverse of the function.
$$f(x)=x^2 + 4x$$
Domain: $x \geq -2$
I have done:
$X = y^2 + 4y$
$X - 4y = y^2$
$\sqrt{X - 4y} = y$
My answer: $f^{-1}(x) = \sqrt{X - 4x} $
Real answer: $f^{-1}(x) = -2 \pm \sqrt{x + 4}$
Find the inverse of the function.
$$f(x)=x^2 + 4x$$
Domain: $x \geq -2$
I have done:
$X = y^2 + 4y$
$X - 4y = y^2$
$\sqrt{X - 4y} = y$
My answer: $f^{-1}(x) = \sqrt{X - 4x} $
Real answer: $f^{-1}(x) = -2 \pm \sqrt{x + 4}$
$y=x^2+4x \Rightarrow x^2+4x-y=0 \Rightarrow x=\frac{-4\pm\sqrt{16+4y}}{2}$
Your method was to write $y=x^2+4x$ and interchange $x$ and $y$, which was correct so far. You then wanted to solve $x=y^2+4y$ for $y$, and went astray. You correctly got $0=y^2+4y-x$, but your attempted method was not right. You have to treat this last equation as a quadratic in $y$, with coefficients $1$, $4$, and $-x$, and use the Quadratic Formula. Hence the correct answer that has already been supplied to you.
Now there is a secondary difficulty, and that is that your original function is not one-to-one, and doesn’t even have an inverse until its domain is shrunk. Fortunately, the setup of the problem has already done this for you. In the unrestricted domain of $\langle-\infty,\infty\rangle$, the vertex of the parabola is at $(-2,-4)$, so that the horizontal line test succeeds only when the falling part of the parabola (to the left of $x=-2$) is excluded, as the domain restriction does. So it’s only the plus sign of the Quadratic Formula that is appropriate, and if your text gave the $\pm$ sign in an answer, it was wrong. Of course you should also specify that the domain of your function is $[-4,\infty\rangle$.