Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I know how to find the inverse of $y = x^3$, but once you add/subtract another term, that is where I become lost.

I have used wolframalpha to get an answer.

Wolfram Alpha's answer

I am lost upon how this was obtained.

share|cite|improve this question
See Wikipedia for the hole deduction. – Pragabhava Nov 9 '12 at 6:48
@Pragabhava could you suggest a book to help me with this? – yiyi Nov 9 '12 at 6:55
I don't know any specific book, but googling led me to this simple deduction. – Pragabhava Nov 9 '12 at 7:04
The role of $c$ has disappeared in your answer, something is wrong. Note that if $c = 0$, the function isn't one to one and hence doesn't have an inverse – Hawk Nov 9 '12 at 7:04
@jak: Since the equation can be rewritten to $y-c=\ldots$, the one-to-one-ness does not depend on $c$ and also $c$ can simply be subtracted from the input of the inverse of the $c=0$ case. – Hagen von Eitzen Nov 9 '12 at 7:07
up vote 5 down vote accepted

This will give you somewhat of an idea on how to calculate the inverse of your cubic equation$ x^3-5x+3x+c$. We are not going to use $c$ but use an actual number say $10$ for $x^3-5x+3x+10$ for simplicity. Presented below will be a sequence of quick and dirty Sage program instructions that you can paste into the Sage Open Source Mathematics Software Sage online version if you care to. Sage can be Out of Service from time to time so if you can’t get on go back later. As stated in other answers it ends up being essentially the same as calculating the root of the cubic equation using the Cardano method. As you can find the inverse of a quadratic equation as follows

$$y = ax^2 + bx + c$$

$$ax^2 + bx + (c - y) = 0$$

$$x = \frac{-b \pm \sqrt{b^2 - 4a(c-y)}}{2a}$$

You can do the same with the cubic equation with $$ax^3+bx^2+cx+(d-y) = 0$$

but it involves more computation.

First evaluate the following Sage code after pasting into Sage ($a,b,c,d$ are the coefficients) Put the cubic polynomial in monic form also:


Note: After pasting all the Sage code listed herein into Sage make sure that all the code is lined up on the left edge before evaluating otherwise it will not produce good results. Or, you could just type it.

The above formula $u$ is the following $$a\left(y-\frac{b}{3a}\right)^3+ b\left(y-\frac{b}{3a}\right)^2+c\left(y-\frac{b}{3a}\right)+d$$

which you can see on The Cubic Formula. The result should be the following:

$$\frac{1}{27}(3y + 5)^3 - \frac{5}{9}(3y + 5)^2 + 3y + 15-x$$

This will allow us to “depress” the cubic equation with the following command to be run sequentially after pasting the code into Sage.


The result should be the following: $$y^3 - \frac{16}{3}y + \frac{155}{27}-x$$

From the above "depressed" cubic equation you can plug in $p$ and $q$ as noted in the Sage code below. Since we want the inverse of the cubic we are subtracting an $x$ from $\frac{155}{27}$ as $q$. Paste the following into Sage and evaluate.


$t$ in the above formula is the following which you can check on Cubic Function

$$\sqrt[3]{-\frac{q}{2}+ \sqrt{\frac{q^2}{ 4}+\frac{p^3}{ 27}}} +\sqrt[3]{-\frac{q}{ 2}- \sqrt{\frac{q^2}{ 4}+\frac{p^3}{ 27}}}$$

This will give you the following result. The only difference in the computation of the inverse and of the roots is the addition of the “-x” to $q$ in the above

$$\sqrt[3]{\frac{1}{2}x - \sqrt{\frac{1}{2916}(27x - 155)^2 - \frac{4096}{729}} - \frac{155}{54}} + \sqrt[3]{\frac{1}{2}x + \sqrt{\frac{1}{2916}(27x - 155)^2 - \frac{4096}{729}} - \frac{155}{54}}$$

All you have to do is add the fraction $-\frac{b}{3a}$ which in this case is $\frac{5}{3}$ to get the inverse function

$$\sqrt[3]{\frac{1}{2}x - \sqrt{\frac{1}{2916}(27x - 155)^2 - \frac{4096}{729}} - \frac{155}{54}} + \sqrt[3]{\frac{1}{2}x + \sqrt{\frac{1}{2916}(27x - 155)^2 - \frac{4096}{729}} - \frac{155}{54}} + \frac{5}{3}$$

This result does not look identical to the result from Wolfram Alpha but it does the same thing. As a verification you can take out the $show(z)$ command in the code and replace it with just $z$ then copy and paste the formula into Excel with the result of $x^3-5x^2+3x+10$ as the input value for $x$ in the inverse formula to see if it works. In other words does the output of $f(x)=x^3-5x^2+3x+10$ when plugged in as the input of the inverse function equals the input of $f(x)$. There could be situations where it will not compute correctly. For example in the case where $x=4$ we would expect the inverse function to produce the value $2$ in Excel. This does not occur because the inverse function produces the following with $4$ as the input.


This will not compute to a real number in programs such as Excel since they cannot make computations in complex numbers. So in order to get $2$ as the output the combination of cube roots of the above cubic radicals that produces $2$ is the following:


The complex numbers in parentheses are one of the cube roots of the above cubic radical expressions. For examples of how to find cube roots of these types of nested radicals see 16331.

share|cite|improve this answer

This is trivial! All you need to do is find the formula for roots of cubic! First thing you can do is substitute $x=t+\frac{5}{3}$ to remove the second degree term to get $y = t^3-\frac{13}{3}t-\frac{115}{27}$.

For history and proofs, check

share|cite|improve this answer
Whats trivial to some, is not for others. It took humanity more than 1500 years to solve the problem. For us is trivial because we have google and wikipedia. – Pragabhava Nov 9 '12 at 7:40
if you explained the reasoning for the $x = t + \frac{5}{3}$ sub it would be a better answer. – baxx Apr 9 at 12:39

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.