Solution (source code)

= Solution

Interpret the displayed two-harmonic form as a leading term in a <weakly nonlinear expansion>. Write $\xi=(1+\epsilon\kappa)x-t$ and $\Psi_0=\alpha\cos\xi+\beta\cos2\xi$. The linear operator multiplies $\cos m\xi$ by
$$
m^4(1+\epsilon\kappa)^4-5m^2+4.
$$
For $m=1,2$, this is $4\epsilon\kappa+O(\epsilon^2)$ and $64\epsilon\kappa+O(\epsilon^2)$, respectively. Thus <detuning of a wave resonance> enters at the same order as the quadratic forcing. The <cosine addition formula> gives
$$
\Psi_0^2=\frac{\alpha^2+\beta^2}2+\alpha\beta\cos\xi+\frac{\alpha^2}2\cos2\xi+\alpha\beta\cos3\xi+\frac{\beta^2}2\cos4\xi.
$$
Projection onto the two resonant harmonics by <harmonic balance> requires
$$
4\kappa\alpha=\alpha\beta,\qquad64\kappa\beta=\frac{\alpha^2}2.
$$
The nonzero branches are therefore
$$
\boxed{\beta(\kappa)=4\kappa,\qquad\alpha(\kappa)=\pm16\sqrt2\,\kappa.}
$$
The two signs are related by a half-period translation of $\xi$; the trivial branch $\alpha=\beta=0$ also exists.

The nonresonant first correction supplies the generated mean, third harmonic and fourth harmonic. Their linear multipliers at $\epsilon=0$ are $4,40,180$, giving the nonresonant part
$$
\Psi_1^{\rm nonres}=\frac{\alpha^2+\beta^2}8+\frac{\alpha\beta}{40}\cos3\xi+\frac{\beta^2}{360}\cos4\xi.
$$
Further resonant amplitude corrections are determined at higher order. Consequently the nonzero answer describes an asymptotic periodic <travelling wave> with additional harmonics. Literally retaining only the two displayed harmonics cannot be an exact nonzero solution: their square has a positive constant term, while the linear operator applied to the two cosines has no constant term. The distinction is essential to interpreting this perturbative ansatz.