Question: Why does special case "assume x>0" w/ simplify appear to give an inconsistent solution?

Hi.  I'm using Maple 16 to model a quantum harmonic oscillator.  If I leave the constants k, mu, hbar unspecified, I get a correct solution to the Schrodinger equation:

 

omega := hbar*sqrt(k/mu):

ycon := sqrt(sqrt(k*mu/hbar^2)):

y := proc (x) options operator, arrow; ycon*x end proc:

eta := proc (v, x) options operator, arrow; sqrt(ycon/(2^v*factorial(v)*sqrt(Pi)))*HermiteH(v, y(x))*exp(-(1/2)*y(x)^2) end proc:

(-hbar^2*(diff(diff(eta(0, x), x), x))/(2*mu)+(1/2)*k*x^2*eta(0, x))/(omega*eta(0, x)):

(1/2)*(k*mu/hbar^2)^(1/2)*hbar/((k/mu)^(1/2)*mu)

(1)

 

Download mapleprimes_example_.mw

 

I would simplify that to 1/2,  I tried to force Maple to simplify it for me by setting the three constants all positive, but then I appear to get an inconsistent solution, with an extra factor of sqrt(k):

 

assume(k > 0):

omega := hbar*sqrt(k/mu):

ycon := sqrt(sqrt(k*mu/hbar^2)):

y := proc (x) options operator, arrow; ycon*x end proc:

eta := proc (v, x) options operator, arrow; sqrt(ycon/(2^v*factorial(v)*sqrt(Pi)))*HermiteH(v, y(x))*exp(-(1/2)*y(x)^2) end proc:

(-hbar^2*(diff(diff(eta(0, x), x), x))/(2*mu)+(1/2)*k*x^2*eta(0, x))/(omega*eta(0, x)):

(1/2)/k^(1/2)

(1)

``

 

Download mapleprimes_example_.mw

 

 

1. Can you tell me what I'm misunderstanding?  If I display the result in the second example, before "simplify", I get all the factors of k to cancel and would get the right answer.  Where does the remaining sqrt(k) come from?

2. Can you recommend a way to get the simplification to work (so that I would get "1/2" for the final solution in this example) regardless of the numerical values of k and mu (both positive real)?  It would help because my goal is to apply this model to a more complex system, and get the eigenvalues in units of omega using this form.  But I can't trust myself to keep the constants straight the way I'm doing it...

many thanks.

Please Wait...