Sub topic 10
Finding an Inverse Step by Step
Assume you already know function notation, domain and range, and how to solve linear and simple nonlinear equations. You should also know that a function assigns each allowed input exactly one output.
An inverse function undoes the original function. If \(f\) changes \(x\) into \(y\), then \(f^{-1}\) changes \(y\) back into \(x\):
\[ f^{-1}(f(x))=x \]
The notation \(f^{-1}\) means “inverse function.” It does not mean the reciprocal \(\frac{1}{f(x)}\).
The algebraic method
To find an inverse of \(f(x)\), use this sequence:
- Write \(y=f(x)\).
- Replace \(f(x)\) with \(y\).
- Swap \(x\) and \(y\).
- Solve for \(y\).
- Rename the result \(f^{-1}(x)\).
- Check the result by composition when possible.
Swapping \(x\) and \(y\) reflects the input-output relationship. The original input becomes the inverse output, and the original output becomes the inverse input.
Worked example: a linear function
Find the inverse of
\[ f(x)=2x+3. \]
Start by writing the function as \(y\):
\[ y=2x+3. \]
Swap \(x\) and \(y\):
\[ x=2y+3. \]
Now solve for \(y\):
\[ x-3=2y \]
\[ y=\frac{x-3}{2}. \]
Therefore,
\[ f^{-1}(x)=\frac{x-3}{2}. \]
The operations in the original function were “multiply by 2, then add 3.” The inverse reverses them: “subtract 3, then divide by 2.”
Nonlinear example
Find the inverse of
\[ f(x)=\sqrt{x-4}. \]
Write
\[ y=\sqrt{x-4}. \]
Swap the variables:
\[ x=\sqrt{y-4}. \]
Square both sides:
\[ x^2=y-4. \]
Add 4:
\[ y=x^2+4. \]
Thus,
\[ f^{-1}(x)=x^2+4. \]
The original function has domain \(x\geq4\) and range \(y\geq0\). These become the inverse’s range and domain, respectively. Therefore, the inverse is defined for \(x\geq0\).
Check the result
For the linear example, let
\[ f(x)=2x+3 \quad\text{and}\quad f^{-1}(x)=\frac{x-3}{2}. \]
Check both compositions:
\[ f^{-1}(f(x)) =f^{-1}(2x+3) =\frac{(2x+3)-3}{2} =x \]
and
\[ f(f^{-1}(x)) =2\left(\frac{x-3}{2}\right)+3 =x. \]
Both checks return \(x\), so the functions are inverses on their stated domains.
def f(x):
return 2 * x + 3
def f_inverse(x):
return (x - 3) / 2
for x in [-2, 0, 5]:
assert f_inverse(f(x)) == x
assert f(f_inverse(x)) == x
print(f_inverse(f(5)))Exercise
Find the inverse of f(x) = 5x - 7 and state the two operations that the inverse performs.
Show answer
f⁻¹(x) = (x + 7) / 5. It adds 7 and then divides by 5.