2
$\begingroup$

I would like to Plot a function like $e^{ix^2}$, similar to the one seen in this video at 1:26: https://www.youtube.com/watch?v=p7bzE1E5PMY&t=86s. I think what I'm trying to do is to plot the imaginary part on one axis, and the real part on the other, both as a function of x. Does anybody know how that works? I hope it isn't to complicated, since this isn't my task, just trying to boost my understanding of quantum mechanics.

$\endgroup$
4
  • 2
    $\begingroup$ The video and your description don't correspond. The video plots pos. vs. vel., not real and imaginary parts. Which do you want? Possibly useful functions: ReIm[], ParametricPlot[], ParametricPlot3D[]. $\endgroup$
    – Michael E2
    Jun 8, 2021 at 17:00
  • $\begingroup$ @MichaelE2: The OP unwittingly linked to a later time-stamp in the video than they intended to. I've corrected the URL. $\endgroup$ Jun 8, 2021 at 17:16
  • $\begingroup$ @MichaelSeifert Ah, thanks. I have little patience with video explanations as well. So already put out by a non-self-contained Q, I gave up. $\endgroup$
    – Michael E2
    Jun 8, 2021 at 18:17
  • $\begingroup$ Ah, I'm sorry for that, didn't realise there was a time stamp in the hyperlink @MichaelE2. Thanks for correcting it Michael Seifert. $\endgroup$ Jun 10, 2021 at 20:38

1 Answer 1

2
$\begingroup$

As noted in the comments, the function you want is ParametricPlot3D. You create the "graph" as a parametric curve with x as the parameter, and whose y and z coordinates are $\Re(\psi)$ and $\Im(\psi)$ respectively.

psi[x_] = Exp[I x^2];
ParametricPlot3D[{x, Re[psi[x]], Im[psi[x]]}, {x, -3, 3}, 
 AxesOrigin -> {0, 0, 0}, Ticks -> {Automatic, None, None}, Boxed -> False]

enter image description here

$\endgroup$
3
  • $\begingroup$ for fun you could add `ParametricPlot3D[{x, Re[psi[x]], Im[psi[x]]} // Evaluate, {x, -3, 3}, AxesOrigin -> {0, 0, 0}, Ticks -> {Automatic, None, None}, Boxed -> False, ColorFunction -> Function[{x, y, z}, Hue[z]]]' $\endgroup$
    – chris
    Jun 8, 2021 at 17:24
  • 1
    $\begingroup$ @chris: probably ColorFunctionScaling -> False, ColorFunction -> Function[{x, y, z}, Hue[Arg[psi[x]]/(2 \[Pi])]]] would have more physical meaning, but let's walk before we run. :-) $\endgroup$ Jun 8, 2021 at 17:29
  • $\begingroup$ Awesome, that was exactly what I was looking for. Thanks for taking your time! $\endgroup$ Jun 10, 2021 at 20:39

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.