# Making $y$ the subject of an equation

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

-
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? –  Ｊ. Ｍ. 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

## 1 Answer

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

$$y^3-py+q=0$$

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

$$(t_1+t_2)^3-p(t_1+t_2)+q=0$$

which can be rearranged as

$$t_1^3+t_2^3+q-(t_1+t_2)(p-3t_1t_2)=0$$

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

$$u^2+qu+\frac{p}{27}=0$$

whose roots are

$$u=-\frac{q}{2}\pm\sqrt{\frac{q^2}{4}-\frac{p^3}{27}}$$

We can thus take

\begin{align*}t_1&=\sqrt[3]{-\frac{q}{2}+\sqrt{\frac{q^2}{4}-\frac{p^3}{27}}}=\sqrt[3]{\frac{k-x^3+\sqrt{(x^3-k)^2-4x^3}}{2}}\\t_2&=\sqrt[3]{-\frac{q}{2}-\sqrt{\frac{q^2}{4}-\frac{p^3}{27}}}=\sqrt[3]{\frac{k-x^3-\sqrt{(x^3-k)^2-4x^3}}{2}}\end{align*}

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,

$$\Delta=27q^2-4p^3=27(x^3-k)^2-108x^3$$

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.

-