Solution (source code)

= Solution

Multiply the first-order equation by $\Psi_i^{(0)*}$ and integrate. The first term vanishes because <Hermitian conjugation> moves the unperturbed <Hamiltonian> onto the known bra:
$$
\begin{aligned}
\langle\Psi_i^{(0)}|(\hat H^{(0)}-E_i^{(0)})|\Psi_i^{(1)}\rangle
&=\langle\hat H^{(0)}\Psi_i^{(0)}|\Psi_i^{(1)}\rangle
-E_i^{(0)}\langle\Psi_i^{(0)}|\Psi_i^{(1)}\rangle\\
&=0.
\end{aligned}
$$
Here $E_i^{(0)}$ is real. The remaining equation is
$$
\langle\Psi_i^{(0)}|\hat H^{(1)}|\Psi_i^{(0)}\rangle
-E_i^{(1)}\langle\Psi_i^{(0)}|\Psi_i^{(0)}\rangle=0.
$$
Using <wavefunction normalization> therefore yields
$$
\boxed{E_i^{(1)}=\langle\Psi_i^{(0)}|\hat H^{(1)}|\Psi_i^{(0)}\rangle
=\int\Psi_i^{(0)*}\hat H^{(1)}\Psi_i^{(0)}\,\mathrm d\tau.}
$$
Thus the first-order <energy> coefficient is the perturbation's <expectation value> in the unperturbed <quantum state>.