# Replacing operators in quantum mechanics

In general when we study the expectation value of any variable, which is a function of position and momentum in the way$$Q(x,p)$$ We generally do the following thing,i.e. $$\int_{x=0}^\infty \psi^*Q(x,p)\psi dx$$

If p be its momentum,and we are to determine $p^2$,we know,momentum operator is defined as $-ih\frac{d}{dx}$ So to determine the expectation value of p^2 we will simply replace Q in the above way,where we assume $(\frac{d}{dx})^2=\frac{d^2}{dx^2}$. Now my question is how can we understand that replacing the differential operators in such a way indeed begets us the expectation values of the required? i.e. $$<p^2>= \int_{x=0}^\infty \psi^* (-h^2\frac{d^2}{dx^2})\psi dx$$

• $<Q^2> \neq <Q>^2$. Trivial example: $\{1,-1\}$ has an expectation value of $0$ while the expectation value of their squares is $1$. – user121330 Oct 12 '17 at 17:04
• I don't understand what you are asking! "we will simply replace Q in the above way,where we assume... " - That is the definition of the operator. We do not assume that $(\frac{d}{dx})^2 = \frac{d^2}{dx^2}$. It is how $p^2$ is defined. First act $p$ on $\psi$ then act $p$ again. Each action of $p$ is a derivative. I am unclear on what you are asking – Prahar Oct 12 '17 at 18:57

An expectation value $<Q>$ of an observable $Q$ in quantum mechanics is always defined with respect to a state $\psi$ in the manner $<Q> = <\psi|Q|\psi>$.

All observables are Hermitian and have a complete set of eigenstates. Let us denote these by $|q_i>$. Because the set $|q_i>$ is complete, the identity operator may be written as $1 = \sum_i |q_i><q_i|$. Hence

$$<Q>_\psi \equiv <\psi|Q|\psi> = \sum_{i,j} <\psi|q_j><q_j|Q|q_i><q_i|\psi>$$

$$=\sum_{i,j} Q_i\delta_{i,j}<\psi|q_j><q_i|\psi> = \sum_iQ_i<\psi|q_i><q_i|\psi>$$

$$=\sum_iQ_i<q_i|\psi><q_i|\psi>^* = \sum_iQ_i|<q_i|\psi>|^2.$$ Because $|<q_i|\psi>|^2$ is the probability of finding the system in state $|q_i>$ given that it is in state $|\psi>$, it is evident that the last expression is the usual definition of the expectation value of the measurement of the observable $Q$ on the state $|\psi>$.

When we are dealing with a continuum of states rather than a discrete set, as is the set of position states $|x>$, the identity operator is written now as $\int dx|x><x|$. Hence

$$<Q>_\psi \equiv <\psi|Q|\psi> = \int dx_1\int dx_2<\psi|x_2><x_2|Q|x_1><x_1|\psi>$$

$$\equiv \int dx_1\int dx_2 \psi^*(x_2)<x_2|Q|x_1>\psi(x_1).$$

If $Q$ is a function of position $x$,

$$<x_2|Q(x)|x_1> = <x_2|Q(x_1)|x_1> = Q(x_1)<x_2|x_1> = Q(x_1)\delta(x_2 - x_1)$$

and it follows that

$$<Q>_\psi = \int dx_1\psi^*(x_1)Q(x_1)\psi(x_1).$$ If $Q$ is a function of momentum, we must use the position-space representation of $p$, which is $p = -i\hbar\partial/\partial x$. This is a result from the fact that momentum is the generator of translations in position space. For a full derivation of said result, I recommend Townsend's book "A Modern Approach to Quantum Mechanics", chapter 6. If I recall correctly, mainly it follows from the result that the position and momentum representation form a Fourier transform pair, i.e.

$$<x|p> = \frac{1}{\sqrt{2\pi\hbar}}\exp(ipx/\hbar).$$

I'll come back later with the proof if necessary.

Clearly $\langle A\rangle^2\ne \langle A^2\rangle$. In your specific case, $p$ can take positive and negative values for $p^2$ is non-negative.

As an analogy, consider a 6-sided die. The average throw is $$\frac{1}{6}(1+2+3+4+5+6)=\frac{7}{2}$$ and the square of this is $49/4=12.25$ but the average of the squares $$\frac{1}{6}(1+2^2+3^2+4^2+5^2+6^2) \approx 230.$$

Similarly, imagine a 2-sided die with values $-1$ and $1$. The average would be 0, so the square of that is also $0$, but the average of the squares would be $1$.

• Actually I was not looking for that,edited my question now.I tried to ask for something different,may be I failed to clarify. – user157588 Oct 12 '17 at 17:24
• @user157588 Please just make sure you're clarifying your question, and not changing it to ask something different. If you're editing in a way that makes existing answers invalid, that's usually a sign that your edit may have gone too far. – David Z Oct 12 '17 at 18:32