Can you graph complex #'s in Mathematica?

In summary, the conversation discusses the possibility of graphing and animating a 1 dimensional wavefunction over time, specifically an eigenstate of the Hamiltonian with a time dependence of e^(-i * w * t). The speaker shares their attempted method using Plot3D and their success with ParametricPlot3D. They also mention the option of using ViewPoint to see a standard real plot and provide a link to a resource showcasing additional features such as superposition.
  • #1
DharmaBum
2
0
I want to evolve a 1 dimensional wavefunction forward in time. It is an eigenstate of the Hamiltonian, so its time dependence is e^(-i * w * t). Is there a way to graph it on the x-axis and animate it to show how it rotates through the real and complex planes?
This is how I have tried it; it doesn't work.
Plot3D[ψ[x, 100, .1, 1, t], {x, 0, 100}, {t, 0, 600}, AxesLabel -> {"
Real", "x", "\[ImaginaryI]"}]
 
Physics news on Phys.org
  • #2
ParametricPlot3D to the rescue!
Manipulate[
ParametricPlot3D[{Sin[Pi*q/2]*Cos[-Pi*t/50],
Sin[Pi*q/2]*Sin[-Pi*t/50], q}, {q, 0, 2},
AxesLabel -> {"Re", "Im", "x"}, PlotStyle -> {Thick, Red},
PlotRange -> {{-1.0, 1.0}, {-1.0, 1.0}, {0.0, 2.0}}], {t, 0, 100, 0.1}]
This will play the ground state of an infinite square well forward in time. If you use the option, ViewPoint -> {0, Infinity, 0}, you will see the standard real plot.
I have put together a http://spot.colorado.edu/~goldy/Mathematica/TimeDependentWaveFunction.nb" which shows some of the features you can show (such as superposition).
 
Last edited by a moderator:
  • #3


Yes, it is possible to graph complex numbers in Mathematica. In fact, Mathematica has built-in functions specifically for working with complex numbers, such as ComplexPlot and ComplexListPlot. These functions allow you to plot the real and imaginary components of a complex number separately or together.

As for animating the time evolution of a 1-dimensional wavefunction, you can use the Manipulate function in Mathematica to create an interactive animation. First, you would define your wavefunction as a function of both x and t, using the exponential time dependence described in the question. Then, you can use Manipulate to vary the value of t and see how the wavefunction changes over time.

Here is an example code that you can use as a starting point:

Manipulate[ComplexPlot[ψ[x, 100, .1, 1, t], {x, 0, 100}, AxesLabel -> {"Real", "Imaginary"}, PlotRange -> All], {t, 0, 600}]

This code assumes that you have defined the function ψ with the appropriate parameters. You can adjust the parameters and the range of the plot to suit your specific needs.

I hope this helps and good luck with your research!
 

1. Can you explain the basics of graphing complex numbers in Mathematica?

Yes, complex numbers can be graphed in Mathematica using the ComplexPlot function. This function plots the real and imaginary parts of a complex number as the x and y axes, respectively.

2. Is it possible to add labels and titles to a complex number graph in Mathematica?

Yes, labels and titles can be added to a complex number graph in Mathematica using the PlotLabel and AxesLabel options in the ComplexPlot function.

3. Can I plot multiple complex numbers on the same graph in Mathematica?

Yes, multiple complex numbers can be plotted on the same graph in Mathematica using the ComplexPlot function with multiple input values. Each complex number will be represented by a different color on the graph.

4. Are there any other plot types for complex numbers in Mathematica?

Yes, there are several other plot types for complex numbers in Mathematica, such as ComplexListPlot and ComplexDensityPlot. These functions allow for different visual representations of complex numbers, such as scatter plots or density plots.

5. Can I customize the appearance of a complex number graph in Mathematica?

Yes, the appearance of a complex number graph can be customized in Mathematica using various options in the ComplexPlot function, such as PlotStyle and ImageSize. Additionally, the graph can be further customized using standard Mathematica graphics functions.

Similar threads

  • MATLAB, Maple, Mathematica, LaTeX
Replies
4
Views
2K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
2
Views
1K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
6
Views
2K
  • Programming and Computer Science
Replies
1
Views
1K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
2
Views
2K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
2
Views
4K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
1
Views
2K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
10
Views
2K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
12
Views
1K
Replies
12
Views
2K
Back
Top