# How to get rid of the absolute value in ComplexPlot3D[]?

I'm starting to study complex analysis,so I'm trying out Mathematica as tool for visualizing complex functions. I'm trying to graph $$f(z)=z^2 + 1$$ with the code:

ComplexPlot3D[z^2 + 1 , {z, 2}]


and what I get is this:

Something is wrong, because I expected negative real values of f(z) along the imaginary input axis. So I looked for a description of the function ComplexPlot3D[] and it says:

ComplexPlot3D[f,{z,Subscript[z, min],Subscript[z, max]}]


generates a 3D plot of Abs[f] colored by Arg[f] over the complex rectangle with corners Subscript[z, min] and Subscript[z, max].

So the problem is that this plot function evaluates the absolute value (Abs[f]) instead of the actual value of the funtion it is plotting. Do any of you know how to fix this, or can point me to another function instead of this one? Thanks!

• Would this suit better your purpose? ComplexPlot[(z^2 + 1), {z, 2}, ColorFunction -> "CyclicLogAbsArg"] Oct 10, 2022 at 6:38
• a complex function f[z] in fact have two variables and two values, so we need to use four variables to express such f. That is why we always write f[z] as {u[x,y],v[x,y]}. It is recommend to use ParametricPlot. Oct 10, 2022 at 14:53
• Technically, your plot does indicate which values are real and negative — they're those points with $\arg f(z) = \pi$, which shows up as the points in cyan on the surface. Oct 10, 2022 at 16:38

  ComplexPlot3D[z^2 + 1, {z, 2}, ColorFunction -> "CyclicLogAbsArg"]


You can plot the real and imaginary parts of the function separately using Plot3D and ReIm:

Plot3D[Evaluate[ReIm[f[x + I y]]], {x, -2, 2}, {y, -2, 2}]


This is a bit confusing on its own, to be honest, but if you look at it you can convince yourself that the points along the imaginary axis (with $$|\Im(z)| > 1$$) have $$\Re(f(z)) < 0$$ and $$\Im(f(z)) = 0$$.

Alternately, replacing ReIm with Re or Im will plot the real or imaginary parts of the function alone, which might make the above properties clearer.