Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: Notesfiles $Revision: 1.7.0.8 $; site uiucdcsp Path: utzoo!watmath!clyde!cbosgd!ihnp4!inuxc!pur-ee!uiucdcsp!ashby From: ashby@uiucdcsp.CS.UIUC.EDU Newsgroups: net.math Subject: Re: cubic roots Message-ID: <9600019@uiucdcsp> Date: Tue, 15-Oct-85 13:07:00 EDT Article-I.D.: uiucdcsp.9600019 Posted: Tue Oct 15 13:07:00 1985 Date-Received: Thu, 17-Oct-85 23:34:13 EDT References: <1798@hao.UUCP> Lines: 17 Nf-ID: #R:hao.UUCP:-179800:uiucdcsp:9600019:000:708 Nf-From: uiucdcsp.CS.UIUC.EDU!ashby Oct 15 12:07:00 1985 There is an "easy" closed formula for the roots of an arbitrary cubic (and quartic). You should be able to find it in any book of mathematical formulae (eg, CRC). However, if you need to compute these roots, then the formulae are not very good. The following "algorithm" is a numerically stable way of computing the roots of any nth degree polynomial (n not too big): 1) Set up the poly's companion matrix. (This is defined in almost any linear algebra book.) 2) Now compute the eigenvalues of the matrix. To do this the package EISPACK is recommended. (If you don't have this pkg, you should get it; it is in the public domain.) 3) These egvals are the desired roots of the poly.