Lab 3: Spherical Coordinates Solutions Example
As per usual, we will start by clearing Maple's memory:
In this week's lab we are going to be making spherical plots, so I am going to load the "plots" package Maple uses for some high end plotting with the command:
Problem 1) I am asked to use a specified probability distribution for an orbital of the hydrogen atom defined as:
| > |
p
:= (1/(39366*Pi))*r^4*exp(-2*r/3)*(3*cos(theta)^2-1)^2; |
|
(1.1) |
a. I am
asked to convert this probability density from spherical coordinates to Cartesian
coordinates and make a contour plot of a slice through this function in the
xz plane.
Remember you can convert this expression to Cartesian (xyz) coordinates using the conversions:
and
| > |
pxyz:=
eval(p,{r=sqrt(x^2+y^2+z^2),theta=arccos(z/sqrt(x^2+y^2+z^2))}); |
 |
(1.2) |
 |
(1.3) |
For the following contourplot command, I used a 100x100 grid to make it look better, this is not necessary..
| > |
contourplot(eval(pxyz,y=0),x=-15..15,z=-15..15,grid=[100,100]); |
b. I am also asked to do two 3-D plots of the probability at two different probability levels, so for example I can do:
| > |
implicitplot3d(p=0.0002,r=0..20,phi=0..2*Pi,theta=0..Pi,coords=spherical,axes=box,view=[-20..20,-20..20,-20..20],grid=[25,25,25],orientation=[30,65]); |
| > |
implicitplot3d(p=0.00005,r=0..20,phi=0..2*Pi,theta=0..Pi,coords=spherical,axes=box,view=[-20..20,-20..20,-20..20],grid=[25,25,25],orientation=[30,65]); |
c. Next I am asked to find the probability of finding an electron in a sphere of radius R and then asked to plot this probability as a function of R.
| > |
prob
:= int(int(int(p*r^2*sin(theta),theta=0..Pi),phi=0..2*Pi),r=0..R); |
  |
(1.4) |
| > |
limit(prob,R=infinity); |
|
(1.5) |
d. We are
also asked to compute the probability for finding an electron in the top
half (theta<Pi/2), top third (theta < Pi/3), and top quarter (theta < Pi/4)
of the volume.
| > |
prob_half
:= int(int(int(p*r^2*sin(theta),theta=0..Pi/2),phi=0..2*Pi),r=0..infinity); |
|
(1.6) |
|
(1.7) |
| > |
prob_third
:= int(int(int(p*r^2*sin(theta),theta=0..Pi/3),phi=0..2*Pi),r=0..infinity); |
 |
(1.8) |
 |
(1.9) |
| > |
prob_quarter
:= int(int(int(p*r^2*sin(theta),theta=0..Pi/4),phi=0..2*Pi),r=0..infinity); |
 |
(1.10) |
 |
(1.11) |
And just for humor's sake (not needed for credit), I decided to plot the probabilty of finding an electron (at any distance) versus theta.
| > |
prob_theta
:= int(int(int(p*r^2*sin(theta),theta=0..THETA),phi=0..2*Pi),r=0..infinity); |
 |
(1.12) |
| > |
plot(prob_theta,THETA=0..Pi); |
Problem
2) And now we need to consider a different hydrogen atom orbital with the
following probability distribution.
| > |
p2
:= (5/(2048*Pi))*(1 - (r/4) + (r^2/80))^2 * r^2 * exp(-r/2)*(sin(theta))^2; |
 |
(2.1) |
a.
I am asked to compute the probability that the electron will be found
within one bohr radius (r<1)
| > |
prob2
:= int(int(int(p2*r^2*sin(theta),theta=0..Pi),phi=0..2*Pi),r=0..1); |
 |
(2.2) |
 |
(2.3) |
b.
And between 1 and 2 bohr radii (1 < r < 2):
| > |
prob2_2
:= int(int(int(p2*r^2*sin(theta),theta=0..Pi),phi=0..2*Pi),r=1..2); |
 |
(2.4) |
 |
(2.5) |
c.
And finally within 10 bohr radii (r>10):
| > |
prob2_10
:= int(int(int(p2*r^2*sin(theta),theta=0..Pi),phi=0..2*Pi),r=10..infinity); |
 |
(2.6) |
 |
(2.7) |
d. Finally,
for my own sanity (not required for credit), I am going to check the limits
of this probabilty versus radius and do some plots:
| > |
implicitplot3d(p2=0.000015,r=0..20,phi=0..2*Pi,theta=0..Pi,coords=spherical,axes=box,view=[-20..20,-20..20,-20..20],grid=[25,25,25],orientation=[30,65]); |
| > |
prob2_RAD
:= int(int(int(p2*r^2*sin(theta),theta=0..Pi),phi=0..2*Pi),r=0..R); |
  |
(2.8) |
| > |
limit(prob2_RAD,R=infinity); |
 |
(2.9) |
| > |
plot(prob2_RAD,R=0..50); |