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)=2x+1x−3f\left(x\right) = \frac{2x + 1}{x - 3}

f−1(x)=3x+1x−2\displaystyle f^{-1}\left(x\right) = \frac{3x + 1}{x - 2}

Domain of the inverse

x≠2\displaystyle x \ne 2

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=2x+1x−3y = \frac{2x + 1}{x - 3}
  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=2y+1y−3x = \frac{2y + 1}{y - 3}
  3. Clearing the fraction

    Multiply both sides by the denominator y−3y - 3 so that no fraction is left, then multiply out the left side.

    x(y−3)=2y+1⇒xy−3x=2y+1\begin{gathered} x\left(y - 3\right) = 2y + 1 \\ \Rightarrow \\ xy - 3x = 2y + 1 \end{gathered}
  4. Collecting the terms with y

    Every term that contains yy has to be on one side and every other term on the other, so that yy can be taken out as a common factor.

    xy−2y=3x+1xy - 2y = 3x + 1
  5. Taking out the common factor y

    Both terms on the left contain yy, so it can be taken out as a common factor. The brackets then hold what multiplies yy.

    Using uy+vy=(u+v)yuy + vy = \left(u + v\right)y

    y(x−2)=3x+1y\left(x - 2\right) = 3x + 1
  6. Dividing by the bracket

    Divide both sides by the bracket to leave yy alone. If the bottom would start with a negative sign, change every sign on the top and the bottom, which does not change the value.

    y=3x+1x−2y = \frac{3x + 1}{x - 2}
  7. Domain of the inverse

    The domain of the inverse is the range of ff. The outputs of ff approach ac=2\frac{a}{c} = 2 but never reach it, so the inverse cannot use that number.

    x≠2x \ne 2
  8. Result

    So the inverse function is f−1(x)=3x+1x−2f^{-1}\left(x\right) = \frac{3x + 1}{x - 2}.

Worked examples