Question: Infinite square well, axis labelling

Hi,

Is there some way i can label the x axis with numbers and an 'a'? I want to make an infinite square well of width 'a' so i'd like to keep the central zero and put an 'a' and '-a' on the x axis on either side of the origin.

So far i have this:

restart;

a:=1;

for n from 1 by 2 to 3

do psi[n]:=sqrt(a)*cos((n*Pi*x)/2*a);plot((psi[n]),x=-a..a,title="Potential as a function of x");plot((psi[n]^2),x=-a..a,title="Probability density");od;

 

for n from 2 by 2 to 4

do psi[n]:=sqrt(a)*sin((n*Pi*x)/2*a);plot((psi[n]),x=-a..a,title="Potential as a function of x");plot((psi[n]^2),x=-a..a,title="Probability density"); od;

Please Wait...