# Math Help - Finding the inverse of a function

1. ## Finding the inverse of a function

I need help finding the inverse for this function

$g:[-1,\infty) \rightarrow, g(x) = x^2+2x$

What I've done so far.

Let $g(x) = y$

$y=x^2+2x$

Swap x and y, and solve for y

$x=y^2+2y$

$x=y(y+2)$

Nevermind, I got it, had to complete the square!

2. I had typed this up by the time I saw your last comment, d'oh- so I post anyways.

$g(x) = x^2+2x$

Set g(x) to y:

$y = x^2+2x$

Complete that square:

$y = (x+1)^2 - 1$

$y + 1 = (x+1)^2$

$\sqrt{y+1} - 1 = x$

Swap x and y, so that $y=g^{-1}(x) = \sqrt{y+1}-1$

Prove to check; it should be that f(g(x)) = g(f(x)) = x, here's an example:

$g(f(x)) = \sqrt{x^2+2x+1} - 1$

$g(f(x)) = \sqrt{(x+1)^2} - 1$

$g(f(x)) = x+1 - 1$

$g(f(x)) = x$