> psi3d0 := (r,theta,phi) -> > 1/486*sqrt(6/(Pi*a0^3))*(r/a0)^2*exp(-r/(3*a0))*(3*cos(theta)^2-1);
Because of its appearance inside a square root and in the argument of an exponential function, Maple will need to know the sign of :
> assume(a0,positive);This wavefunction is real-valued so the calculation is straightforward:
> int(int(int(psi3d0(r,theta,phi)^2*r^2*r^2*sin(theta),r=0..infinity), > theta=0..Pi),phi=0..2*Pi);
Note that the first factor of in the integrand is there because that's the quantity we want the expectation value of while the other factor of is associated with the volume element.
The wavefunction can be written as a product of a part that depends on r, a part that depends on and a part that depends on : . only depends on the r-dependent part of the wavefunction. (The integration over all angles just becomes a normalization integral since is independent of and .) It follows that is the same for any wavefunctions which share the same values of n and . In particular, it is the same for all of the 3d states.
> psi2px := (r,theta,phi) -> > N2px*r/a0*exp(-r/(2*a0))*sin(theta)*cos(phi);
where N2px is a normalization factor. Let's compute the volume integral over all space of the probability density:
> VI := int(int(int(psi2px(r,theta,phi)^2*r^2*sin(theta),r=0..infinity), > theta=0..Pi),phi=0..2*Pi);
> solve(VI=1,N2px);
> N2px := 1/8*sqrt(2)*sqrt(Pi*a0)/(Pi*a0^2);
The average of is the easiest thing to get, so let's start there:
> int(int(int(psi2px(r,theta,phi)^2*r^2*r^2*sin(theta),r=0..infinity), > theta=0..Pi),phi=0..2*Pi);
Now calculate the average of :
> x:=r*sin(theta)*cos(phi);
> int(int(int(psi2px(r,theta,phi)^2*x^2*r^2*sin(theta),r=0..infinity), > theta=0..Pi),phi=0..2*Pi);