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

How do I make $y$ the subject of the equation $x^3+y^3-3xy=k$?

share|cite|improve this question
Roots of cubic function – Ilya Nov 23 '11 at 13:41
You can use the usual cubic formula, but why would you need to solve for $y$? What do you really want to do? – J. M. Nov 23 '11 at 13:42
@J.M.: I am trying to find the inverse function of the function $f(x,y)=x^3+y^3-3xy$ given that I know $x$. – daniel Nov 23 '11 at 13:43
It's not pretty: Wolfram alpha – Bill Cook Nov 23 '11 at 13:44

As Bill says in the comments, the solution isn't pretty. Just to give you an idea of the method, I'll work this out in some detail.

We consider the equation


where $p=3x$ and $q=x^3-k$. Cardano's schtick is to let $y=t_1+t_2$, for some unknowns $t_1$ and $t_2$. (Why this is needed will be clear later.)

We thus have the equation


which can be rearranged as


Cardano then imposes the condition that $p=3t_1t_2$. This leads us to two equations in the two unknowns $t_1$ and $t_2$:

$$\begin{align*}t_1^3+t_2^3&=-q\\t_1^3 t_2^3&=\frac{p}{27}\end{align*}$$

Why was the condition $p=3t_1t_2$ rewritten as the second equation given above? That's because it allows us to invoke the Vieta formulae:

$$(u-t_1^3)(u-t_2^3)=u^2-(t_1^3+t_2^3)u+(t_1^3 t_2^3)$$

We can thus rewrite the quadratic in $u$ whose roots are $t_1^3$ and $t_2^3$ as


whose roots are


We can thus take


It is known that a number can have three cube roots; combine that with the two possibilities for the square root and it looks as if there are a number of possible values of $y=t_1+t_2$. This is where the $p=3t_1t_2$ restriction comes in. Imposing that condition leads us to only three possible values of $y$:

$$y=\begin{cases}t_1+t_2\\\omega t_1+\omega^2 t_2\\\omega^2 t_1+\omega t_2\end{cases}$$

where $\omega=\dfrac{-1+i\sqrt 3}{2}$ is a cube root of unity.

Whether the cubic has three real roots or only one real root depends on the sign of the discriminant,


A positive discriminant means that only one of the roots is real, while a nonpositive discriminant implies that there are three real roots. The case of nonpositive discriminant allows an alternate representation of the three roots in terms of trigonometric or hyperbolic functions, but I'll skip that here.

share|cite|improve this answer

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.