...f(x)= (1 - x)^2 on [-1, 2]?
The inverse of $\displaystyle f(x) = y = (1-x)^2$ is found as follows
Swap x and y and solve for y.
$\displaystyle x = (1-y)^2$
$\displaystyle \sqrt{x} = 1-y$
$\displaystyle \sqrt{x}-1 = -y$
$\displaystyle 1-\sqrt{x} =y$
$\displaystyle y=f^{-1}(x) = 1-\sqrt{x} $
but the inverse only exists for a function that is one to one. Does your interval imply this?