and now for something completely different. I've been thinking about cubics a lot lately, and tried to work out some cubics by Cardano's method. Not like the computer does, but in a symbolic way. And I keep hitting the snag that if a cubic has three real solutions, then u³, one of the intermediate results, will be a complex number in cartesian form. Now, I want to take its cube root, but I can only get numeric solutions, not symbolic ones, anymore.
I suppose I should explain Cardano's method first. If you have a general cubic equation ax³ + bx² + cx + d = 0, the first thing you do is divide everything by a. Then you have x³ + b'x² + c'x + d = 0. You then perform a substitution x = t - b/3. This results in the equation t³ + pt + q = 0. Which is equivalent to t³ = -pt - q. The genius of Cardano's method is then to substitute t = u + v, so adding two new variables. The left-hand side will then expand to u³ + 3u²v + 3uv² + v³ = (u³ + v³) + 3uv(u + v). But u + v = t, so this means (u³ + v³) + 3uvt = -pt - q. This leads to the equation system:
Code: Select all
I. u³ + v³ = -q
II. 3uv = -p
Now, the problem is, even if the actual solutions of the equation are simple, it can be hard to find them this way. In my example, I found that u³ = 10 + i √243. Now, before taking the cube root, I would like to put that into polar form. The radius is simple, and simplifies to 7√7. But the angle is just some arctangent. Probably a transcendental number. Then I take the cube root, which means taking the cube root of the radius, which gives √7, but the angle is just that weird arctangent expression divided by 3. And then I have to calculate the cartesian form again, because I am going to be adding these things together in a bit, and that is where I cannot proceed symbolically.
My program doesn't care, it will just calculate these things numerically, but this leads to numerical error. In my example, it did calculate the roots of 2, 3, and 5 correctly, but gave them each a tiny imaginary component. However, it also calculated that my u and v are numbers that look to me like they are rational if expressed in cartesian form.
I hit upon the idea of drawing a triangle to help me get ahead, but now I have the problem of trisecting an angle in geometry. I'm stuck. And google (or duckduckgo in my case) failed to find the answers I was looking for. Can someone help?