OSDev.orghttps://forum.osdev.org/ Cube root of a complex numberhttps://forum.osdev.org/viewtopic.php?f=11&t=37075 Page 1 of 1

 Author: sunnysideup [ Wed Aug 05, 2020 5:41 am ] Post subject: Re: Cube root of a complex number I did a quick search for Cardano's formula (https://en.wikipedia.org/wiki/Cubic_equ ... 's_formula). Assuming your coefficients are real, there is guaranteed to be at least one real solution to your cubic equation. In the article, there is a formula for this real solution (There are cube roots involved, but since everything is real, I assume taking the cube root will be simple). From this real root, it is simple to get the other roots. I'm not sure I understand your question completely... Do you just want a technique to get the cube root of a complex number? Or do you want to solve a cubic equation (with real roots)? If it's the latter, I don't think you need to take the cube root of a complex number. I could be wrong though... P.S: I just read through the article really quicky, and I assume that your coefficients are real (You say that the equation has 3 real roots, so the coefficients are real). I will try to read more about it when I have time

 Author: nullplan [ Wed Aug 05, 2020 7:22 am ] Post subject: Re: Cube root of a complex number sunnysideup wrote:In the article, there is a formula for this real solution (There are cube roots involved, but since everything is real, I assume taking the cube root will be simple).Well, almost. The cube root is not even the problem, since all real numbers have a cube root. No, the problem is the square root inside of the thing. It is possible (in fact, extremely possible, namely it happens whenever there are three real roots) that the radicand is negative, thereby turning the result of the square root into an imaginary number. In fact, the radicand of the first cube root is my u³.sunnysideup wrote:Do you just want a technique to get the cube root of a complex number?Yes, but the number is given as the solution of a quadratic equation, so it is in Cartesian form. And I want to get a symbolic result, not a numeric one. Numeric is easy, anyone can do that.As I said, in my example I have u³ = 10 + √243 i. In order to take the cube root, I want to convert this into polar form, but that only gets me u³ = 7√7 exp(i atan(√243 / 10)). The problem is, the cube root will divide the angle by three, and then turning that into Cartesian form again makes me work with the sin(atan(...)/3). And that is not very insightful. I have no way to simplify that. Maybe my geometry is too weak for that.

 Author: sunnysideup [ Wed Aug 05, 2020 8:03 am ] Post subject: Re: Cube root of a complex number I'm not too familiar with the theory of cubic equations, Galois theory, etc... I just wanted to share this with you however: Quote:When a cubic equation with real coefficients has three real roots, the formulas expressing these roots in terms of radicals involve complex numbers. Galois theory allows proving that when the three roots are real, and none is rational (casus irreducibilis), one cannot express the roots in terms of real radicals.https://en.wikipedia.org/wiki/Cubic_equ ... _solutions

 Author: nullplan [ Wed Aug 05, 2020 9:29 am ] Post subject: Re: Cube root of a complex number Awesome. So what I'm asking may be impossible. At least in the general case.I thought about it a bit longer, and managed to refine the question into pure geometry: A right triangle with legs a and b has corner point C at the right angle. The angle between a and the hypotenuse is trisected, and the trisector closest to a meets leg b in point D. What is the length CD in terms of a and b?Let us first define some more objects. The corner points A and B are opposite of legs a and b, respectively. So, B is the corner at which the angle was trisected. Obviously, since the right angle at C is also a part of it, triangle BDC is also a right triangle. Does that help me at all? Yes it does! The angle DBC is one third of angle ABC. So sin ABC = 3 sin DBC - 4 sin³ DBC = b/√(a² + b²). Gnarglblargl; that is as good as it was before. If I want to solve this for sin DBC, I have to solve a depressed cubic. Which is what I'm currently doing. I'm spinning in circles. Does someone have better geometry skills than me?

 Author: sunnysideup [ Wed Aug 05, 2020 10:24 am ] Post subject: Re: Cube root of a complex number It's not a question about geometry skills anymore XD... To me, it feels like a thing one can/can't do. Kind of like the Second Law of Thermodynamics - It doesn't say much about what you can do, but what you can't. As my professor says, "A person who works for his entire life to build a heat engine more efficient that the Carnot engine is nothing but a fool" XD. No offence of course .

 Author: linguofreak [ Wed Aug 05, 2020 3:44 pm ] Post subject: Re: Cube root of a complex number I think your difficulty may be related to the fact that it is impossible (in the general case) to trisect an angle with a compass and straightedge construction?

 Author: nullplan [ Wed Aug 05, 2020 11:03 pm ] Post subject: Re: Cube root of a complex number Maybe, but then I never limited the construction to compass and straightedge. Just because Pythagoras liked to do that doesn't mean I have to do the same. The whole world of possibilities is open to you. My problem is that it appears that in general, not much can be said about the sine/cosine of an angle that is only known to be some arctangent divided by three. However, trying to take the cube root in Cartesian form is also not a whole lot simpler. In fact, it is not simple at all.In Cartesian form, the cube root of the complex number c + di can be defined as a + bi. Then the following holds:Code:c + di = (a + bi)³ = a³ + 3a²bi + 3ab²i² + b³i³ = a³ + 3a²bi - 3ab² - b³i = (a³ - 3ab²) + (3a²b - b³) iTherefore:I.  a³ - 3ab² = cII. 3a²b - b³ = dAnd now I only need to solve this system of equations for a and b. Seems like a fun afternoon. I typed this into maxima to have it solved automatically, and now it is calculating. I is still calculating at this point. If a CAS is taking this long I don't like the chances of a human doing this work. Oh god, now it is eating all my RAM. I thought 8 GB was overkill, but now they are gone! BRB.

 Author: Thomas [ Wed Aug 05, 2020 11:12 pm ] Post subject: Re: Cube root of a complex number I would need to take some time to dig this further, it is a long time since I did something like this. But your approach of going with polar form seems right to me. BTW it is disputed whether Carden first solved cubic equations, he was the first to publish. https://www.storyofmathematics.com/16th_tartaglia.html--Thomas

 Author: nullplan [ Wed Aug 05, 2020 11:24 pm ] Post subject: Re: Cube root of a complex number OK, so maxima did not like this system of equations, and in the end failed to solve it. Therefore I don't think I will find any happiness this way, either. If the CAS runs out of memory, what would happen to the human?So, that's it? You can't symbolically take the cube root of a complex number? Bummer.That means you can never show a solution to be actually real if numeric error creeps in. I am beginning to understand why that method isn't taught in school: Even "simple" equations with only natural roots are a pain to work with.Thomas wrote: BTW it is disputed whether Carden first solved cubic equations, he was the first to publish. Yeah, publish or perish. As I know the story, Scipione del Ferro might have been the first to discover the method, but he kept it a secret because this way his job was secured. Niccolo Tartaglia discovered the method concurrently or shortly thereafter, independently, and also kept it secret. By a ruse, Cardano managed to get Tartaglia to tell him the secret, but was sworn to secrecy himself. But then, del Ferro died and Cardano was tasked with administrating his estate (it's a small Italy, I guess). Cardano discovered that del Ferro had known the method as well, and independently of Tartaglia. So now Cardano felt free to publish how to do it by del Ferro's method, since he had only sworn not to publish Tartaglia's method. Tartaglia himself was enraged by the publication and tried to publish his own book, telling the story from his point of view, but it was too late, and the formulas would go down in history as Cardano's formulas.Luckily none of those bollocks happen anymore. These days we just sue each other into oblivion, much more civilized.

 Author: linguofreak [ Tue Aug 11, 2020 7:25 am ] Post subject: Re: Cube root of a complex number nullplan wrote:Maybe, but then I never limited the construction to compass and straightedge. Just because Pythagoras liked to do that doesn't mean I have to do the same.Not explicitly, but the point is that compass and straightedge constructions limit you to a certain set of operations, and depending on what you mean by "symbolically" taking the cube root of a complex number, I have a sneaking suspicion that you're limiting yourself to precisely that set of operations, in which case you won't be able to solve anything that can't be solved with compass and straighedge.From Wikipedia:Quote:Given a set of points in the Euclidean plane, selecting any one of them to be called 0 and another to be called 1, together with an arbitrary choice of orientation allows us to consider the points as a set of complex numbers.Given any such interpretation of a set of points as complex numbers, the points constructible using valid straightedge and compass constructions alone are precisely the elements of the smallest field containing the original set of points and closed under the complex conjugate and square root operations (to avoid ambiguity, we can specify the square root with complex argument less than π). The elements of this field are precisely those that may be expressed as a formula in the original points using only the operations of addition, subtraction, multiplication, division, complex conjugate, and square root, which is easily seen to be a countable dense subset of the plane. Each of these six operations corresponding to a simple straightedge and compass construction. From such a formula it is straightforward to produce a construction of the corresponding point by combining the constructions for each of the arithmetic operations. More efficient constructions of a particular set of points correspond to shortcuts in such calculations.

 Author: nullplan [ Tue Aug 11, 2020 8:23 am ] Post subject: Re: Cube root of a complex number linguofreak wrote:Not explicitly, but the point is that compass and straightedge constructions limit you to a certain set of operations, and depending on what you mean by "symbolically" taking the cube root of a complex number, I have a sneaking suspicion that you're limiting yourself to precisely that set of operations, in which case you won't be able to solve anything that can't be solved with compass and straighedge.I mean, I want a solution consisting of mathematical symbols that actually equals what I am looking for. And no, I don't limit myself to the four basic operations and the square root, you can give me a cube root as well. Or rather: You can give me any polynomial expression.In my example, I have u³ = 10 + √243 i, and I am looking for u. I know that u is about 2.5 + 0.866024. I can take a reasonable guess that that first number is actually 5/2, but what is that imaginary part? A root of something? A cube root expression? I don't know!

 Author: quirck [ Tue Aug 11, 2020 1:39 pm ] Post subject: Re: Cube root of a complex number Consider a quadratic equation x^2 + ax + b = 0 with roots p and q. Then the quadratic equation with roots p^3 and q^3 will be x^2 + (a^3 - 3ab)x + b^3 = 0.Take our complex number and its complement: 10 + i sqrt(243) and 10 - i sqrt(243). These are the roots of x^2 - 20x + 343 = 0. So, b^3 = 343, thus, b = 7, and a^3 - 3ab = -20, a^3 - 21a + 20 = 0, this has rational roots that can be found by probing. Take any root, for instance, a = -5. Then we have equation x^2 - 5x + 7 = 0, whence x = 5/2 +- i sqrt(3)/2. This is a cube root of 10 +- i sqrt(243). Other values of a give remaining roots.

 Author: nullplan [ Wed Aug 12, 2020 10:14 am ] Post subject: Re: Cube root of a complex number Thanks, that helps a lot. That is an approach I had not considered. Of course, it means that in order to solve a cubic, I first have to solve a cubic, but still, this transformation might come in handy. In fact, if I'm not mistaken then in the quadratic equation for u³, the constant part is always a cube of a rational number (provided you start with rational coefficients), so the equation for a will always have rational coefficients.

 Page 1 of 1 All times are UTC - 6 hours Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Grouphttp://www.phpbb.com/