Functions are complex ...

Ivan Cnop
icnop@vub.ac.be

Working in the complex number system has advantages

The following limit gives an unexpected result in R :

Consider the following function:

x -> (Sqrt[(x^4) - (x^2)])

Plot[(Sqrt[(x^4) - (x^2)]), {x, -2, 2}]

(lim_(x -> 0)) (Sqrt[(x^4) - (x^2)])

We obtain its value in 0, although the function does not seem to be defined around it.

This is because softwares work with complex functions:

Plot3D[
      Abs[(Sqrt[(((x + I y))^4) - (((x + I y))^2)])], {x, -2, 
        2}, {y, -2, 2}, PlotPoints -> 21]

Show[%, ViewPoint -> {0, 2, - .2}]

We can also map the absolute value in ContourPlot

ContourPlot[
      Abs[(Sqrt[(((x + I y))^4) - (((x + I y))^2)])], {x, -2, 
        2}, {y, -2, 2}, PlotPoints -> 91, 
      Contours ->  .1 Range[20] -  .05]

Behavior of the square root of a polynomial

Try

Limit[(Sqrt[(x^4) - 1]), x -> 0]

Plot[(Sqrt[(x^4) - 1]), {x, -2, 2}]

Plot3D[
      Abs[(Sqrt[(((x + I y))^4) - 1])], {x, -2, 
        2}, {y, -2, 2}, PlotPoints -> 41]

Show[%, ViewPoint -> {0, 2, - .2}]

The "legs" are exactly on the forth roots of unity in the plane.

ContourPlot[
      Abs[(Sqrt[(((x + I y))^4) - 1])], {x, -2, 
        2}, {y, -2, 2}, PlotPoints -> 91,  
      Contours -> 0.1  Range[20] - 0.05`]

Other inverse functions

Problem: there is no default definition for roots of negative numbers

f[x_] := (((x))^((1/3)))

Plot[f[x], {x, -2, 2}]

Taking only reals into account

<< Miscellaneous`RealOnly`

Plots a good graph

Plot[(x^((1/3))), {x, -2, 2}]

Plot[((((x^3)))^((1/3))), {x, -2, 2}]

Solves some problems

f[x_] := (((x))^((1/3)))

f'[0]

f'[x]

But not all!

f[x_] := ((((x^3)))^((1/3)))

f'[0]

Plot[{f[x], f'[0] x  + f[0]}, {x, -2, 2}]

FullSimplify[f[x]]

The reciprocal works:

f[x_] := ((((x^(1/3))))^3)

f'[0]

FullSimplify[f[x]]

Conclusion: always work with complex numbers if possible

Only then will full features be apparent.

Refusing to do so will show only part of the picture:

<< Miscellaneous`RealOnly`

(lim_(x -> 0)) (Sqrt[(x^4) - 1])

Plot[ (Sqrt[(x^4) - (x^2)]), {x, -3, 
        3}]

And a zoom around zero is empty:

Plot[ (Sqrt[(x^4) - (x^2)]), {x, - .0001,  .0001}]