Perturbation for Algebraic Equations

<< Graphics`Graphics`

Quadratic equation

Let us solve the equation

(x^2) +  2  e x  -  1  = 0

Exact Solution

Solve[x^2  +  2  e x  - 1 == 0, x]

\(\(sols = Solve[x^2 + \ 2  e\ \ x\  - 1 == 0, x];\)
\)
exact=Plot[Evaluate[x  /.  sols],  {e, -2, +2}, 
        AxesLabel -> {e, x}]

Perturbative solution

x = 
      1 - e  + (1/2) (e^2) +  ... ,  x = -1 - 
          e  - (1/2) (e^2) +  ... ,

1st Order

order1 = 
      Plot[{1 - e,  -1  -  e}, {e, -2, 2}, 
        PlotStyle -> {RGBColor[1, 0, 0], RGBColor[1, 0, 0]}, 
        AxesLabel -> {t, x}]

2nd Order

order2 = 
      Plot[{1 -  e + 1/2 e^2 ,  -1  -  e - 1/2 e^2}, {e, -2, 
          2}, PlotStyle -> {RGBColor[1, 0, 1], RGBColor[1, 0, 1]}, 
        AxesLabel -> {t, x}]

Show[exact, order1, order2]

Cubic equation

\(\(csols = Solve[x^3 + \ e\ \ x\  - 1 == 0, x];\)
\)
cexact = 
        Plot[Evaluate[x  /.  csols],  {e, -4, +4}, 
          AxesLabel -> {e, x}];

Show[cexact, 
      Plot[{1 - 1/3  e,  1 - 1/3  e  + 1/81 e^3}, {e, -4, 4}, 
        PlotStyle -> {RGBColor[1, 0, 0], RGBColor[1, 0, 1]}]]

Singular perturbation 1

e (x^2) +  x  -  1 = 0

Plot[
      Evaluate[ 
        x /.  Solve[e x^2 + x - 1 == 0, x]],  {e, -0.25, 0.25}, 
      PlotRange -> {{-0.25, 0.25}, {-30, 5}}]

Singular perturbation 2

(1 - e) (x^2) + 2 x  +  1 = 0

{sol1, sol2} =  
        x /.  Solve[ (1 - e) x^2 + 2  x + 1 == 0, 
            x];

Plot[{sol1, sol2}, {e, -1, 0.5}, 
      PlotRange -> {{-1, 0.5}, Automatic}, 
      AxesLabel -> {e, x}]

re = 
      ParametricPlot3D[{ {e, sol1, 0}, {e, sol2, 0}}, {e, 0, 0.5}, 
        AxesLabel -> {e, x, }]

im = 
      ParametricPlot3D[{ {e, Re[sol1], Im[sol1]}, {e, Re[sol2], 
            Im[sol2]}}, {e, -0.5, 0}, 
        PlotRange -> {{-1, 1}, {-1, 1}, {-1, 
              1}}, 
AxesLabel -> {e, Re[x], 
            Im[x]}]

plane = 
      Graphics3D[
        Plot3D[0, {x, -1, 1}, {y, -2, 1}, Mesh -> True, 
          HiddenSurface -> False]]

Show[Plot3D[-100, {x, -1, 1}, {y, -2, 1}], re, im, 
      PlotRange -> {{-0.5, 0.5}, {-2, 0}, {-0.5, 0.5}}, 
      AspectRatio -> 1]

Show[plane, re, im, 
      PlotRange -> {{-0.5, 0.5}, {-2, 0}, {-0.5, 0.5}}, 
      AxesLabel -> {e, Re[x], Im[y]}]