Answer
See the detailed answer below.
Work Step by Step
We are given a wave function
$$ \psi_1(x) = A e^{-x^2 / 2b^2} \tag 1$$
where $ b^2 = \dfrac{\hbar}{m \omega} $ and $ \omega = \sqrt{\dfrac{k}{m}} $
And we need to determine whether this wave function is a valid solution to the Schrödinger equation for a quantum harmonic oscillator, or not.
We know that the Schrödinger equation for this case is given by
$$
\frac{d^2 \psi_1}{dx^2} = - \frac{2m}{\hbar^2} \left[ E - \frac{1}{2} kx^2 \right] \psi_1(x)\tag 2
$$
For a harmonic oscillator, the potential energy $ U(x) $ is given by
$$
U(x) = \frac{1}{2} k x^2\tag 3
$$
This equation is needed to be tested, we will test by differentiating the wave function $ \psi_1(x) $ to see if it leads to this form, or not.
Taking the first derivative of the wave function (1);
$$
\frac{d\psi_1}{dx} = - \frac{A x}{b^2} e^{-x^2 / 2b^2}
$$
Taking the second derivative of the wave function,
$$
\frac{d^2\psi_1}{dx^2} = - \frac{A}{b^2} e^{-x^2 / 2b^2} + \frac{A x^2}{b^4} e^{-x^2 / 2b^2}
$$
$$
\frac{d^2\psi_1}{dx^2} = - \frac{1}{b^2} \left[Ae^{-x^2 / 2b^2} \right]+ \frac{ x^2}{b^4} \left[Ae^{-x^2 / 2b^2}\right]
$$
So from (1),
$$
\frac{d^2 \psi_1}{dx^2} =- \left( \frac{1}{b^2} - \frac{x^2}{b^4} \right) \psi_1(x)\tag 4
$$
$$
\frac{d^2 \psi_1}{dx^2} =- \left( \frac{m\omega}{\hbar} - \frac{m^2\omega^2x^2}{\hbar^2} \right) \psi_1(x)
$$
where $ b^2 = \dfrac{\hbar}{m \omega} $
$$
\frac{d^2 \psi_1}{dx^2} =- \left( \frac{m\omega}{\hbar} - \frac{m kx^2}{ \hbar^2} \right) \psi_1(x)
$$
where $ \omega = \sqrt{k/m} $
$$
\frac{d^2 \psi_1}{dx^2} =-\dfrac{2m}{\hbar^2} \left(\frac{1}{2} \hbar \omega - \frac{1}{2} kx^2 \right) \psi_1(x) \tag 5
$$
The left side in (2) is identical to the left side in (5), but the right side differs in $E$.
So for the energy of the $n=1$ state, $E_1=\frac{1}{2} \hbar \omega$.
In this case, or condition, the two right sides then are identical as well.
Now we have proof that $ \psi_1(x) $ is a valid solution to the Schrödinger equation, and the corresponding energy is the ground-state energy $ E = \frac{1}{2} \hbar \omega $ for the harmonic oscillator.