# Improper ParametricPlot3D result when using certain complex numbers

Bug introduced in 8 or earlier and persisting in 11.1

This is more out of curiosity than for any project that I'm working on.

I was experimenting with the ParametricPlot3D and put in the following code:

ParametricPlot3D[{x, Im[(-1)^(5 x)], Im[(-1)^(5 x)]}, {x, 0, 1}].

For some odd reason I didn't get a waveform that was tilted 45 degrees but instead a flatline. Does anyone know why this is? I contacted Wolfram Research about it weeks ago and I haven't heard from them. It doesn't do this if I use Im[E^(I*Pi*x*5)], Im[(-1)^(x*5)], then it works perfectly it is only a problem if I base it around -1.

A screenshot of the output is below.

• I'm more interested in why this occurs, I know how to get the Sin[pi*x*5] waveform titled at 45 degrees, I just don't know why it does this when I use a base of -1. Commented Feb 4, 2017 at 3:01

ex = Im@ComplexExpand[(-1)^(5 x)]
ParametricPlot3D[{x, ex, ex}, {x, 0, 1}]


• ex = Assuming[Element[x, Reals], Simplify@Im@ComplexExpand[(-1)^(5 x)]] or ex = Assuming[Element[x, Reals], FullSimplify@Im[(-1)^(5 x)]] will evaluate to Sin[5*Pi*x] Commented Jan 30, 2018 at 17:31
• @BobHanlon yes I appreciate that (-1)^5=exp(5Pi x) and hence the imaginary part is Sin[5 Pi x] and by inspection could have just substituted it into ParametricPlot3D. I interpreted the question as how to get MMA to interpret. I agree that your expression shows this explicitly. I accept it as a constructive comment. Commented Jan 30, 2018 at 20:45
ParametricPlot3D[
{x,
Evaluate[Im[(-1)^(5 x)]],
Evaluate[Im[(-1)^(5 x)]]},
{x, 0, 1}]


or

ParametricPlot3D[
Evaluate /@ {x, Im[(-1)^(5 x)], Im[(-1)^(5 x)]},
{x, 0, 1}]

• Or ParametricPlot3D[ Simplify@{x, Im[(-1)^(x*5)], Im[(-1)^(x*5)]}, {x, 0, 1}] or ParametricPlot3D[ ComplexExpand@{x, Im[(-1)^(x*5)], Im[(-1)^(x*5)]}, {x, 0, 1}] Commented Feb 4, 2017 at 2:33
• Evaluate does nothing unless it is in the first level of holding expression.
– Kuba
Commented Aug 3, 2017 at 13:05
• even just this fixes it.. ParametricPlot3D[{Evaluate@x, Im[(-1)^(5 x)], Im[(-1)^(5 x)]}, {x, 0, 1}] bizarre.. Commented Jan 30, 2018 at 17:34