> psi0 := x -> (beta/Pi)^(1/4)*exp(-beta*x^2/2);
> beta := omega0*mu/hbar;
> omega0:=sqrt(k/mu);
> assume(k>0); assume(mu>0); assume(hbar>0);
To confirm that is a solution, apply the Hamiltonian to this
function:
> -(hbar^2/(2*mu))*diff(psi0(x),x$2)+1/2*k*x^2* psi0(x);
> simplify("/psi0(x));
Now, to demonstrate that the wavefunction is normalized,
> int(psi0(x)^2,x=-infinity..infinity);
> 1/sqrt(2*mu)*(-I*hbar*diff(psi0(x),x)+I*omega0*mu*x*psi0(x));
> psi1:=N1*x*exp(-beta*x^2/2);
> int(psi1^2,x=-infinity..infinity);
> simplify(");
> N1:=sqrt(2*k^(3/4)*mu^(3/4)/(hbar^(3/2)*sqrt(Pi)));
> combine(simplify(int(psi1^2,x=-infinity..infinity)));
Now, to show that this is a solution of Schrodinger's equation:
> -hbar^2/(2*mu)*diff(psi1,x$2)+1/2*k*x^2*psi1;
> simplify("/psi1);
> 1/sqrt(2*mu)*(-I*hbar*diff(psi1,x)-I*omega0*mu*x*psi1);
> simplify(");
> 1/sqrt(2*mu)*(-I*hbar*diff(psi0(x),x)-I*omega0*mu*x*psi0(x));