Homotopy Continuation Method to Find All Root of a Polynomial Equation II
Author's Data:  Housam BINOUS
Department of Chemical Engineering
National Institute of Applied Sciences and Technology
Tunis, TUNISIA

Reference: M. Kuno and J. D. Seader, Computing All Real Solutions to Systems of Nonlinear Equations with a Global Fixed-Point Homotopy,  Ind. Eng. Chem. Res., 1988, 27, 1320-1329.

Solve give the roots of the polynomial equation

Solve[x^3 - 6  x^2 + 11  x - 6 == 0, x]

Fixed Point Homotopy : 
H(x,t)=(1-t) (x-x0) + t f(x) with x0=1.5

H[x_, t_] := (1 - t) (x - 1.5) + 
        t (x^3 - 6  x^2 + 11  x - 6)

H[x, t]

Off[General::"spell"]

Grad[fon_, var_List] := D[fon, #] & /@ var

J = Grad[H[x, t], {x, t}]

Js = J /. x -> x[s] /. t -> t[s]

Eq[1] = D[x[s], {s, 1}] ==   First[Drop[Js, 1]]

Eq[2] = D[t[s], {s, 1}] == - First[Drop[Js, {2}]]

sol = 
      NDSolve[{Eq[1], Eq[2], t[0] ==  0, x[0] ==  1.5}, {x[s], 
          t[s]}, {s, -2, 2}, MaxStepFraction ->  0.0005]

plt1 = 
      ParametricPlot[{t[s], x[s]} /. sol, {s, -2, 2}, 
        Epilog ->  {RGBColor[1, 0, 0], Line[{{1, -3}, {1, 5}}]}, 
        PlotRange -> {{-5, 10}, {-1, 5}}, 
        PlotStyle ->  RGBColor[0, 1, 0], 
        PlotPoints ->  10000]

FindRoot[H[x, 2] ==  0, {x, 2.5}]

sol2 = 
      NDSolve[{Eq[1], Eq[2], t[0] ==  2, 
          x[0] ==  1.83006}, {x[s], t[s]}, {s, -100, 100}, 
        MaxStepFraction ->  0.0005]

plt2 = 
      ParametricPlot[{t[s], x[s]} /. sol2, {s, -10, 10}, 
        Epilog ->  {RGBColor[1, 0, 0], Line[{{1, -3}, {1, 5}}]}, 
        PlotRange -> {{-5, 10}, {-1, 5}}, 
        PlotStyle ->  RGBColor[0, 1, 0], 
        PlotPoints ->  10000]

Fixed Point Homotopy : 
H(x,t)=(1-t) (x-x0) + t f(x) with x0=0

H[x_, t_] := (1 - t) (x - 0) + 
        t (x^3 - 6  x^2 + 11  x - 6)

H[x, t]

Off[General::"spell"]

Grad[fon_, var_List] := D[fon, #] & /@ var

J = Grad[H[x, t], {x, t}]

Js = J /. x -> x[s] /. t -> t[s]

Eq[1] = D[x[s], {s, 1}] ==   First[Drop[Js, 1]]

Eq[2] = D[t[s], {s, 1}] == - First[Drop[Js, {2}]]

sol = 
      NDSolve[{Eq[1], Eq[2], t[0] ==  0, x[0] ==  0}, {x[s], 
          t[s]}, {s, -5, 0.14}, 
        MaxStepFraction ->  0.0005]

plt3 = 
      ParametricPlot[{t[s], x[s]} /. sol, {s, -5, 0.14}, 
        Epilog ->  {RGBColor[1, 0, 0], Line[{{1, -3}, {1, 5}}]}, 
        PlotRange -> {{-5, 10}, {-1, 5}}, 
        PlotStyle ->  RGBColor[0, 0, 1]]

l = 
      Graphics[{{RGBColor[1, 0, 1], PointSize[0.03], 
            Point[{1, 1}]}, {RGBColor[1, 0, 1], PointSize[0.03], 
            Point[{1, 2}]}, {RGBColor[1, 0, 1], PointSize[0.03], 
            Point[{1, 3}]}}]

Show[plt1, plt2, plt3, l, Frame ->  True]