Solving a cubic equation using trigonometry  Printable Version + HP Forums (https://archived.hpcalc.org/museumforum) + Forum: HP Museum Forums (https://archived.hpcalc.org/museumforum/forum1.html) + Forum: Old HP Forum Archives (https://archived.hpcalc.org/museumforum/forum2.html) + Thread: Solving a cubic equation using trigonometry (/thread180771.html) 
Solving a cubic equation using trigonometry  Thomas Klemm  03222011 A while ago I've posted a program that uses ACOSH to solve a quadratic equation:
Recently I stumbled across a way to solve a cubic equation using trigonometry. Some of you might find that interesting as well.
Cheers
EquationsA general cubic equation can be transformed to the following form using a substitution:
The trick is to use the following identity:
Here we set:
With the following substitution we can get a closedform solution:
A similar formula can be found using the following identity:
Programs
00 { 31Byte Prgm } 00 { 34Byte Prgm }
Examplesx^{3} + 6x  2 = 0
CuEq: 3.27480002074E1 i0 x^{3} + 3x  4 = 0
CuEq: 1 i0
References
Edited: 22 Mar 2011, 12:51 p.m. after one or more responses were posted
Re: Solving a cubic equation using trigonometry  Paul Dale  03222011 Thomas, Very nice. Worthy of an article?
Re: Solving a cubic equation using trigonometry  x34  03222011 Doesn't general cubic equation contain a squared element also?
Re: Solving a cubic equation using trigonometry  Thomas Klemm  03222011
Quote: This leads to formulas for p and q based upon a_{i}.
Cheers Re: Solving a cubic equation using trigonometry  Crawl  03222011 By the way, this was the basis for HP15C minichallenge: Impossibly Short
Re: Solving a cubic equation using trigonometry  Namir  03222011 Last fall I spent much time studying the solution of polynomials, from cubic and up. I spent a lot time looking at the algorithms that solve general cubic polynomials. I used Matlab as the primary tool and then attempted to port solutions to Excel VBA and the HP41C. I came to the conclusion that to solve cubic polynomials you best need a tool that automatically handles complex numbers. Matlab does that well and the graphing HP calculators too (although I only used PROOT to do that and wrote about it in the HP's SOLVE newsletter). The HP42S is probably useful. J.M. Baillard has developed really cool HP41C programs that solve for the roots of polynomials (with real and complex coefficients. You can find them on this web site's HP41C program library section.
Namir
Re: Solving a cubic equation using trigonometry  Thomas Klemm  03222011 Thanks for pointing that out. The challenges of this forum are always a marvelous source of inspiration. However here's my source:
Mathematical Omnibus: Thirty Lectures on Classic Mathematics
Chapter 2. Equations Though I haven't read the whole book yet I can only recommend it.
Best regards
Re: Solving a cubic equation using trigonometry  Ángel Martin  03222011
Quote: Like the 41Z module perhaps? :) Well, notwithstanding all the references you mention (well worthy of their effort) the 41Z includes ZPROOT, adapted from Valentin Albillo's original program for the 41.
Cheers, Re: Solving a cubic equation using trigonometry  Namir  03232011 And the 41Z module too!!! :)
Namir
Re: Solving a cubic equation using trigonometry  Frido Bohn  03242011 Quote: Indeed, the presented formula shows a "depressed cubic". Re: Solving a cubic equation using trigonometry  Eddie W. Shore  03262011 We can combine this with a synthetically dividing the cubic equation by the root and then use the quadratic formula to find the other two roots.
Very nice.
