Inverse Function Calculator

Enter a function of x to swap x and y and solve for the inverse.

Use x, + − × ÷ ^, brackets, sqrt, abs, ln, log and e.

Try

Result

You enteredf(x)=x−2f\left(x\right) = \sqrt{x - 2}

f−1(x)=x2+2, x≥0\displaystyle f^{-1}\left(x\right) = x^{2} + 2,\ x \ge 0

Domain of the inverse

x≥0\displaystyle x \ge 0

Check

f(f−1(x))=x\displaystyle f\left(f^{-1}\left(x\right)\right) = x
Show the work
  1. Writing y for f(x)

    Replace f(x)f(x) with yy, so that the output has a letter of its own to work with.

    y=x−2y = \sqrt{x - 2}
  2. Swapping x and y

    An inverse function undoes ff, so inputs and outputs trade places. Swap the letters xx and yy, then solve for the new yy.

    x=y−2x = \sqrt{y - 2}
  3. Squaring undoes a square root

    Squaring both sides removes the square root. This is allowed here because the square root is never negative, which is what limits the domain of the inverse.

    Using (u)2=u\left(\sqrt{u}\right)^2 = u

    y−2=(x)2y - 2 = \left(x\right)^2
  4. Solving for y

    Subtract −2-2, divide by the coefficient 11 of yy and multiply out the square.

    y=x2+2y = x^{2} + 2
  5. Domain of the inverse

    The domain of the inverse is the range of ff. A square root is never negative, so ff takes only values at least 00, and the inverse is used only for x≥0x \ge 0.

  6. Result

    So the inverse function is f−1(x)=x2+2f^{-1}\left(x\right) = x^{2} + 2, for x≥0x \ge 0.

Worked examples