ALTERNATIVE SOLUTION TO THE QUARTIC EQUATION b Farid A. Chouer, P.E. 006, All rights reserved Abstract A new method to obtain a closed form solution of the fourth order olnomial equation is roosed in this aer. The algorithm is robust, avoids comlex numbers under the square roots in the solution, has a new resolvent cubic equation and simle to build without the need for iterative methods. Also, the most ositive and most negative root in the third order olnomial solution will be clearl defined among all the existing roots. Ke words quartic equation, cubic equation, olnomial equation, roots of a olnomial.. Introduction. In man design situations in engineering, and in the numerical analsis of models of natural sstems, one often requires the solution of a third or a fourth order olnomial equation. In man cases, when solving the roblem several times, seed is of imortance and hence, a closed form solution is referred. Also, if the roots of the equations need to be differentiated or integrated with resect to a certain coefficient, one often relies on a closed form solution. The solution for a olnomial u to the fourth order can be found in man Mathematics and Engineering handbooks [,]. The classical solution of the fourth order equation requires the finding of an one root of another third order olnomial, called the resolvent cubic, which is derived from the original equation. However, in man cases, when this root is found and imlemented in the solution, an undesirable imaginar number inside a square root sign ma occur in the obtained roots. Thus, the user must take further stes to obtain the rincial roots. For this reason the distinction between the four roots is not clear. Electrical/Structural/Foundation Professional Engineer, BSEE, MSEE, MSE (Structural) from the Universit of Washington, Seattle, WA. President of FAC SYSTEMS INC. Seattle, WA (www.facsstems.com)
In man engineering roblems an earl distinction between the roots can be valuable. For examle, the design calculation for the underground deth of a sheet ile wall require solving a third or fourth order olnomial equation. At least one of the roots in the solution of this equation is exected to be ositive. The most ositive will generall be used as the design arameter, while the other roots are ignored. If an earl distinction can be made of which root will give the most ositive value, much time will be saved. Onl one root will be calculated with confidence, instead of three or more. Thus, there is less chance of errors. It is the urose of this article to resent a general, comutationall efficient, and closed form solution for the quartic equation and to clearl define among all the existing roots the most ositive and negative root for the cubic equation.. Lemma. The roots of the Quartic equation (.) + + q + r+ s= 0 are: (.) n n a b, = + ±, and n (.), = n n a b ± + n where (.) a = 6 + q, b = 8 q r b 0,, and n > 0 is the most ositive root of the cubic equation (.5) n + an + ( a c) n b = 0 where
(.6) c = + q r s If b = 0, then the roots,,, = x, where x is the root of the following equations (.7) ± [ c a] x+ c = 0 x ; for a < c or (.8) a x = ± c ; for a c. In all of the above terms there are no imaginar values under the square root signs. (.) + + q + r+ s= 0. Proof of Lemma. for the following quartic equation define and substitute x = + in equation (.). Thus the equation becomes (.) x + ax + bx+ c= 0, where (.) a = 6 + q, b = 8 q r, and c = + q r s If b = 0 then equation (.) becomes (.) x + ax + c= 0, 5
and the solution can be obtained b using the classical method of solving the roots of a quadratic equation in x. Thus, equation (.8) is obtained. This solution is chosen when the discriminant is greater than zero, or when root of equation (.8). For the case when a c. In this case, no imaginar number is resent under the square a < c, equation (.) is factored into two quadratic olnomials, as in equation (.7). B finding the roots of the quadratic equations in of equation (.7), the four roots are obtained. Consequentl, the roots of equation (.) are obtained when b = 0, and the solution of equation (.) is = + x. If b 0, then equation (.) can be written as follows a n b a n b (.5) x + ax + bx+ c= x nx+ + + x + nx+ + n n, where n is a new unknown constant. B algebraicall multiling the two quadratic olnomials of equation (.5) the following equation is obtained (.6) x a+ n b + ax + bx+. n B equating the coefficients of equation (.6) to the coefficients of equation (.) term b term, the following condition must be satisfied a+ n b (.7) = c n. B rearranging equation (.7) ields the cubic equation (.5); ( a c) n = 0 n + an + b. This cubic equation has at least one ositive root. This can be seen b Descartes' rule of signs and the fact that the last term on the left side of the equation is negative. So for examle, if equation (.5) is set to equal some function f(n) instead of zero, then f(0)<0 and f(+ )>0, which means a change of sign occurs in the interval 0<n<+ and a ositive real root must exist. B taking the most ositive root of equation (.5), n>0 is found. Substituting n in the two factored quadratic 6
olnomials of equation (.5) and solving for the roots of these factors b using the classical solution of a quadratic equation, gives the last two terms on the right side of equations (.) and (.). Finall b adding the term. is roven. to the solution, the roots,,, are obtained. Thus Lemma. Lemma. For the cubic equation (.) + + q+ r = 0, where its three real roots can be written (.) = m cosθ π = mcos( θ + ) and π = m cos( θ + ), with a b m=, θ = cos, am a = + q, and b = q r, is the most ositive root, is the most negative root, and. (5.) + + q+ r = 0 5. Proof of Lemma. for the cubic equation define and substitute x= + in equation (5.). Thus the equation becomes (5.) x + ax+ b= 0, Where 7
(5.) a = + q, and b = q r. According to the classical solution [], if + 0, there are three real roots (5.) = m cosθ π = mcos( θ + ) and π = m cos( θ + ), with a b m= and θ = cos. am Now, if + 0 (5.) is ositive. Also, if + 0, then ields, then a < 0 or a > 0 a. Thus a. Thus, m > 0, and the amlitudes of equation a b a a and this inequalit (5.5) am b am b or = cosθ. am Therefore, (5.6) 0 θ π or Also, π 0 θ. π π (5.7) θ + π and π π 5 θ + π. Since m > 0, the curve of the roots as a function of the coefficient Ω can easil be lotted as = m cosω. This curve, reresenting equations (5.), is shown in Fig.(). The intervals 8
π π 0 Ω, Ω π and the figure. π 5 Ω π, where the three roots can be found, are identified in Interval for = mcosω - / -/ 0 π/ π/ π π/ 5π/ Figure () Plot of intervals of roots to the cubic equation. From Fig.(), it is clear that is the largest root, is the smallest root, and If two roots are equal, then the would be on the dashed line in Fig. () and Ω can be π/ or π/ (θ = π/ or θ = 0). If three roots are equal, then m and a must be 0, and equation (5.) does not al because + > 0. Thus Lemma is roven. To comlete the solution of the cubic equation for the other case where + > 0, the second art of the solution is stated as follows: the onl real root is (5.8) = + [ + + u] + [ + u ] where u =. 9
For the remaining imaginar roots, let quadratic equation in x x = + and solve for the roots of the following (5.8) x + x x+ a+ x = 0 The comlex roots are, x x = x, = a i ± + 6. Algorithm. The following algorithm is used to find the most ositive root of the cubic equation + + q+ r = 0 Ste. Find the values a and b where a = + q, and b = q r Ste. Find the value u, where u = and b 0. If b= 0 and a < 0 then go to ste 5 else if b= 0 and a 0 then x 0 and go to ste 7 Ste. If +u < 0 go to ste 5; otherwise, go to ste. Ste. Find the value x, where x [ + + u] + [ + ] = u And then go to ste 7. Ste 5. Find the values a b m= and θ = cos am Ste 6. Find the value x, where x = m cosθ. = For the resolvent cubic equation (.5), if the root x = 0, it makes n = 0 or b = 0 in equation (.5). Which it is not allowed. When finding the root of the resolvent cubic equation b 0 in equation (.5) is alwas assumed. 0
Ste 7. Find the root = x, which is the most ositive root. If one would like to continue to find the remaining roots, then continue with ste 8. Ste 8. if +u < 0 go to ste 9 else the roots are comlex and are, x x = x, = a i ± + Ste 9. the roots are real and are, = x, = x x ± a 7. Algorithm. The following algorithm is used to find the roots of the quartic equation + + q + r+ s= 0 Ste. Find the values a, b and c where, a = 6 + q, b = 8 q r, and c = + q r s Ste. If b 0, then go to ste 6; otherwise, go to ste. Ste. If a c, then go to ste 5; otherwise, go to ste. Ste. Find the four roots x, x, x and x of the following two quadratic equations: [ ] c a x+ = 0 x + c and In order to be sensitive to comuter code rogramming the two roots, of equation (.) are not used.
[ ] c a x+ c = 0 x, and then go to ste 9. Ste 5. Find the four values x, x, x and x, of the following two quadratic equations x a and = + c and then go to ste 9. a x = c, Ste 6. Find the most ositive n > 0 using algorithm in section 6 of the following cubic equation ( a c) n = 0 n + an + b. Ste 8. Find the four roots x, x, x and x, of the following two quadratic equations a n b x nx+ + + = 0 and n a n b x + nx+ + = 0. n Ste 9. Find the roots,,, = x,,,. 8. Conclusions. The resented new closed form solution of the quartic equation is robust and simle to build without the need for iterative methods. It avoids having imaginar numbers under a square root sign. Thus when the solution is used, fewer stes are needed. The stes are eas to track. Calculation time is shortened giving good confidence level. In the second art of the aer, the most ositive and negative roots of the cubic equation are identified. This identification hels to solve for the roots of the new resolvent cubic equation of the quartic equation and is needed in man engineering alications. The resented cubic and quartic algorithm has been used in shoring
and foundation engineering in the western United States b several consultants including cit and state engineering deartments for over 0 ears with no errors and no ossibilit of errors giving a good confidence level in the solutions. The results alwas made sense from an engineering ersective. The solution is a classic examle of how to be careful with cook book mathematical solutions showing the resented alternative is referred. The algorithms resented in this aer are efficient and can be used in various comuter rograms. If used in some comuter rograms, where iteration methods are difficult to rogram and where the execution time is considerabl slow, will shorten the execution time. One alication of such a rogram is a sread sheet, where columns or rows of olnomial root solutions are created and listed in a table.. Carl E. Pearson, Handbook of Alied Math, nd ed., Van Norstrand Reinhold, New York, 98, age &. Samuel M. Selb, Standard Math. Tables, 0th ed., the Chemical Rubber Co., Cleveland, Ohio, 97, age 0)06.