# Solving the Nonlinear Second-Order ODE $u'' - u^2 + 9 = 0$

This is the one question from my prelim that still stumps me.

Consider the nonlinear ordinary differential equation $$u'' - u^2 + 9 = 0.$$

1. Convert the equation to a system of first order equations and sketch some representative solutions of this first order system. Identify all constant solutions in your sketch.
2. Find a vector field which is orthogonal to the trajectories of your first order system.
3. Find a scalar function on the plane whose gradient is the vector field you found in (2).

I don't have much experience with nonlinear ODE's, so I went in circles on my exam. The constant solutions are $u = \pm 3$.

I'd like to know the general process to solve these sorts of equations, but interesting tricks and "sleights of mind" would also be great to see.

-

## 2 Answers

There's a general "trick" that one can use to solve differential equations of the form $u'' = f(u)$. Namely you can multiply through by $u'$ and get $u'u'' = f(u)u'$. Note the left hand side is the derivative of ${1 \over 2}(u')^2$, and the righthand side is the derivative of $g(u)$, where $g$ is an antiderivative of $f$. So you have $$[{1 \over 2}(u')^2]' = [g(u(t))]'$$ Integrating both sides you get $${1 \over 2} (u')^2 = g(u(t)) + C$$ This is now a first order equation which you solve by separation of variables. In your case $f(u) = u^2 - 9$, so $g(u)$ can be taken to be $\displaystyle \frac{u^3}{ 3} - 9u$. So you need to solve $${1 \over 2} (u')^2 = {u^3 \over 3} - 9u + C$$ Equivalently $${du \over dt} = \pm \sqrt{{2 \over 3}u^3 - 18u + C'}$$ This looks like it's going to be nasty to solve directly, but you should be able to sketch curves.

If you are just looking for constant solutions you can't use the above since we multiplied by $u'$ at some point. But you can solve $u^3 - 9u = 0$ in the original equation for constant solutions, and you'll get $u(t) = 0,3,-3$.

-
unless I'm missing something terribly obvious: since $f(u) = u^2 - 9$ and, hence, $g(u) = \frac {u^3}{3} - 9u$, wouldn't it follow that $\frac {du}{dt} = \pm \sqrt{2u^3 - 54u + C''}$, given the 3 in the denominator of g(u)? – amWhy May 30 '11 at 22:22
Yes, I left out a $3$ there.. corrected it. – Zarrax May 30 '11 at 22:54
I'm sorry, but could you explain how you got $u(t) = 0$ as a constant solution? I can understand how $u(t)=-3,3$ are solutions because that's setting $0 = u'' = u^2-9$. But I do not see where $u^3-9u$ comes from. – Michael Chen Jul 9 '11 at 8:24
Yeah oops it should have been solving $u^2 - 9 = 0$ and not $u^3 - 9u = 0$ so you get just $u = 3, -3$ and not $u = 0$. Must not have been my day. – Zarrax Jul 10 '11 at 0:11
@Zarrax is there a way to expand this trick to 3d? I tried to find a similar relation between laplacian and a $(\nabla u)^2$ without luck. – Yotam Jul 28 '15 at 16:36

I can tell you what the first part of the prelim question is about: you come up with a name for $u'$, say, $u'=v$, and then your second order equation is equivalent to the system $u'=v,v'=u^2-9$ of first order equations.

Now to each point in the $uv$-plane you can associate the vector $(u',v')$, e.g., at the point $(1,1)$ you can draw a little arrow in the direction $(1,-8)$. Draw enough of these little arrows, and you can see how to link them up with smooth curves. These curves are the representative solutions you are asked to sketch.

-