# What is the inverse function of f?

Finds the formula of the inverse function f⁻¹(x) of a one-to-one function, checked by composing it with f.

- Page: https://www.acalculator.org/math/inverse-function-calculator
- JSON spec: https://www.acalculator.org/math/inverse-function-calculator.json
- Version: 6c022cb1cc86

## Default answer

Example with the default inputs (Function f(x) 2/(x - 3) + 4): The inverse of f(x) = 2/(x - 3) + 4 is f⁻¹(x) = 2/(x - 4) + 3.

## Inputs

| Key | Label | Description |
| --- | --- | --- |
| f | Function f(x) | A one-to-one function, typed like 2/(x - 3) + 4, sqrt(x - 4) + 2 or (2x + 3)/(x - 1). |

## Outputs

| Key | Label | Description |
| --- | --- | --- |
| inverse | f⁻¹(x) = | The inverse function: f⁻¹(f(x)) = x for every x in the domain of f. |

## Method

Solve y = f(x) for x by undoing each operation of f in reverse order, then swap x and y. The answer is shown only when f⁻¹(f(x)) = x at test points.

## Assumptions

- The variable is x; angles are in radians; ln is the natural logarithm.
- f⁻¹ is defined on the range of f.
- An answer that fails its check is not shown.

## Worked examples

1. f = 2/(x - 3) + 4 gives inverse = 2/(x - 4) + 3. Source: OpenStax, College Algebra 2e, section 3.7 Inverse Functions, Example 8. https://openstax.org/books/college-algebra-2e/pages/3-7-inverse-functions.
2. f = 2 + sqrt(x - 4) gives inverse = (x - 2)^2 + 4.

## FAQ

### What is an inverse function?

The inverse of f undoes it: if f(a) = b then f⁻¹(b) = a, so f⁻¹(f(x)) = x. For f(x) = 2x + 3 the inverse is f⁻¹(x) = (x − 3)/2: take 3 away, then halve.

### How do I find the inverse of a function?

Write y = f(x), solve the equation for x in terms of y, then swap the letters. For y = 2/(x − 3) + 4: y − 4 = 2/(x − 3), so x − 3 = 2/(y − 4) and x = 2/(y − 4) + 3. Swapping gives f⁻¹(x) = 2/(x − 4) + 3.

### Why does x^2 have no inverse?

Because it is not one-to-one: f(2) = f(−2) = 4, so no single formula can send 4 back to both. The page checks f⁻¹(f(x)) = x at test points and says so when it fails. Restricted to x ≥ 0, x² does have an inverse, √x; a function such as √x or √(x − 4) + 2 already has that restriction built in.

### What is the domain of the inverse?

The domain of f⁻¹ is the range of f. For f(x) = 2 + √(x − 4), the range is y ≥ 2, so f⁻¹(x) = (x − 2)² + 4 holds for x ≥ 2 only; outside that range the formula gives numbers, but they are not values of the inverse.

### Which functions can the page invert?

Functions in which x can be written once: 2/(x − 3) + 4, √(x − 4) + 2, e^(2x) − 1, ln(x + 3), 5/9 (x − 32). A fraction such as (2x + 3)/(x − 1), with x twice, works when the algebra can rewrite it with x once (here 2 + 5/(x − 1)). An equation such as y = x + eˣ has no inverse in elementary functions.

### How is the answer checked?

The page works out f⁻¹(f(x)) at 18 test points across the domain of f; at every point where both are real it must equal x to 1 part in 10⁹, and there must be at least 3 such points. This also shows f is one-to-one there.

## Sources

- OpenStax, College Algebra 2e, section 3.7 Inverse Functions: https://openstax.org/books/college-algebra-2e/pages/3-7-inverse-functions
