How is the a value in Laguerre's method calculated?

42 Views Asked by At

How is it calculated? I cannot find the value of a as in the method.

enter image description here

enter image description here

enter image description here

1

There are 1 best solutions below

0
On BEST ANSWER

You should also have copied the context of the wikipedia Laguerre article where $a=x-x_1$ is the root update we seek and all other roots are far away and considered the same, so that $x-x_k\approx b$ and \begin{align} G&=\frac1{x-x_1}+\sum_{k=2}^n\frac1{x-x_k}\approx\frac1a+\frac{n-1}b\\ H&=\frac1{(x-x_1)^2}+\sum_{k=2}^n\frac1{(x-x_k)^2}\approx\frac1{a^2}+\frac{n-1}{b^2} \\\hline \frac{n-1}b&=G-\frac1a\\ (n-1)H&=\frac{n-1}{a^2}+\left(G-\frac1a\right)^2=\frac{n}{a^2}-\frac{2G}a+G^2 \end{align} and now solve this quadratic equation for $a$, or rather first for $\frac na$, $$ n(n-1)H=\frac{n^2}{a^2}-2\frac{n}a G+nG^2=\left(\frac na-G\right)^2+(n-1)G^2,\text{ etc.} $$ Then insert that $G$ and $H$ can be expressed in the polynomial's derivatives at $x$ and you end up with an implementation like the following, where dd_evaluate(x) evaluates the value, first and second derivative at $x$ and store them in global variables pol, dpol, ddpol.

double complex laguerre_update(){
  double complex root;

  dd_evaluate(zero);

  root=((DEG-1)*(DEG-1))*(dpol*dpol)-(DEG*(DEG-1))*(ddpol*pol);

  root = csqrt(root);

  if( creal(dpol*~root)<0 )
    root=-root;

  return -(DEG*pol)/(dpol+root);
}

This is from working (if somewhat minimalist) code, it produced images like the one below illustrating the basins of attraction (same color domains) of the roots (white circles) and the number of steps to reach them (shades of the colors). laguerre_root_half_circles_0p9x4_1p1x4