Solution (source code)

= Solution

Substitution of the stated phase into
$$
i\hbar\psi_t=-\frac{\hbar^2}{2m}\psi_{xx}+mgx\psi
$$
cancels the potential and scalar phase terms, leaving
$$
\boxed{i\hbar\Phi_t
=-\frac{\hbar^2}{2m}\Phi_{xx}+i\hbar gt\Phi_x}.
$$