0
$\begingroup$

I am trying to make a parametricplot3D curve of the function Psi(x,t) shown in the included image. My code is the following:

a = 2;  (* a - length*)

A = 1/Sqrt[2*a];

w = 3;(* frequency rad/s*)

psi[x_, t_] := A*((Sin[(Pi x)/a]*E^((-w I) t) + 
     I Sin[2*Pi/a x]*E^((-4*w I) t))/Sqrt[2*a]);

G[x_, t_] := A*Sin[(Pi*x)/a]*Cos[w*t] + Sin[(2*Pi*x)/a]*Sin[4*w*t];

H[x_, t_] := Sin[(2*Pi*x)/a]*Cos[4*w*t] - A*Sin[(Pi*x)/a]*Sin[w*t]

ParametricPlot3D[{G[x, t], H[x, t], Variable z}, {x, -3, a}, {t, 0, Pi}, 
 PlotRange -> All, Mesh -> 40]

So I have tried several things as my Variable z. I tried using (x+t) as well as repeating G[x,t] or H[x,t] However I continue to get an empty graph. Also I have tried to use:

Arg1 = Simplify[ComplexExpand[Re[psi[x_, t_]], a > 0]];

Arg2  = Simplify[ComplexExpand[Im[psi[x_, t_]], a > 0]];

as values for G[x,t] and H[x,t] but get the same issues. I really think my issue is with my Variable z. If anyone has some insight on how I can determine the value of said variable I would be very appreciative.

enter image description here

$\endgroup$

1 Answer 1

1
$\begingroup$

Here you can make a different scan along the third coordinate. I will show 3 models

a = 2;(*a-length*)A = 1/Sqrt[2*a];

w = 3;(*frequency rad/s*)
psi[x_, t_] := 
 A*((Sin[(Pi x)/a]*E^((-w I) t) + I Sin[2*Pi/a x]*E^((-4*w I) t))/
    Sqrt[2*a]);

{ParametricPlot3D[{Re[psi[x, t]], Im[psi[x, t]], t/2}, {x, -3, a}, {t,
    0, Pi}, PlotRange -> All, Mesh -> None], 
 ParametricPlot3D[{Re[psi[x, t]], Im[psi[x, t]], x/2}, {x, -3, a}, {t,
    0, Pi}, PlotRange -> All, Mesh -> None], 
 ParametricPlot3D[{Re[psi[x, t]], Im[psi[x, t]], 
   Norm[{x, t}]/2}, {x, -3, a}, {t, 0, Pi}, PlotRange -> All, 
  Mesh -> None]}

fig1

$\endgroup$

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.