Difference between the complex roots of $f(x)$ and $|f(x)|^2$

61 Views Asked by At

I suppose a basic question, but it's causing me more problems than I envisioned!

I have some polynomial $f(x)$ for which the roots are complex, $x+iy$. How will these roots change if I now take $|f(x)|^2$?

In fact, I have a very large polynomial and I'm solving it numerically (on a computer, of course). However I need to check that the roots the computer is finding are genuine roots of $f(x)$ and I believe I can do this by plotting $|f(x)|^2$. However, I'm not sure what I should be expecting and looking for in this plot that confirms I have the proper root.

2

There are 2 best solutions below

9
On

Well, $z=0$ iff $|z|=0$ iff $|z|^2=0$ for every complex number $z$, right?

0
On

I like to plot $1/|f(x)|$ instead of $|f(x)|$ if I'm trying to find the roots visually. That way the roots of $f$ show up as poles in the plot. They really stand out!

In Mathematica you could try something like

Plot3D[1/Abs[f[x+I y]],{x,-5,5},{y,-5,5}]

You can also use the options PlotRange and PlotPoints to tweak the output. Here's an example:

Plot3D[1/Abs[1+x+(x+I y)^2+3 (x+I y)^3+I y],{x,-3,3},{y,-3,3},PlotPoints->60,PlotRange->{0,4}]

enter image description here