Calculating multiple roots

One way to speed up convergence in finding multiple zero's is to use the function [Maple Math] instead of the function [Maple Math] itself.

Indeed, if [Maple Math] has a zero of multiplicity [Maple Math] at [Maple Math] , then [Maple Math] and,

> f:=x->(x-p)^m*q(x);

[Maple Math]

> mu:=x->f(x)/(D(f)(x));

[Maple Math]

> mu(x);

[Maple Math]

> simplify(mu(x));

[Maple Math]

which has a root at [Maple Math] as well, but a simple one. Therefore, applying Newton-Raphson on this function should yield quadratic convergence:

> f:=x->exp(x)-x-1;

[Maple Math]

> df:=D(f);

[Maple Math]

> mu:=x->f(x)/df(x):mu(x);

[Maple Math]

> mu1:=x->1-x/(exp(x)-1);

[Maple Math]

> dmu1:=D(mu1);

[Maple Math]

> p[0]:=5.0;

[Maple Math]

> for i from 1 to 5 do p[i]:=p[i-1]-mu1(p[i-1])/(dmu1(p[i-1])): print(i,p[i],abs(p[i]/p[i-1]),abs(p[i]/(p[i-1])^2)); od:

[Maple Math]

[Maple Math]

[Maple Math]

[Maple Math]

[Maple Math]