Nonlinear Second Order ODEs

Takeaways

  • When the ODE is “missing \(y\)”, we make the substitution \(u = y'\) and solve the resulting first order ODE
  • When the ODE is “missing \(x\)”, we make the substitution \(u(y) = y'\) (and \(y'' = u' u\)) and solve the resulting first order ODE
  • When the ODE is missing \(x\) and missing \(y\), we can apply either method

Overview

Nonlinear differential equations are one of the most well-studied yet least understood fields of engineering and applied mathematics. The fact is that the world is nonlinear, and many interesting phenomena arise when we begin to take nonlinearity into account. (Check out James Gleick’s book “Chaos” for an excellent history and overview of the field of chaos theory and nonlinear dynamics.)

The tradeoff is that nonlinear ODEs are impossible to solve analytically in most cases, and we therefore have to resort to numerical methods (which is why we make you spend so much time on numerics in this class). However, for second order nonlinear ODEs, there exist a few special cases where we have methods that can be used to derive analytical solutions. So, not to fret—there’s plenty of fun (not really) ahead of you for solving nonlinear ODEs in this class.

Start by remembering the most general form for a second order ODE:

\[f(x,y,y',y'') = 0\]

There’s lots of implications to viewing an ODE in this way (notice how it’s just a zero level set of a function of four variables?), but the more important takeaway is that when we write the ODE this way, we can immediately tell which variables \(f(\cdot)\) depends on. In the following sections, we will write our ODEs this way to allow us to see if \(f(\cdot)\) is “missing” any of the variables i.e. is not dependent on them.

Note: for these notes, I have mainly used the examples in Hung Le’s course reader and added my own commentary or tips for deriving the solution. However, other examples are given in the section worksheets for this topic.

Missing y Method

First up is the “missing \(y\)” method. “Missing y” just means that our ODE has the form \(f(x, y',y'') = 0\). While this ODE on paper is a second order ODE, notice that if we make the substitution \(u(x) = y'\) (and then \(u' = y''\)), we can make this into a first order ODE \(f(x, u, u') = 0\). First order ODEs are much nicer to deal with than second order so if we can make a substitution like this, our lives will be significantly easier.

In general, all of the methods discussed here follow the same flow of logic: declare one of the variables to be the independent variable, and make a substitution such that we have a first order ODE (in terms of the independent variable, the function, and its first derivative). This may not make sense right now, but come back to it after reading the remainder of this page and I think it will become clear.

So back to the missing \(y\) method. The method itself is pretty simple—substitute \(y' = u\) and go from there—so let’s work through an example to see how this is used in practice. Consider the ODE (Example 6-1 in Prof. Le’s course reader):

\[y'' = x (y')^3\]

If we make the substitution (treating \(u(x)\) as a function of \(x\)), we have:

\[u' = x u^3\]

We can easily solve this using separation of variables to find:

\[-\frac{1}{2u^2} = \frac{1}{2}x^2 + C_1^2 \implies u(x) = \frac{1}{\sqrt{C_1^2 - x^2}}\]

(Here we’ve written the constant of integration as \(C_1^2\) since this will make things a bit cleaner in the next step. However, you can write it the normal way too—remember, it’s an arbitrary constant, so as long as it is constant we are fine.)

From here, we can directly integrate to find \(y(x)\):

\[y(x) = \sin^{-1}(x / C_1) + C_2\]

This goes to show how messy the solutions can get for nonlinear ODEs. It’s also a good lesson in why you need to know your integrals backwards and forwards—even for those pesky inverse trig and hyperbolic functions.

Missing x Method

The missing \(x\) method follows a similar flow of logic as the missing \(y\) method, although it is a bit trickier to wrap your head around. In an ODE that’s missing \(x\) i.e. an ODE of the form \(F(y, y', y'') = 0\), we want to transform the problem such that \(y\) becomes the independent variable, and also make a substitution so that \(u = y'\) to reduce the equation to first order.

To do this, make the substitution \(u(y) = y'\), then take the derivative:

\[y'' = \frac{d}{dx}u = \frac{du}{dy}\frac{dy}{dx} = u' u\]

Using this, we can substitute into the ODE to find the solution. Let’s work through an example (Example 6-2 from Prof. Le’s course reader):

\[y y'' = (y')^2\]

Making the above substitutions:

\[y(u' u) = u^2 \implies \frac{du}{u} = \frac{dy}{y} \implies \ln|u| = \ln|y| + C \implies u = C_1y\]

From here, we simply integrate to find:

\[y(x) = C_2 e^{C_1 x}\]

Missing x and y Equations

Finally, we have “missing \(x\) missing \(y\)” equations, where the ODE is of the form \(F(y', y'') = 0\). These equations don’t have a separate method—after all, this type of ODE fits the restrictions we put on the above two methods. To solve these ODEs, you really just need to pick one to try first (you should try missing \(y\) first since it is easier to deal with), and if that doesn’t work try the other method.

We’ll close by working through one last example to demonstrate this method. Consider the ODE:

\[ y’’ + 5y’ = 0\]

This ODE becomes linear first order homogeneous if we use the missing \(x\) method, so we choose that one to start with. Making the substitutions, we have:

\[ u’ + 5u = 0\]

so:

\[ u = C_1 e^{-5 x} \]

Then, integrating for \(y(x)\), we have:

\[ y(x) = \tilde{C_1}e^{-5x} + C_2 \]

(The tilde here is because \(C_1\) has an extra factor of \(1/5\) after we integrate.)

Closing Remarks

Overall, solving nonlinear ODEs in CME 102 is very systematic:

  1. Determine the type of nonlinear second order ODE (missing \(x\), missing \(y\), or missing \(x\) and \(y\))
  2. Make an appropriate substitution based on the missing \(x\) or missing \(y\) method
  3. Solve using know techniques (often separation of variables)

While nonlinear ODEs may seem somewhat rudimentary in this class, don’t let this hurt your enthusiasm: the fact is that nonlinear differential equations are one of the richest fields of applied mathematics, and indeed some of the most important open questions in fluid dynamics, neuroscience, and finance revolve around nonlinear dynamics and differential equations.