cancel
Showing results for
Did you mean:
cancel
Showing results for
Did you mean:

Community Tip - Learn all about PTC Community Badges. Engage with PTC and see how many you can earn! X

6-Contributor

## Cubic equation with complex coefficients

Hello everyone !

For the cubic equation with real coeffs there are Cardano relations to find out roots. Or the use of trigonometric substitution.

Do you know similar formulas for the case of complex coefficients ?

Google is pointing to a paper in Soviet (now : Russian) Journal of Numerical Analysis & Mathematical Modelling, vol. 4(1991)/uncertain year/ (No. 2), p.315, which is out of my reach for the time being.

Thank you & best regards, Liv.

1 ACCEPTED SOLUTION

Accepted Solutions
24-Ruby II
(To:Liv)

26 REPLIES 26
23-Emerald III
(To:Liv)

Why not let Mathcad solve it:

the solution is a bit too wide to show here (like some 15 pages) The middle part is

It ends like:

Just a specific example:

The full symbolic solution is:

Luc

6-Contributor
(To:LucMeekes)

Oh, ok,  it's an idea !  Thank you !

Forgot completely that there is symbolic calculation available. Should have thought about....

I'll try to make that work for my application.

(For the sake of completeness, let me recall polyroots function, which is able to provide the roots for both real or complex coefficients cases).

However, still curious about relations given in the mentioned Russian journal.

You got it in Prime or Mcd15 ? If in Mcd15 how u managed to display all that when solving w(x) symbolically for roots, because I'm getting in Mcd15 the message " The symbolic result returned is too large to display, but it can be used in subsequent calculations if assigned to a function or variable " .

Best, Liv.

23-Emerald III
(To:Liv)

This was done in Mathcad 11... I can have my symbolic results virtually as large as I like. I believe that facility was not supported after Mathcad 11.

But in Mathcad 15 you should be able to use the results, even if you cannot see them.

In case you have a specific equation you want the full symbolic result of, I can do it and copy that to another expression. Then you can use it in Mathcad 15.

Success!
Luc

24-Ruby II
(To:LucMeekes)

Luc,

23-Emerald III

Attached!

Luc

10-Marble
(To:Liv)

The algebraic solutions/formulas for the cubic equation should remain valid for complex coefficients as well as for real coefficients. I'm not aware of anything in the process of finding these formulas that depends on the coefficients being real. Some assertions as to certain terms being real or imaginary may be depend on the coefficients being real, but not the formulas themselves.

Lou

6-Contributor
(To:LouP)

Agree... & wondering the same initially : why & what step of Cardano procedure might be inadequate for complex coefficients in Mathcad. I'll try to look better later for that. I've tested for the moment Cardano formulas f real coefficients and such as they provide wrong roots in the case of complex coefficients (but one root my be correct if one of the coefficients is real).

Best, Liv

10-Marble
(To:Liv)

Liv,

I tried a simple example (attached) in mathcad 11 using complex coefficients (almost same values as Luc), and found that symbolic and numeric solutions agreed.Can you post your example where you think the solutions for complex coefficients are incorrect?

For some reason, the symbolic evaluations in Luc's file didn't work in my Mathcad.

Lou

23-Emerald III
(To:LouP)

Hi Lou,

You too have still Mathcad 11 running....

Try this, to get symbolic results the size you want:Symbolic Solve Problem

Mind: the .reg file is no longer attached. They (PTC) threw that away when they 'improved' from Collaboratory to this forum.

Presently I have the NODE_DISPLAY_LIMIT set to 0x0000FFFF, which is 65535.

Success!

Luc

24-Ruby II
(To:LucMeekes)

Thanks for the tip.

23-Emerald III

You're welcome.

Luc.

24-Ruby II
(To:LucMeekes)

Luc,

I'm trying to find this line "NODE_DISPLAY_LIMIT" in "Preferences" for Mathcad 15, but I can not find it. And what you have in "Preferences" list for MC11 (screenshot would be better)?

23-Emerald III

As far as I know the NODE_DISPLAY_LIMIT register setting is only supported in Mathcad 11.

Over time I've seen nobody being successful in using it in any later version, don't know about earlier versions.

And it does not exist by default in Mathcad 11, you have to create the entry in the Windows register yourself.

Luc

24-Ruby II
(To:LucMeekes)

Dank je wel, Luc.

23-Emerald III

пожалуйста, Владимир.

6-Contributor
(To:LouP)

Sorry for my late reaction, but I was away for about one week.

Playing around with the roots of the cubic equation, Cardano relations and so on led to the file attached.

However, trying to solve symbolically the cubic with complex coefficient and define a general solution based on 8 parameters (real & imaginary parts of the coefficients) makes Mcd 15 hanging (even after Esc - Interrupting execution). Maybe it works in Mcd11...

Cardano formulae do not provide the correct roots in the case of complex coeffs (examples . The reason, I think, is the use of the convention employed by Mathcad when taking square (and cubic) roots of complex numbers when computing PR and QR of Cardano formulae. (from Mcd Help : "square root operator returns the principal-valued root, the one with the smallest non-negative complex argument"). Otherwise this convention is ok and very reasonable and probably used by all computing platforms, e. g. Maple, Matlab & so on (not verified personally yet).

I didn't know so far that if the roots are in arithmetic progression their inverses are in their turn roots of the cubic with coefficients in reversed order... Probably that's can be found in some textbook with math exercises & problems (see first 3 examples in attached). Almost sure that's true for polynomials of any degree n >= 3. Proof by induction... ? but not time yet to check it. Moreover that holds for complex coeffs (ex. 10).

Why that happens too for roots  -1/2 , -1/3 & 1/6 ... ? I've tried to quickly find a generalization based on the relation between these three values (i.e. x3 = x1 * x2 and x3 = x1^2 / (1 - x1) ), but not found.

Best, Liv.

Can find no more the "Actions ---> Attach file" button ... !    No such button for a Reply...?

I'll send my file asap, somewhere in this thread...

23-Emerald III
(To:Liv)

You do actions and choose edit, then you get the attach link on the right side.

Luc

6-Contributor
(To:LucMeekes)

Thank you.

24-Ruby II
(To:Liv)

6-Contributor

Thanks a lot Vladimir & all.

L.

24-Ruby II
(To:Liv)

You're welcome.

6-Contributor
(To:Liv)

Coined file - sent.

Best, Liv.

(ok, attaching files available only from "Advanced Editor"... ?)

23-Emerald III
(To:Liv)

I put some of the symbolic results of mathcad11 as .solved expressions in, they are marked green.

If this helps you, and you need more, don't hesitate.

Good luck.

Luc

To attach, choose the advanced editor;

or first submit, then Action => Edit gives you the attach link.

6-Contributor
(To:LucMeekes)

Thank you, Luc !

LOL, huge... (80 p wide).

But again same problem : makes my Mcd15 to hang (and my laptop is not so bad...), even if put Disabled to the first green area (the wide one).

So, to complete, please resend the file without this area.

Adding   assume r0, r1, ..., m3 = real / & simplify    after solve doesn't produce something simpler/shorter... ?

Regards, Liv.

23-Emerald III
(To:Liv)

Here you go.

Simplify has the tendency to 'simplify' any expression involving division into a single quotient. Here's an example:

That does not always make things 'better' in the sense of clarity.

Assuming all components of rv and mv=real didn't help.

Success!

Luc

6-Contributor
(To:LucMeekes)

Thank you very much (again) !

Liv.

Announcements