An archive the questions from Mark's Fall 2018 Complex Variables Course.

Cardano’s solution to your favorite cubic!

Mark

(5 pts)

Now that we know your favorite cubic, apply our cardanoSolve command from this notebook to your favorite polynomial and place the result here.

Be sure to typeset nicely in TeX!! Mathematica’s TeXForm command might help - a lot (really - a lot).

August

My favorite 3rd degree polynomial was f(z) = z^3 +2z^2 +3z +4. When I put it in the cardanoSolve in the Mathematica book it looked like

cardanoSolve[2, 3, 4]

The output returned a big mess which when I used TeXForm[a big mess] to format the roots into this

\left\{-\frac{2}{3}+\sqrt[3]{\frac{5 \sqrt{\frac{2}{3}}}{3}-\frac{35}{2 7}}-\sqrt[3]{\frac{35}{27}+\frac{5 \sqrt{\frac{2}{3}}}{3}},\\-\frac{2}{ 3}+\sqrt[3]{\frac{5 \sqrt{\frac{2}{3}}}{3}-\frac{35}{2 7}} \left(-\frac{1}{2}-\frac{i \sqrt{3}}{2}\right)-\sqrt[3]{\frac {35}{27}+\frac{5 \sqrt{\frac{2}{3}}}{3}} \left(-\frac{1}{2}+\frac{i \sqrt{3}}{2}\right),\\-\frac{2}{3}-\sqrt[3]{\frac{35}{27}+\frac{5 \sqrt{\frac{2}{3}}}{3}} \left(-\frac{1}{2}-\frac{i \sqrt{3}}{2}\right)+\sqrt[3]{\frac {5 \sqrt{\frac{2}{3}}}{3}-\frac{35}{2 7}} \left(-\frac{1}{2}+\frac{i \sqrt{3}}{2}\right)\right\}.

Still a bit of a mess, but at least a little readable now.

Great_Big

My favorite cubic polynomial was f(z) = -\sqrt{2}z^3 + \frac{1+\sqrt{5}}{2}z^2+e^{\sqrt{3}}z-\pi. In order to apply Cardano’s algorithm to find the roots of f(z), we must first render f(z) into a monic cubic polynomial.

Note that:
-\sqrt{2}z^3 + \frac{1+\sqrt{5}}{2}z^2+e^{\sqrt{3}}z-\pi = 0 \iff z^3- \frac{\sqrt{2}+\sqrt{10}}{4}z^2-\frac{\sqrt{2}e^{\sqrt{3}}}{2}+\frac{\sqrt{2}\pi}{2}=0

Great! Now, since f(z) is in monic cubic form, we may apply Cardano’s algorithm using “cardanoSolve” on Mathematica as follows:

cardanoSolve[-0.25*(Sqrt[2] + Sqrt[10]), -0.5*(Sqrt[2]*Exp[Sqrt[3]]), 0.5*(Sqrt[2]*Pi)]

and our solution is shown:

{2.41733 + 0. i, 0.514147 + 0. i, -1.78736 + 0. i}

This solution is the same as when we use Mathematica’s “Solve” function, as shown in the previous post. Sadly, this solution will not be as beautiful as other solutions in this post. Perhaps this is due to the irrational coefficients in f(z)?

Sidneykidney

My favorite cubic was 3 z^3 -10z^2+z +6 which is equivalent to z^3 -\frac{10}{3}z^2 +\frac{1}{3}z + 2.
I then used cardanoSolve on Mathematica:

cardanoSolve[-10/3, 1/3, 2]

which gave me three roots:
\frac{10}{9}+\sqrt[3]{\frac{136}{729}-\frac{55 i}{27 \sqrt{3}}}+\sqrt[3]{\frac{136}{729}+\frac{55 i}{27 \sqrt{3}}},

\frac{10}{9}+\sqrt[3]{\frac{136}{729}+\frac{55 i}{27 \sqrt{3}}} \left(-\frac{1}{2}-\frac{i \sqrt{3}}{2}\right)+\sqrt[3]{\frac{136}{729}-\frac{55 i}{27 \sqrt{3}}} \left(-\frac{1}{2}+\frac{i \sqrt{3}}{2}\right),

\frac{10}{9}+\sqrt[3]{\frac{136}{729}-\frac{55 i}{27 \sqrt{3}}} \left(-\frac{1}{2}-\frac{i \sqrt{3}}{2}\right)+\sqrt[3]{\frac{136}{729}+\frac{55 i}{27 \sqrt{3}}} (-\frac{1}{2}+\frac{i \sqrt{3}}{2})

which then after FullSimply gave me 3, 1, \frac{-2}{3} which is the same as the answer before.

axk

My favorite cubic polynomial was f(z) = z^3 + \sqrt{2}z^2 + \sqrt{3}z + \sqrt{5}. It is already a monic polynomial, so we can enter the coefficients into cardanoSolve:

cardanoSolve[Sqrt[2], Sqrt[3], Sqrt[5]].

This gives the following roots (it wouldn’t format correctly with TeX (perhaps it’s too long) so here’s an image instead):

JoeLemmings

My favorite cubic polynomial was f(z) = z^3 + 9. It is in depressed form where p=0 and q=9, so I used

cardanoSolve[0,9]

This gave me the roots \left\{-3^{2/3},-3^{2/3} \left(-\frac{1}{2}+\frac{i \sqrt{3}}{2}\right),-3^{2/3} \left(-\frac{1}{2}-\frac{i \sqrt{3}}{2}\right)\right\}

It was interesting that one of the roots did not have i as an answer. I assume this is because one of the zero’s of the function is merely looking for (-9)^{1/3}, but I am not sure.

tjenkin2

My favorite cubic polynomial is f(z) = \frac{1}{6}z^3 + \frac{1}{2}z^2 + z + 1, which can be written in monic form as f(z) = z^3 + 3z^2 + 6z + 6. With this I can find its roots using the cardanoSolve command:

cardanoSolve[3, 6, 6]

This gives me the following three roots:
-1 - \sqrt[3]{\frac{1}{\sqrt{2} - 1}} + \sqrt[3]{\sqrt{2} - 1},

-1 + \sqrt[3]{\frac{1}{\sqrt{2} - 1}}(\frac{1}{2} - \frac{i\sqrt{3}}{2}) + \sqrt[3]{\sqrt{2} - 1}(-\frac{1}{2} - \frac{i\sqrt{3}}{2}),

-1 + \sqrt[3]{\frac{1}{\sqrt{2} - 1}}(\frac{1}{2} + \frac{i\sqrt{3}}{2}) + \sqrt[3]{\sqrt{2} - 1}(-\frac{1}{2} + \frac{i\sqrt{3}}{2}).

warsh

My favorite cubic polynomial was f(z)=z^3-z. it is already in monic form. I used cardanoSolve to find its roots:

cardonoSolve[0,-1,0]

It gave the following roots:

-\frac{\frac{i}{2} - \frac{\sqrt3}{2}}{\sqrt3} + \frac{\frac{i}{2} + \frac{\sqrt3}{2}}{\sqrt3}, -\frac{(\frac{i}{2} - \frac{\sqrt3}{2})(-\frac{1}{2} + \frac{i\sqrt3}{2})}{\sqrt3} + \frac{(\frac{i}{2} + \frac{\sqrt3}{2})(-\frac{1}{2} - \frac{i\sqrt3}{2})}{\sqrt3}, -\frac{(\frac{i}{2} - \frac{\sqrt3}{2})(-\frac{1}{2} - \frac{i\sqrt3}{2})}{\sqrt3} + \frac{(\frac{i}{2} + \frac{\sqrt3}{2})(-\frac{1}{2} + \frac{i\sqrt3}{2})}{\sqrt3}.

The FullSimplify command in mathematica gives the simplified roots as {1,0,-1}.

For the other polynomial that I gave in the first forum post f(z)=z^3+z, cardanoSolve gives the roots as follows:

cardanoSolve[0,1,0]

0, \frac{-\frac{1}{2} - \frac{i\sqrt3}{2}}{\sqrt3} - \frac{-\frac{1}{2} + \frac{i\sqrt3}{2}}{\sqrt3}, -\frac{-\frac{1}{2} - \frac{i\sqrt3}{2}}{\sqrt3} + \frac{-\frac{1}{2} + \frac{i\sqrt3}{2}}{\sqrt3}.

Using the command FullSimplify again gives us the roots simplified to {0,-i,i}.

Francois

My favorite cubic polynomial has since changed, but it was f(x)= -1/2 x^3 + (1/3) x - 1/4 . f(x)=0, has monic form x^3-1/6x+1/8=0 .

I then used cardanoSolve with p=-1/6, and q=1/8 to obtain the following:

cardanoSolve[-1/6, 1/8]
\left\{-\sqrt[3]{\frac{1}{16}-\frac{\sqrt{697}}{432}}-\sqrt[3]{\frac{1}{16}+\frac{\sqrt{697} }{432},}\\ \left(\frac{1}{2}+\frac{i \sqrt{3}}{2}\right) \sqrt[3]{\frac{1}{16}-\frac{\sqrt{697}}{432}}-\left(-\frac{1}{2}+\frac{i \sqrt{3}}{2}\right) \sqrt[3]{\frac{1}{16}+\frac{\sqrt{697}}{432}},\\ \left(\frac{1}{2}-\frac{i \sqrt{3}}{2}\right) \sqrt[3]{\frac{1}{16}-\frac{\sqrt{697}}{432}}-\left(-\frac{1}{2}-\frac{i \sqrt{3}}{2}\right) \sqrt[3]{\frac{1}{16}+\frac{\sqrt{697}}{432}}\right\}

That is just fantastic.

Nathan

Using cardanoSolve, I found the roots of my favorite cubic polynomial, 8x^3-4x^2+2x-1. They are:
\left\{\frac{1}{6}-\sqrt[3]{\frac{1}{12 \sqrt{3}}-\frac{5}{108}}+\sqrt[3]{\frac{5}{108}+\frac{1}{12 \sqrt{3}}},\frac{1}{6}+\sqrt[3]{\frac{5}{108}+\frac{1}{12 \sqrt{3}}} \left(-\frac{1}{2}-\frac{i \sqrt{3}}{2}\right)-\sqrt[3]{\frac{1}{12 \sqrt{3}}-\frac{5}{108}} \left(-\frac{1}{2}+\frac{i \sqrt{3}}{2}\right), \frac{1}{6}-\sqrt[3]{\frac{1}{12 \sqrt{3}}-\frac{5}{108}} \left(-\frac{1}{2}-\frac{i \sqrt{3}}{2}\right)+\sqrt[3]{\frac{5}{108}+\frac{1}{12 \sqrt{3}}} \left(-\frac{1}{2}+\frac{i \sqrt{3}}{2}\right)\right\} .