Asymptotic behaviour of quantity related to an ODE
In order for the system to be well-behaved a sufficient condition is that $f$ and $g$ are integrable at infinity.
Consider some uniform bounds of the RHS in terms of the energy functional (a standard trick): The $f$ term behaves the best. By Cauchy-Schwarz you have $|uu'|\leq E$ whereas for the $g$ term you only have $|u'|\leq \sqrt{2 E}$. We thus get the crude bound: $$ |E'| \leq |f| E + |g| \sqrt{2E}$$.
A special case is $g\equiv 0$ for which we get (use e.g. a Gronwall Lemma): $$ |\log(E(\infty)) - \log(E(0)) | \leq \int_0^\infty |f(t)|dt.$$ In this case it suffices that $f$ is integrable in order for $\lim_{t \rightarrow \infty} E(t)$ to exist and be strictly positive.
When $g$ does not vanish you may put e.g. $E=\frac12 A^2$ which yields (as long as $A>0$): $$ |A'| \leq \frac12 |f| A + |g| $$
When e.g. $f$ and $g$ are integrable then also in this case the system never explodes (use again a Gronwall Lemma) and will have a finite limit which, however, may be zero. You may also from this get conditions on initial values of $A$ which when large enough compared to the $L^1$ norm of $f,g$ give lower bounds that assures that the limit is strictly positive. For example, a sufficient condition is that $$ A(0) \ (1 - \frac12 \|f\|_1) > \|g\|_1 $$
If $\;t\to\infty,\;$ then the given ODE takes the form of $$\ddot u+u+u^3 =0,\tag1$$ which does not contain variable $\;t.\;$
Substitution $\;P=\dot u,\;\ddot u = P'_u\, \dot u = P\,\dfrac{\text dP}{\text du},\;$ presents $(1)$ in the form of $$P\,\text dP = -(u^3+u)\,\text du,$$ $$P=\dfrac12\sqrt{(a^2+1)^2-(u^2+1)^2},$$ $$\dfrac{\text du}{\sqrt{a^2-u^2}} = \sqrt{2+a^2+u^2},\tag2$$ and after substitutiion $$v=\arcsin \dfrac ua$$ one can get $$\text dv = \sqrt{2+a^2(1+\sin^2 v)}\,\text dt,$$ with the solutions $$v(t) = \text{am}\left(\sqrt{a^2+2}\,(t+b)\bigg|\dfrac{a^2}{2+a^2}\right)$$ and $$u(t) = a \text{ sn}\left(\sqrt{a^2+2}\,(t+b)\bigg|\dfrac{a^2}{2+a^2}\right),\tag3$$ where $\;\text{am}\;$ and $\;\text{sn}\;$ are the Jacobi functions.
The Jacobi functions looks too heavy for applying of the constant variations method.
Taking in account derivatives \begin{cases} \left(\text{sn}(x|m)\right)' = \text{cn}(x|m)\text{ dn}(x|m)\\[4pt] \left(\text{cn}(x|m)\right)' = -\text{sn}(x|m)\text{ dn}(x|m)\\[4pt] \left(\text{dn}(x|m)\right)' = -m\text{ sn}(x|m)\text{ cn}(x|m), \end{cases}
looks possible to find parameters $\;a\;$ and $\;b\;$ for the given functions $\;f(t)\;$ and $\;g(t)\;$ numerically, using the next statement:
- $E(t) = \dfrac14(2u'^2+u^4+2u^2) \ge 0,$
- $E(0) = \dfrac14(2u_1^2+u_0^4+2u_0^2),$
- $E'(\infty) = 0,$
- $E(\infty) = E(0)+\int\limits_0^\infty(uf+g)\,\text dt.$