Infinite square well, axis labelling

March 09 2011 by john9ab 0
false
Maple

0


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;

 
Loading Comments & Answers

You must be logged into your MaplePrimes account in order to post a comment. If you don't have an account, you can create an account here.

     

Forgot Your Password? Create an Account