Group Abstract Group Abstract

Message Boards Message Boards

For Real Input X, Plot Imaginary and Real Output on 2 other axis (3D)

Posted 9 years ago

So, I am intrigued by the function

y=x^x

In the past, I've only been able to see the imaginary output and real output of this graph as separate functions. My goal, using this program, is to achieve the following:

I need to create a 3D plot that:

  • Has an X axis that represents real input for the function y=x^x
  • Has one Y axis that represents real output for y=x^x
  • Has a secondary Y axis that represents imaginary output for y=x^x

However, this should not simply be two flat graphs on two separate planes; that's not what I'm trying to accomplish. For example, if -0.25 is input as x, the output should be one point, located at the coordinate (-0.25, 1, -i) for (X, Y1, Y2) because (-0.25)^(-0.25) = 1-i. Thus, I would expect this graph to produce some continuous "line" looking function that moves through 3D space as described above. However, I have no idea how to accomplish this whatsoever. Any recommendations? Any help would be greatly appreciated.

POSTED BY: John Travolski
5 Replies

The plot is clipped. Simply adjust the PlotRange:

ParametricPlot3D[{x, Re[x^x], Im[x^x]}, {x, -3, 2}, 
 AxesLabel -> {x, Re[x^x], Im[x^x]}, PlotRange -> All]
POSTED BY: Gianluca Gorni
Posted 9 years ago

Thanks to both of you, this helps a lot. However, if I want to very explicitly state the range for all of the axes, I still only know how to do this for the x (input) axis. How could I use that notation to specifically control the Im(x^x) and Re(x^x) ranges that are shown?

POSTED BY: John Travolski

Something like this?

ParametricPlot3D[{x, Re[x^x], Im[x^x]}, {x, -1, 1}, 
 AxesLabel -> {x, Re[x^x], Im[x^x]}]
POSTED BY: Gianluca Gorni
Posted 9 years ago

Yes, that works wonderfully! However, take a look at this: enter image description here

Notice that, somewhere between 0 and -1 for x as the real input, it appears that part of the graph is missing. I believe (but am not confident) that the function should be continuous in that missing section and that the reason I'm not seeing it is because the secondary Y imaginary output axis Im(x^x) is so small that it doesn't include some of the output values. The axis range appears to be automatically determined depending on what I put in for the x range (in the picture I have x go from -3 to 2). How would I create a set value range for all three axis? It seems that I can only choose a range for the x-axis in the example you've given me.

POSTED BY: John Travolski
Posted 9 years ago

BoxRatio gives better view for large x

ParametricPlot3D[{x, Re[x^x], Im[x^x]}, {x, -10, 10}, 
 AxesLabel -> {x, Re[x^x], Im[x^x]}, PlotRange -> All, 
 BoxRatios -> {1, 1, 1}]
POSTED BY: Okkes Dulgerci
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard