Go back to startpage

.. Welcome in the year 300 bc for time-passengers ..

Euclid approx 300 bc;

Euclid

Euclid was an ancient Greek mathematician, also known as the "Father of Geometry." He taught in Alexandria, (today city in Egypt), at that time ruled by the Macedonian king Ptolemy I Soter, king of Egypt. Euclid defined fundamental axioms and definitions, providing a systematic approach to number theory and geometry.

Euclids algorithm applied to real polynomials .. let be p1, p2 polynomials; Function rpd = real polynomial division

example 1:

while[0 < count p2;

rs:rpd[p1;p2];

if[0 < lrslen:count lrs:last rs;
r:lrs;
p1:p2;p2:r;
rem,:enlist p1;
]; ...

function rpd ..

while[(count p1)>=p2cnt;
factors,:first r:aux21[p1;p2];
p1:last r;
];

function aux21

mult:((*)p11)%(*)p21
R:((p2cnt#p1)-mult*p2),p2cnt _ p1

common divisor between 20x4+99x3-5x2-130x-76 and 4x3+131x2-1820x-11172 -->

ggt[20 99 -5 -130 -76;4 131 -1820 -11172];


20 99 -5 -130 -76f
4 131 -1820 -11172f
27304 -197250 -1552984f
-437.3604 -2077.462 --> at the end a list of length 2 --> we found a real divisor which is linear. The divisor is unique (except from a linear factor) ... if we divide -437.3604x -2077.462 by -109.3401 then we get a much nicer result: 4 19 --> 4x+19

example 2:

p(x) = 96x3 + 832x2 + 1406x - 1805
p'(x) = 288x2 + 1664x + 1406

p:96 832 1406 -1805

Then

ggt[p;-1_p*(-1+cp)-til cp:count p]

returns: -665.037 -3158.926 (list of length 2 --> p(x) has a 2-fold root)


Go back to startpage