The first two terms and the last two terms cancel independently. That the last two terms cancel follows from substituting \(r = \sqrt{x^2 + y^2 + z^2} \) and using the definition of Poisson brackets as a sum of partial derivatives.
Classical and Quantum mechanics present two frameworks for describing the world. Despite making statements about the same physical objects they differ in their basic assumptions. This difference in their mathematical structure usually leads to their being taught in separate courses. At an introductory level this separation is helpful, however, one eventually begins to wonder about the connections between the two. We understand that classical mechanics must emerge out of quantum mechanics in some logically consistent manner. Both describe systems like free particles and harmonic oscillators as having momentum and position. What then is the relation between the quantum description and the classical one? I believe that in presenting them in close proximity some of these questions may be illuminated.
Quantum mechanics is radically different from classical mechanics. The difference comes in from the ground level and the basic framework of classical mechanics is supplanted by wholly new mathematical structures in quantum mechanics. When solving a problem in classical mechanics there were a lot of things going on in the background which defined the problem that you were not even aware of as being part of the assumptions of classical mechanics.
The main difference is in the description of a state. The state of a system is of primary importance in physics. In a sense, being able to quantitatively describe the state of a physical system is the core of physics. Once we have a mathematical description of the state of a system, physics sets about finding the appropriate rules or laws which describe the evolution of that state.
In classical mechanics we assume that the state of a system is described by a point in phase space whose evolution is given by Hamilton's, Newton's, or Lagrange's equations (they are all equivalent). It is worth emphasizing the three characters in this game: the mathematical description of the system (a mathematical point), the mathematical structure that this point lives in (a symplectic manifold called phase space), and the laws that describe the motion of the system in this space, also called its trajectory (Hamilton's equations).
It is worth emphasizing that explaining these assumptions, e.g., what is phase space?, what are Hamilton's equations?, and all the rest of the formalism that takes some time to understand, is just formalism that reflects how we perceive the world. The work of classical mechanics comes in using this framework to solve problems. For many systems we have found that this always reduces to solving differential equations and quadrature. This is worth repeating: the formalism of classical mechanics is built around the structure of phase space and Hamiltonian evolution. The basic assumption is that particles have positions \(x\) and momenta \(p\) which suffice to describe them. Any other quantity of interest, be it energy, angular momentum, or otherwise, can be derived from knowing how \(x\) and \(p\) evolve.
As it turns out, in quantum mechanics this framework, natural as it is, is simply incorrect. It was natural to give each particle a position and a momentum, but, as we will see, the correct starting description of a system is as a vector \(\vert \psi \rangle \) in a Hilbert space evolving according to the Schrodinger equation. From this vector we may obtain information about the position and momentum of the particle, but the state vector is logically prior. Why this is the correct description is harder to answer. (As Feynman would say, Why questions always are). What we mean to ask is how exactly can we justify this radical shift? The answer, as you should expect, comes down to experiment. It is empirically true that states behave like vectors and not like points.
Historically, trying to work with certain experiments that produced systems whose states behaved like vectors without understanding this mathematical framework was very frustrating and difficult. There is a famous story of Heisenberg's development of quantum mechanics where he managed to write a set of equations for describing the evolution of a system. He happily left the manuscript with his advisor Max Born who mulled over what Heisenberg had written and had the following to say:
By consideration of ...examples...[Heisenberg] found this rule.... This was in the summer of 1925. Heisenberg...took leave of absence...and handed over his paper to me for publication....
Heisenberg's rule of multiplication left me no peace, and after a week of intensive thought and trial, I suddenly remembered an algebraic theory....Such quadratic arrays are quite familiar to mathematicians and are called matrices, in association with a definite rule of multiplication. I applied this rule to Heisenberg's quantum condition and found that it agreed for the diagonal elements. It was easy to guess what the remaining elements must be, namely, null; and immediately there stood before me the strange formula
$$QP - PQ = \frac{ih}{2\pi}$$
The source of this quote is Born's Nobel lecture, as quoted in Thomas F. Jordan's Quantum Mechanics in Simple Matrix Form, p. 6.
The simplest nontrivial quantum system is one whose state space is two dimensional, \(\mathcal{H} = \mathbb{C}^2\). That is, the state space is spanned by two vectors whose coefficients are complex numbers. Choosing the standard basis we denote these basis vectors as $$\vert 0 \rangle = \binom{1}{0} \qquad \vert 1 \rangle = \binom{0}{1}$$ In terms of this basis we can write any normalized state as $$ \vert \psi \rangle = \alpha \vert 0 \rangle + \beta \vert 1 \rangle \qquad \vert \alpha \vert^2 + \vert \beta \vert^2 = 1$$ Because the overall phase of the wavefunction is immaterial, \(\alpha\) can and often is chosen to be real. Then the normalization requirement is automatically met if we choose \(\alpha = \cos(\theta/2), \beta = \sin(\theta/2)e^{i\phi} \) (the factor of \(1/2\) in the definition of \(\theta\) is chosen purely for later convenience). In this case we have $$ \vert \psi \rangle = \cos\Big(\frac{\theta}{2} \Big) \vert 0 \rangle + \sin\Big(\frac{\theta}{2}\Big) e^{i\phi}\vert 1 \rangle $$ Of course the coefficient of \(\vert 0 \rangle\) does not have to be real. Another common choice is the more symmetric one, $$ \vert \psi \rangle = \cos\Big(\frac{\theta}{2} \Big) e^{-i\bfrac{\phi}{2}}\vert 0 \rangle + \sin\Big(\frac{\theta}{2}\Big) e^{i\bfrac{\phi}{2}}\vert 1 \rangle $$ This gives the Bloch sphere description of a state in a two level system.
Observables are represented by self-adjoint operators. An arbitrary operator in \(\mathbb{C}^2\) is written as a 2x2 matrix. The requirement that it be self-adjoint implies that the diagonal elements are complex conjugates. Such operators are spanned by the Pauli matrices. $$ \begin{pmatrix} a_0 + a_3 & a_1 - i a_2 \\ a_1 + i a_2 & a_0 - a_3 \end{pmatrix} = a_0 \mathbb{1} + a_1 \sigma_1 + a_2 \sigma_2 + a_3 \sigma_3 $$ In particular the Hamiltonian is such an operator so we may write $H = a_0 \mathbf{1} + \mathbf{v}\cdot \mathbf{\sigma}$ for appropriate choices of the parameters. The benefit of expanding in Pauli matrices is that they have nice commutation (and anti-commutation) relations. These allow us to prove that, provided $\mathbf{v}$ is a unit vector, \begin{equation*} (\mathbf{v}\cdot\mathbf{\sigma})^n = \begin{cases} 1 &n \text{ even} \\ \mathbf{v}\cdot\mathbf{\sigma} &n \text{ odd} \end{cases} \end{equation*} It follows then that the time evolution of any system is easy to write down $$i\hbar \frac{\partial \vert \psi (t)\rangle}{\partial t} = H \vert \psi (t) \rangle \implies \vert \psi (t) \rangle = e^{-\frac{i H t}{\hbar}}\vert \psi (0) \rangle $$ Substituting \(H = a_0 \mathbf{1} + \mathbf{v}\cdot \mathbf{\sigma}\) gives \begin{align*} \exp \Big(-\frac{i H t}{\hbar} \Big) &= \exp \Big(-\frac{i a_0 t}{\hbar}\mathbf{1} \Big) \exp\Big(- i\frac{t\vert\mathbf{v}\vert}{\hbar} \frac{\mathbf{v}}{\vert\mathbf{v}\vert}\cdot\mathbf{\sigma} \Big)\\ &= \exp \Big(-\frac{i a_0 t}{\hbar} \Big) \cdot \Bigg (\cos\Big( \frac{t\vert\mathbf{v}\vert}{\hbar} \Big) + i \frac{\mathbf{v}}{\vert\mathbf{v}\vert} \cdot \mathbf{\sigma} \sin\Big ( \frac{t\vert\mathbf{v}\vert}{\hbar} \Big )\Bigg) \end{align*} Let us imagine a system in which we have a diagonal Hamiltonian \(H_0 = diag(E_1,E_2) \). In this system \(\vert 0 \rangle \) and \(\vert 1\rangle \) are eigenstates of the Hamiltonian. A general Hamiltonian will have some additional interaction \(W\) added to it $$ H = H_0 + W = \begin{pmatrix} E_1' & w \\ w^* & E_2' \end{pmatrix} = \frac{E_1' + E_2'}{2} \mathbb{1} + \vec{v}\cdot \vec{\sigma} $$ The stationary states of this system will generall be different from those in the original. Solving for the eigenvalues of \(H\) we find that the new energies of the system are $$\lambda_\pm = E_\pm = \frac{E_1' + E_2'}{2} \pm \frac{1}{2}\sqrt{(E_1'-E_2')^2 + 4 \vert w \vert^2 }$$ Substitution of this form of \(H\) gives us $$\vec{v} = \Big( Re(w), -im(w), \frac{E_1' - E_2'}{2}\Big)$$ $$\vert \vec{v} \vert^2 = \vert w\vert^2 + \frac{1}{4}(E_1' - E_2')^2 $$ And we may recover the result derived in class.
To write the momentum operator we need to know the Laplacian in spherical coordinates. The straighforward (though cumbersome) way to do this is simply to apply the variable transformation. In cartesian coordinates the Laplacian is $$\nabla^2 = \frac{\partial^2}{\partial x^2} + \frac{\partial^2}{\partial y^2} + \frac{\partial^2}{\partial z ^2}$$ Because we know the transformation from Cartesian to Spherical coordinates we can fairly easily express the new partial derivatives in terms of the Cartesian ones: \begin{align} \frac{\partial }{\partial r} &= \frac{\partial x}{\partial r}\frac{\partial }{\partial x} + \frac{\partial y}{\partial r}\frac{\partial }{\partial y} + \frac{\partial z}{\partial r}\frac{\partial }{\partial z} \\ \frac{\partial }{\partial \theta} &= \frac{\partial x}{\partial \theta}\frac{\partial }{\partial x} + \frac{\partial y}{\partial \theta}\frac{\partial }{\partial y} + \frac{\partial z}{\partial \theta}\frac{\partial }{\partial z} \\ \frac{\partial }{\partial \phi} &= \frac{\partial x}{\partial \phi}\frac{\partial }{\partial x} + \frac{\partial y}{\partial \phi}\frac{\partial }{\partial y} + \frac{\partial z}{\partial \phi}\frac{\partial }{\partial z} \\ \end{align} However, to write the Laplacian we need to invert this. The problem is easier if we work in matrix notation. $$ \begin{pmatrix} \partial_r \\ \partial_\theta \\ \partial_\phi \end{pmatrix} = \begin{pmatrix} \frac{\partial x}{\partial r} & \frac{\partial y}{\partial r} & \frac{\partial z}{\partial r} \\ \frac{\partial x}{\partial \theta} & \frac{\partial y}{\partial \theta} & \frac{\partial z}{\partial \theta} \\ \frac{\partial x}{\partial \phi} & \frac{\partial y}{\partial \phi} & \frac{\partial z}{\partial \phi} \\ \end{pmatrix} \begin{pmatrix} \partial_x \\ \partial_y \\ \partial_z \end{pmatrix} $$ We define the Jacobian matrix $$ J = \begin{pmatrix} \frac{\partial x}{\partial r} & \frac{\partial y}{\partial r} & \frac{\partial z}{\partial r} \\ \frac{\partial x}{\partial \theta} & \frac{\partial y}{\partial \theta} & \frac{\partial z}{\partial \theta} \\ \frac{\partial x}{\partial \phi} & \frac{\partial y}{\partial \phi} & \frac{\partial z}{\partial \phi} \\ \end{pmatrix} = \begin{pmatrix} \sin\theta\cos\phi & \sin\theta\sin\phi & \cos\theta \\ r\cos\theta\cos\phi & r\cos\theta\sin\phi & -r\sin\theta \\ -r\sin\theta\sin\phi & r\sin\theta\cos\phi & 0 \end{pmatrix} $$ The inverse is best computed using Sympy as $$ J^{-1} = \begin{pmatrix} \sin\theta\cos\phi & \frac{\cos\theta\cos\phi}{r} & -\frac{\sin\phi}{r\sin\theta} \\ \sin\theta\sin\phi & \frac{\cos\theta\sin\phi}{r} & \frac{\cos\phi}{r\sin\theta} \\ \cos\theta & -\frac{\sin\theta}{r} & 0 \end{pmatrix} $$ This gives us the partial derivatives \begin{align} \partial_x &= \sin\theta\cos\phi\partial_r + \frac{\cos\theta\cos\phi}{r}\partial_\theta - \frac{\sin\phi}{r\sin\theta}\partial_\phi \\ \partial_y &= \sin\theta\sin\phi\partial_r + \frac{\cos\theta\sin\phi}{r}\partial_\theta + \frac{\cos\phi}{r\sin\theta}\partial_\phi \\ \partial_z &= \cos\theta\partial_r -\frac{\sin\theta}{r} \partial_\theta \\ \end{align} Substituting these and simplifying gives the correct formula for the Laplacian in spherical Coordinates.
In classical mechanics we define the angular momentum of a particle with position \(\vec{r}\) and momentum \(\vec{p}\) as \(\vec{L} = \vec{r} \times \vec{p} \). In cartesian coordinates this amounts to
\begin{align} L_x &= yp_z - zp_y \\ L_y &= zp_x - xp_z \\ L_z &= xp_y - yp_x \\ \end{align}Angular momentum is a useful quantity in problems with spherical symmetry because it is a conserved quantity of such systems. There are several ways to show this. The simplest utilizes Poisson brackets (done below).
A problem is said to possess spherical symmetry when the potential depends only on \(r\) $$V = V(r)$$ Such potentials are called central potentials. For central potentials we can write the Hamilitonian as $$H = \frac{\vec{p}^2}{2m} + V(r)$$ with the understanding that \(r = \sqrt{x^2 + y^2 + z^2}\). With this, we can show directly that \(\vec{L}\) is conserved. Because a vector is conserved if and only if each of its components are conserved, we will show only that \(L_x\) is conserved. The proofs that \(L_y\) and \(L_z\) are conserved follow from cyclically permuting \(x,y,\) and \(z\). In classical mechanics the condition that a quantity be conserved is that its Poisson bracket with the Hamiltonian vanish: $$\frac{dF}{dt}(q,p,t) = \frac{\partial F}{\partial t} + \frac{\partial F}{\partial q}\dot{q} + \frac{\partial F}{\partial p}\dot{p}= \frac{\partial F}{\partial t} + \Big \{ F,H \Big \}$$ We can easily check that $$\frac{dL_x}{dt} = \Big \{ L_x,H \Big \} = 0$$
The first two terms and the last two terms cancel independently. That the last two terms cancel follows from substituting \(r = \sqrt{x^2 + y^2 + z^2} \) and using the definition of Poisson brackets as a sum of partial derivatives.
To best make use of the spherical symmetry inherent in a problem with a central potential we should express our equations in spherical coordinates. It turns out that doing so leads to the convenient form for the Hamiltonian $$H = \frac{p_r^2}{2m} +\frac{L^2}{2mr^2} + V(r)$$ And, noting that \(L\) is a constant, we see that the angular dependence drops out! This makes the Hamiltonian 1-dimensional instead of 3-dimensional — a great simplification. However showing that this formula is true requires some work. What we are really doing is a canonical transformation from cartesian coordinates and momenta to spherical coordinates and momenta: $$x,y,z,p_x,p_y,p_z \rightarrow r, \theta, \phi, p_r,p_\theta, p_\phi $$ When we solve for the new Hamiltonian we know one leg of the transformation, namely, the coordinate transformation, but we do not know how the momenta transform. \begin{align} x &= r\sin\theta \cos\phi & p_x =\; ?\\ y &= r\sin\theta \sin\phi & p_y =\; ? \\ z &= r\cos\theta & p_z = \;? \end{align} Any time we are doing this kind of transformation, where we know one leg but not the other, we need to find the generating function. In this case, where we know the old coordinates in terms of the new, we use a type 3 generating function. $$F_3 = F_3(\vec{p}, \vec{Q}) \qquad q_\alpha = - \frac{\partial F_3}{\partial p_\alpha} \quad P_\alpha = -\frac{\partial F_3}{\partial Q_\alpha}$$ In practice the best way to decide the right generating function is either experience, or looking at all four and seeing which one fits. Here we have \begin{align} -\frac{\partial F_3}{\partial p_x} = x &= r\sin\theta \cos\phi \\ -\frac{\partial F_3}{\partial p_y} = y &= r\sin\theta \sin\phi \\ -\frac{\partial F_3}{\partial p_z} = z &= r\cos\theta \end{align} Which we can easily integrate to determine $$F_3(p_x,p_y,p_z, r, \theta, \phi) = - p_x r\sin\theta \cos\phi - p_y r \sin\theta\sin\phi - p_zr\cos\theta$$ Now we can use the other leg to write the new momenta \begin{align} p_r &= p_x\sin\theta\cos\phi + p_y \sin\theta\sin\phi + p_z\cos\theta \\ p_\theta &= p_xr\cos\theta\cos\phi + p_y r\cos\theta\sin\phi - p_zr\sin\theta \\ p_\phi &= -p_xr\sin\theta\sin\phi + p_y r\sin\theta\cos\phi \end{align} If you are very observant you can actually notice from right here that \(p_\phi = -p_xy + p_yx = L_z \), but this is getting a little ahead of ourselves. Inverting these is not too hard (but does require a little work) \begin{align} p_x &= p_r\sin\theta\cos\phi + \frac{\cos\theta\cos\phi}{r}p_\theta - \frac{\sin\phi}{r\sin\theta}p_\phi \\ p_y &= p_r\sin\theta\sin\phi + \frac{\cos\theta\sin\phi}{r}p_\theta + \frac{\cos\phi}{r\sin\theta}p_\phi \\ p_z &= p_r\cos\theta - \frac{\sin\theta}{r}p_\theta \end{align} This completes the spherical polar transformation. We can now substitute these into the Hamiltonian. Doing so is fairly messy but the result simplifies nicely $$H = \frac{p_r^2}{2m} + \frac{p_\theta^2}{2mr^2} + \frac{p_\phi^2}{2mr^2\sin^2\theta} + V(r)$$ The supreme cunning comes from figuring out that $$L^2 = p_\theta^2 + \frac{1}{\sin^2\theta}p_\phi^2$$ and using this to reduce the Hamiltonian to 1 dimension, as above. Try showing the above equivalence.
\(L^2\) is a known function of the cartesian coordinates and momenta and so we can write it in spherical coordinates and momenta using the transformations just derived. $$L^2 = (yp_z - zp_y)^2 + (zp_x - xp_z)^2 + (xp_y - yp_x)^2$$ Actually doing so and simplifying the expression is a major pain. The best solution is to use a symbolic computation program. You can use Mathematica, but I used Python which has the benefit of being free.