Define a linear operator D which differentiates ψ, D ∫ ∫ x ψ ψ ( x ) | x ⟩ ⟩ = ∫ ∫ x ψ ψ ′ ( x ) | x ⟩ ⟩ , and note that ( D X − − X D ) | ψ ψ ⟩ ⟩ = ∫ ∫ x [ ( x ψ ψ ( x ) ) ′ − − x ψ ψ ′ ( x ) ] | x ⟩ ⟩ = ∫ ∫ x ψ ψ ( x ) | x ⟩ ⟩ = | ψ ψ ⟩ ⟩ , so that the operator − iD obeys the same commutation relation as P. Thus, the difference between P and − iD must commute with X, [ P + i D , X ] = 0 , so it may be simultaneously diagonalized with X : its value acting on any eigenstate of X is some function f of the eigenvalue x.