How to solve a first (1st) degree equation
The puzzle:
a*x + b = 0
Calculate x
using the following algorithm:
x = -b/a
I think I deserve a nobelprize/fieldmedal for that
How to solve a second (2nd) degree equation
The equation
a*x^2 + b*x + c = 0
has as solutions:
x = ( -b + sqrt(b^2-4*a*c) ) / (2*a)
or
x = ( -b - sqrt(b^2-4*a*c) ) / (2*a)
How to solve a third (3rd) degree equation
The equation
a*x^3 + b*x^2 + c*x + d = 0
first substitute x = y / a^(1/3)
, resulting in
y^3 + aa*y^2 + bb*y + cc = 0
then substitue y = z - aa/3
, resulting in
z^3 + p*z + q = 0
with p = bb - aa^2/3 and q = 2*aa^3/27 -bb*aa/3
then suppose z=r+s
r^3 + 3*r*s(r+s) + s^3 + p*z + q =0
from which follows
r^3 + s^3 + q = 0
and
3*r*s + p = 0 (or 27*r^3*s^3 + p^3 = 0 )
from which follows:
r^3, s^3 = -q/2 {+-} sqrt( (q/2)^2 + (p/3)^3 )
and
x = (r+s) * exp(2*k*pi*i/3)
How to solve a fourth (4th) degree equation
... still need to write this down ...