I was learning today about trial wave functions for a harmonic oscillator.

We learnt that the solution to Schrödinger equation for a harmonic oscillator is a Gaussian curve, i.e. $$ f(x) = e^{-x^2} . $$

Testing a trial function such as:

$$ \psi = N_{0}e^{-ax^2} $$

where $x$ is position gave $$ \frac{d^2\psi}{dx^2} = N_{0} \ (4a^2x^2 - 2a)\cdot e^{-ax^{2}} . $$

Applying this to Schrödinger's equation using reduced mass $\mu$ $$ -N_{0} \cdot \frac{\hbar^2}{2\mu}(4a^2x^2 - 2a)e^{-ax^2}+ \frac{1}{2}kx^2\ \cdot N_{0}e^{-ax^2} = E\ \cdot \ N_{0}e^{-ax^2} $$ simplified to $$ - \frac{\hbar^2}{2\mu}(4a^2x^2 - 2a)+ \frac{1}{2}kx^2 = E. $$

The lecturer mentioned that as the total energy $E$ was constant, $E$ cannot be dependent on position $x$ which made sense from studies on Harmonic Motion.

Then he continued to state:

We therefore have a solution to the Schrödinger equation if the terms in $x$ are equal and opposite and cancel.

Suddenly the equation becomes: $$ \frac{\hbar^2}{2\mu} \cdot 4a^2x^2 = \frac{1}{2}kx^2 $$ and solving for $a$: $$ a = \frac{\sqrt{k\mu}}{2\hbar}. $$ My question is how did the equation $$ - \frac{\hbar^2}{2\mu}(4a^2x^2 - 2a)+ \frac{1}{2}kx^2\ = E $$ suddenly transform into $$ \frac{\hbar^2}{2\mu} \cdot 4a^2x^2 = \frac{1}{2}kx^2 $$ in just one line?

  • $\begingroup$ The answer by LonelyProf is right, but just to help... The equation didn't "transform". The operation is not the same thing as changing, for example, $x+2=2x-1$ to $x=3$. This is actually a new equation based on the reasoning you give. In other words, it's not like we changed the original equation by setting $a=E=0$. It's a new equation. $\endgroup$ Nov 4, 2018 at 10:34
  • 2
    $\begingroup$ "We learnt that the solution to Schrödinger equation for a harmonic oscillator is a Gaussian curve." Keep in mind that this is a solution, not the solution. $\endgroup$ Nov 4, 2018 at 10:39

1 Answer 1


The basic point is that the equation involving $E$ is an identity, which must hold for all values of $x$, not just particular values of $x$. So, all the $x$-dependent parts must cancel identically. Sometimes, identities are distinguished from simple equations by using the symbol $\equiv$ rather than $=$.

Slightly more generally, if you bring all the terms onto the left and rearrange your equation into the form of a polynomial identity $$ C_0 + C_1 x + C_2 x^2 + \ldots + C_n x^n \equiv 0 $$ which must hold for all values of $x$, then it follows that all the coefficients $C_i$ must vanish. You can show this by setting $x=0$ (hence $C_0=0$); then by differentiating with respect to $x$ and setting $x=0$ (hence $C_1=0$); and so on.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.