If one were to take the cubic
$f(x) = x^3+2x+6$
How would one find the inverse of this function?
If one were to take the cubic
$f(x) = x^3+2x+6$
How would one find the inverse of this function?
On
If $$ y = f(x) = x^3 + 2x + 6 $$ you want to calculate $$ x = f^{-1}(y) $$ for a given $y$ from the image of $f$.
You can try to do this algebraically, going for a root of $$ g(x) = f(x) - y $$ which is a third degree polynomial as well, where algebraic formulas exist, but they are more complicated than the common known degree two equivalents.
E.g. see WA for this case.
Otherwise you would need to apply numerical methods, e.g. Newton iteration.
On
Write the equation in the form
$$x^3+2x+6=y$$ and set
$$x:=u-\frac2{3u}.$$
Then
$$0=x^3+2x+6-y=u^3-2u+\frac4{3u}-\frac8{27u^3}+2u-\frac4{3u}+6-y=u^3-\frac8{27u^3}+6-y.$$
This can be written as a quadratic equation in $u^3$,
$$(u^3)^2+(6-y)u^3-\frac8{27}=0$$ with the solutions
$$u^3=\frac{y-6\pm\sqrt{(y-6)^2+\frac{32}{27}}}2.$$
From this,
$$x=\sqrt[3]{\frac{y-6+\sqrt{(y-6)^2+\frac{32}{27}}}2}+\sqrt[3]{\frac{y-6-\sqrt{(y-6)^2+\frac{32}{27}}}2}.$$
Note that there was a shortcut to obtain the final result. By Vieta, the product of the quadratic roots is $-\frac8{27}$ so that $-\frac2{3u}$ is the cubic root of the other root.
If we follow the method described here with $a=1$, $b=0$, $c=2$, $d=6-y$ $$\Delta=-32 - 27 (6 - y)^2 <0 \qquad \forall y$$ Then the equation has one real root and two non-real complex conjugate roots. We also have $p=2$; so using the hyperbolic solution for one real root,we get (notice that $b=0\implies x=t_0$) $$\color{blue}{x=-2 \sqrt{\frac{2}{3}} \sinh \left(\frac{1}{3} \sinh ^{-1}\left(\frac{3}{4} \sqrt{\frac{3}{2}} (6-y)\right)\right)}$$
In my opinion at least, this is nicer than the ugly $$x=\frac{\sqrt[3]{\sqrt{3} \sqrt{27 y^2-324 y+1004}+9 y-54}}{\sqrt[3]{2}\, 3^{2/3}}-\frac{2 \sqrt[3]{\frac{2}{3}}}{\sqrt[3]{\sqrt{3} \sqrt{27 y^2-324 y+1004}+9 y-54}}$$ given by Wolfram Alpha.
Edit
Making the problem more general, considering the equation $$x^3+\alpha x+\beta=y$$ we should have $$\Delta=-4 \alpha ^3-27 (\beta -y)^2 <0 \qquad \forall y \qquad \color{red}{\text{if}\qquad \alpha \geq 0}$$ and the solution would be $$\color{blue}{x=-2\sqrt{\frac \alpha 3} \sinh \left(\frac{1}{3} \sinh^{-1}\left(\frac{3}{2\alpha}\sqrt{\frac 3 \alpha} (\beta -y)\right)\right)}$$ nicer that $$x=\frac{\sqrt[3]{-27 \beta +\sqrt{108 \alpha ^3+(27 y-27 \beta )^2}+27 y}}{3 \sqrt[3]{2}}-\frac{\sqrt[3]{2} \alpha }{\sqrt[3]{-27 \beta +\sqrt{108 \alpha ^3+(27 y-27 \beta )^2}+27 y}}$$