# Is it possible to have a complex nu in ParabolicCylinderD?

I'm trying to recreate a graph from a paper, and the function that I'm plotting involves three separate parabolic cylinder functions that all have a complex Nu value. After getting it all typed out, I end up with an empty plot. I've gone back to basics and have fiddled around with ParabolicCylinderD, and have found that I can plot it no problem with a real Nu, but as soon as I make Nu complex I end up with an empty plot. What am I doing wrong?

Edit:

I'll put in the test code I used while playing with the function to see if it worked, but it's just a case of using a complex input with the function to see if it works.

Plot[ParabolicCylinderD[2,p],{p,0,50}]


That one worked totally fine, got a good plot from it.

Plot[ParabolicCylinderD[2 I,p],{p,0,50}]


This one didn't work at all, got an empty plot as a result.

• We cannot reproduce or work on the problem without the code for a minimal example. Jul 29, 2020 at 15:16
• I've adjusted the main question to include my tinkering example but it's literally just a case of putting a complex number in the nu value for the ParabolicCylinderD function Jul 29, 2020 at 15:22
• @PewtDmD Plot will not show complex numbers. You need to take real Re and imaginary Im separately, or if you only care about the norm, then use Abs Jul 29, 2020 at 15:34
• Depending on your version of Mathematica, one or more of the following will work: ReImPlot[ParabolicCylinderD[2 I, p], {p, 0, 8}, PlotRange -> All, PlotLegends -> Placed["ReIm", {0.5, 0.5}]] or Plot[Evaluate@ReIm@ParabolicCylinderD[2 I, p], {p, 0, 8}, PlotRange -> All, PlotLegends -> Placed[{Re, Im}, {0.5, 0.5}]] or Plot[Evaluate[#[ParabolicCylinderD[2 I, p]] & /@ {Re, Im}], {p, 0, 8}, PlotRange -> All, PlotLegends -> Placed[{Re, Im}, {0.5, 0.5}]] Jul 29, 2020 at 15:44
• Perhaps if you had added a link to the paper you speak of, it would be easier to see what the function to be plotted is supposed to be. Sep 25, 2020 at 0:44

Yes certainly. If you have a fixed complex $$\nu$$ then use ComplexPlot not Plot like so:

ComplexPlot[ParabolicCylinderD[0.3 + 0.2 I, z], {z, -1 - I, 1 + I}]


... or if you still want to use Plot, then take the real and imaginary parts separately:

Plot[{Re[ParabolicCylinderD[0.3 + 0.2 I, x]],
Im[ParabolicCylinderD[0.3 + 0.2 I, x]]}, {x, -3, 3},
PlotStyle -> {Directive[Red], Directive[Blue]}]



For $$\nu=2\mathbf{i}$$ we have real and imaginary parts quickly decaying towards zero:

Plot[{
Re[ParabolicCylinderD[2 I, x]],
Im[ParabolicCylinderD[2 I, x]],
Abs[ParabolicCylinderD[2 I, x]]}, {x, 0, 10},
PlotStyle -> {Directive[Red], Directive[Blue], Directive[Thick, Darker@Green]},
PlotRange -> All,
PlotLegends -> {"Re", "Im", "Abs"}]


• The result of ComplexPlot3D[ParabolicCylinderD[0.3 + 0.2 I, z], {z, -1 - I, 1 + I}] is more informative. Jul 29, 2020 at 15:38
• Also note you can do: FunctionExpand[Abs[ParabolicCylinderD[2 I, x]]], FunctionExpand[Re[ParabolicCylinderD[2 I, x]]], and FunctionExpand[Im[ParabolicCylinderD[2 I, x]]] to get forms in exponentials, cosines, and HermiteH functions. Jul 29, 2020 at 15:46