Finding real roots

Finding real roots - analytical cubic and quartic equations with real roots - Messages

#1 Posted: 9/27/2017 12:04:47 AM
sklakamp

sklakamp

0 likes in 2 posts.

Group: User

I am using SMath to solve cubic and quartic polynominals with exact analytical equations I coded years ago in Mathcad 15. SMath opens up the old Mathcad files satisfactorily, however, some of the intermediate algebraic equations in the analytical solution (about 5 to 8 steps with various equations to get to the analytical solutions) have real and imaginary roots. I see how to make SMath produce real roots under the options tab, however, that isn't working apparently since SMath seems to only want to use the imaginary solutions. In Mathcad it was possible to make certain intermediate equations to give only their real roots. I think the problem is that some of the intermediate equations do only have imaginary roots while other intermediate equations have both real and imaginary roots so when the "real" root option is chosen in SMath it screws the whole worksheet up. Therefore, my question is whether it is possible to tell SMath to only give the real roots for certain intermediate equations like in Mathcad, but not for all the equations (since some do in fact only have conjugate imaginary roots). My guess is that is not possible to do in SMath, but I wanted to ask the experts in case I missed something in SMath since I am a new user.
#2 Posted: 9/27/2017 10:51:01 AM
Jean Giraud

Jean Giraud

983 likes in 6866 posts.

Group: User

These two documents may help treat your project.
The Smath work sheet will help, for sure.
Quartic comes from school book, easy.
Cubic come from advanced algebra stuff, rare to find.
Personally, I'm only user of cubic in modeling the
process control algorithms, because of the relationship
with some of the cubic roots relationship.

Cheers, Jean

Cubic solver [Lagrange canonic].sm (19 KiB) downloaded 73 time(s).

Cubic solver [Types 1, 2].sm (48 KiB) downloaded 71 time(s).
#3 Posted: 9/27/2017 1:37:35 PM
sklakamp

sklakamp

0 likes in 2 posts.

Group: User

Jean,

Thank you for the cubic solver. I will look at it in depthly. I still think the set of algebraic equations I have from Mathcad 15 (coded into a worksheet years ago from looking at reference mathematical books) that I tried to bring into (mostly successfully) SMath except for some of the intermediate equations giving their complex number solutions instead of their real roots needed for subsequent computation in the analytical solution. I believe the cubic and quartic analytical solutions were done in ~1500 AD with another professor stealing credit for the solution from his postdoc (not called a postdoc back them, but in essence he was a postdoc) who had also served with the other professor. I am always amazed how human nature never changes!

There is also a trigonometric solution for cubic equations that I have not tried in SMath yet that may work as an alternative to what I am using. Some of the intermediate equations I am currently using contain a square root within a cubic root and that is where most of the problems are coming from I believe. Once I get a free 30-day trial to Mathcad 15, I will compare to see where the exact discrepancy in computation is coming from between SMath and Mathcad 15.

Thank you again for the help.
#4 Posted: 9/27/2017 10:36:53 PM
Jean Giraud

Jean Giraud

983 likes in 6866 posts.

Group: User

Wrote

Once I get a free 30-day trial to Mathcad 15, I will compare to see where the exact discrepancy in computation is coming from between SMath and Mathcad 15.

.

In 2015, PTCMathcad 15 came with 3 links
1. Mathcad itself most probably limited in functionalities,
a PTC design board edition with MuPad symbolic, now obsolete.
2. the 2nd link was a web fishing server in Costa Rica ...
over two pages of links to "all of you" ... your e-mails
e-mails clients ...etc.
3. the 3rd link is the 30 days time stamp.

The oldest known cubic solver is Cardan, does not solve complex.
More recently, Laguerre and finally the public numerical Polyroots.
Above cubic, there is no known [to me] analytical solver
except for trivial reducable. I confused myself saying
"Quartic" from school book, I meant "Quadratic".

Type 1 or type 2 are equivalent. Type 2 gives formal insight
about the types of roots expected [see work sheet].
Easy to sub-extract either imaginary/real roots.

Jean




#5 Posted: 9/28/2017 9:47:35 AM
Jean Giraud

Jean Giraud

983 likes in 6866 posts.

Group: User

The given cubic is complex wrt roots. There is no need for whatever
roots separation in the solving for roots. It reconstructs itself
in any roots format from the Lagrange iterated product... as exemplified.
Further, no need for cubic solver(s) ... polyroots is all what's needed.

Jean

Cubic solver Exercise.sm (16 KiB) downloaded 67 time(s).
  • New Posts New Posts
  • No New Posts No New Posts