[Search for users] [Overall Top Noters] [List of all Conferences] [Download this site]

Conference rusure::math

Title:Mathematics at DEC
Moderator:RUSURE::EDP
Created:Mon Feb 03 1986
Last Modified:Fri Jun 06 1997
Last Successful Update:Fri Jun 06 1997
Number of topics:2083
Total number of notes:14613

1397.0. "Solving a quadratic equation" by SMAUG::GARROD (An Englishman's mind works best when it is almost too late) Wed Mar 13 1991 23:15

    I know this is a simple question. It seems a bit out of place here
    amongst all the 'high' maths I see in the other topics. I looked
    for a notes string on it but couldn't find one. Anyway introduction
    over.
    
    The solution to the quadratic
    
    ax�+bx+c=0
    
    is  x = (-b�sqrt(b�-4ac))/2a
    
    Hope I got that right. I've been driving my self nuts trying to prove
    this. I tried starting off with trying to work out alpha and Beta
    from
    
    (x-alpha)*(x-beta)=0
    
    but all I seem to end up with is another quadratic in 'alpha' or 'beta'
    that needs to be solved.
    
    I remember being taught the above at school 15 years ago but for the
    life of me I can't remember how to prove the above.
    
    Also I seem to remember that there is no analytic solution for a cubic
    equation or above. True? If not what are the equivalent solutions and
    proofs.
    
    Thanks in advance for illuminating me,
    
    Dave
T.RTitleUserPersonal
Name
DateLines
1397.1HPSTEK::XIAIn my beginning is my end.Thu Mar 14 1991 00:0011
    ax^2 + bx + c = 0
    
    x^2 + (b/a)x + c/a = 0
    
    x^2 + (b/a)x + (b/2a)^2 + (c/a - (b/(2a))^2) = 0
    
    (x + b/(2a))^2 = ((b/(2a))^2 - c/a)
    
    Then you take square root on both side and you get the answer.
    
    Eugene
1397.2ELIS::GARSONV+F = E+2Thu Mar 14 1991 02:4714
    re .0
    
>    Also I seem to remember that there is no analytic solution for a cubic
>    equation or above. True? If not what are the equivalent solutions and
>    proofs.
    
    Solutions for a general cubic can be found in closed form. The algebra
    is relatively straightforward. You may even find it elsewhere in this
    conference otherwise I can try and rustle it up.
    
    I think the general quartic can be likewise solved but I have never
    seen a derivation. I would be interested also if anyone has one.
    
    I think the general polynomial of any higher degree can not be solved.
1397.3JARETH::EDPAlways mount a scratch monkey.Thu Mar 14 1991 07:4518
    Re .0:
    
    The CRC has formulae for cubic and quartic equations.  (And these are
    the end; fifth-degree and higher equations cannot be solved
    analytically.)
    
    I'll enter the formulae, probably tomorrow.  Rather than giving a
    single formula that solve the equation, the solutions are written as a
    sequence of formula -- make this substitution for x, evaluate this
    formula, and plug it into that one, et cetera.
    
    By coincidence, I just wrote programs to perform the solutions for the
    HP-48 calculator.  Written out in full, the quartic solution was
    humongous -- it was over a thousand elements ("elements" being
    variables or operators).
    
    
    				-- edp
1397.4x-refHERON::BUCHANANHoldfast is the only dog, my duck.Thu Mar 14 1991 08:005
	D'An Deramo describes the cubic and quartic solution in the replies
to 901, I think.   We await his analytic quintic solution with impatience. :-)

Cheers,
Andrew.
1397.5GUESS::DERAMODan D'EramoThu Mar 14 1991 08:113
        There may be some more in 881 as well.
        
        Dan
1397.6MAPLE will helpCIVAGE::LYNNLynn Yarbrough @WNP DTN 427-5663Thu Mar 14 1991 12:048
If you have MAPLE installed, simply type

	solve(a*x^4+b*x^3+c*x^2+d*x+e, x);

and stand back. It will type out for quite a while. What it will produce is 
a set of four solution expressions, in complex form. The solution 
expressions are sufficiently complex that a general-purpose complex root-
finder may evaluate the roots faster than running the generated code.
1397.7always look for symmetries...ALLVAX::JROTHI know he moves along the piersThu Mar 14 1991 15:3746
    The reason the quadratic is solvable so easily is because a
    parabola is symmetrical.  Symmetries are also the key to solving
    cubics and quartics.

    So assume the roots are displaced to either side of the axis of
    symmetry at x = x0:

	(x-x0-d)*(x-x0+d)

    multiplying out

	x^2 - 2*x0*x + x0^2 - d^2

    matching coefficients against

	x^2 + b/a*x + c/a

    we find

	b/a = -2*x0

    and

	c/a = x0^2 - d^2

    So you can solve for x0 and then d, and putting it together
    you get the famous formula, without hard to remember "tricks".

    One minor point - for best numerical conditioning you should take
    the roots in such a way that the sign of the square root is the
    same as -b.  So if b is positive, take the roots by

	-b - sqrt(b^2 - 4*a*c)
        ----------------------
	        2*a

	        2*c
	----------------------
	-b - sqrt(b^2 - 4*a*c)   	

    and use plus signs on the root if b is negative.

    If the roots are complex, then this doesn't matter since you'll keep
    the real and imaginary separate anyway.

    - Jim
1397.8JARETH::EDPAlways mount a scratch monkey.Fri Mar 15 1991 12:5271
    From Chemical Rubber Company's _Standard Mathematical Tables_:
    
    A cubic equation, y^3+py^2+qy+r=0 may be reduced to the form
    
    	x^3+ax+b=0
    
    by substituting for y the value, x-p/3.  Here
    
    	a=1/3*(3q-p^2) and b = 1/27*(2p^3-9pq+27r).
    
    For solution, let
    
    	A = (-b/2+sqrt(b^2/4+a^3/27))^1/3,
    
    	B = -(b/2+sqrt(b^2/4+a^3/27))^1/3,
    
    then the values of x will be given by
    
    	x = A+B, -(A+B)/2 + (A-B)*sqrt(-3)/2, -(A+B)/2 - (A-B)*sqrt(-3)/2.
    
    If p, q, r are real, then
    
    	If b^2/4+a^3/27 > 0, there will be one real root and two conjugate
    	complex roots.
    	If b^2/4+a^3/27 = 0, there will be three real roots of which at
    	least two are equal.
    	If b^2/4+a^3/27 < 0, there will be three real and unequal roots.
    
    
    A quartic equation,
    
    	x^4+ax^3+bx^2+cx+d=0,
    
    has the resolvent cubic equation
    
    	y^3 - by^2 + (ac-4d)y - a^2d + 4bd - c^2 = 0.
    
    Let y be any root of this equation, and
    
    	R = sqrt(a^2/4-b+y).
    
    If R != 0, then let
    
    	D = sqrt(3a^2/4-R^2-2b+(4ab-8c-a^3)/4R)
    
    and
    
    	E = sqrt(3a^2/4-R^2-2b-(4ab-8c-a^3)/4R)
    
    If R = 0, then let
    
    	D = sqrt(3a^2/4-2b+2sqrt(y^2-4d))
    
    and
    
    	E = sqrt(3a^2/4-2b-2sqrt(y^2-4d)).
    
    Then the four roots of the original equation are given by
    
    	x = -a/4 + R/2 � D/2
    
    and
    
    	x = -a/4 - R/2 � E/2.
    
    (If viewed without extended character support, the "plus or minus"
    character above may appear oddly -- it is the operator between the
    "R/2" and the "D/2" or "E/2".)
    
    
    				-- edp
1397.9history of solutionsSMAUG::ABBASITue Mar 19 1991 02:4314
some history :

- Mohammed Al-Khowarizmi (year 825),  illustrated solutions for linear and
  quadratic equations. (1200 years ago !)
- Gardano's "Ars Magana" book, showed solution for Cubic and
  biquadratic equations, cubic original solution outlined by
  Scipio Ferro of Bologna in 1515, Biquadratic solved by
  Gardano's assistant Ludario Ferrari (1522-1565).
- Neil Abel (1802-1829) proved no solutions in radicals exist for
  fifth or higher degree.

/naser

    
1397.10and some earlier historyCSSE::NEILSENWally Neilsen-SteinhardtTue Mar 19 1991 11:547
Babylonian tablets in cuneiform illustrate algorithms for solving quadratic 
equations.  They could solve the general equation, although they solved it by
transforming it into a simpler form.

Most mathematical cuneiform tablets are datable to around 1800 BC or 300 BC.
I am not sure which contained the quadratics.  I think the latter, but I 
could look it up if anyone is interested in the history.
1397.11GUESS::DERAMODan D&#039;EramoTue Mar 19 1991 12:339
        re .9,
        
>> - Neil Abel (1802-1829) proved no solutions in radicals exist for
>>   fifth or higher degree.
        
        In the general case; some have solutions in radicals, and
        some don't.
        
        Dan