Ordinary Differential Equations

A foundational course for understanding mathematical modeling, PDEs, and fluid dynamics.

Course Overview

This course introduces the fundamental ideas behind ordinary differential equations (ODEs), including linearity, separability, homogeneous and non-homogeneous equations, and methods of solving first- and second-order systems. We will also examine their applications, which is generally the most important part. This will give you an understanding of the importance of ODEs and the breadth of their use (ODEs touch on just about everything you could imagine!) The goal is to build a strong conceptual foundation that will support later work in partial differential equations, computational fluid dynamics, and operator-theoretic methods.

As you progress through this course, you will find links to related topics in other courses (such as PDEs or Linear Algebra). This interconnected structure is designed to help you quickly revisit prerequisite ideas without breaking your workflow.

Linear vs Nonlinear ODEs

One of the first distinctions we make in the study of differential equations is between linear and nonlinear ODEs. Linear ODEs have a very specific structure that allows powerful solution techniques, while nonlinear ODEs often require more specialized or qualitative approaches.

If you want the fast version, below is a short video introducing how to identify whether an ODE is linear or nonlinear. Otherwise stick around for a more detailed explanation. This video includes examples, visual explanations, and a clear checklist for classification.

To understand linear vs. nonlinear ODEs we must first understand the basic structure in which ODEs are written. A common way we will see a (linear) ODE written is as follows: $$a_n(x)y^{(n)}+a_{n-1}(x)y^{(n-1)}+...+a_1(x)y'+a_0(x)y = g(x),$$ and a nonlinear one will often be written as: $$a_n(x,y)y^{(n)}+a_{n-1}(x,y)y^{(n-1)}+...a_1(x,y)y'+a_0(x,y)y = g(x).$$ You many wonder the difference between the two, it is in the values of \(a_n\) are called the coefficients, if those coefficients depend only on the independent variable (in this case the independent variable is \(x\)) then it is linear, however if those coefficients depend on the dependent variable (which is \(y\) in this case) then the ODE is nonlinear. The number of "primes" (as in \(y'\) for example) represents the number of derivitives we are taking of \(y\) with respect to the independent variable (in this case \(x\)). It should be noted that there are other common ways of writing derivatives as well, perhaps the most common being \(\frac{dy}{dx}\), again with \(y\) as the dependent variable and \(x\) as the independent variable. Another common one that we may run into is the "dot" notation, for example \(\ddot{x}\), in this case we generally take \(x\) as the dependent variable and \(t\) as the independent variable, and since there are 2 dots over the top, that means this is a second derivative of \(x\) with respect to \(t\). This is commonly found in physics related applications, and since I like applications, we will make use of it in this course. If the coefficients are only functions of the independent variable, as they are in the above equation, then the ODE is called linear. This still probably is a bit too abstract at the moment, so lets look at some examples to get a better understanding. The following equation: $$y'' + y = 0,$$ is a linear equation, because notice that \(y\) and all of it's derivatives only have coefficients that depend on \(x\) (in this case it is actually just the constant value 1 for the coefficients but this is still not considered a function of \(y\)), and also note that \(y\) and all of it's derivatives are also only linear. Let's turn this up a notch, the following equation: $$y'' + y = \mbox{cos}(x)+e^x,$$ is also linear. Even though there are nonlinear functions of the independent variable \(x\), the coefficients are linear and all of the terms containing \(y\) are also linear. Additionally, $$y^{(4)}+y'' = e^x,$$ (taking the 4th derivative of \(y\) is the meaning of the (4) superscript), is also linear, again there is no multiplication of multiple \(y\) terms, nor are there nonlinear functions of any \(y\) terms. However, $$[y'']^2 + y = 0,$$ is nonlinear, because the term containing \(y''\) is nonlinear. Similarly, $$y'y'' + y = 10,$$ is nonlinear, because \(y'y''\) is the multiplication of 2 terms containing \(y\). Also, $$y''+\mbox{cos}(y) = \mbox{cos}(x),$$ is nonlinear, because the \(\mbox{cos}(y)\) is obviously nonlinear in \(y\).

Homogeneous vs nonhomogeneous ODEs

You may be wondering why we are spending so much time classifying ODEs. The first section was about linear vs nonlinear ODEs and now we are talking about homogeneous vs nonhomogeneous ODEs. As it turns out, understanding what kind of ODE you have (and this will be true for partial differential equations (PDEs) as well by the way) informs you about the potential ways to solve that ODE. What separates a PDE from an ODE you might ask? Well that is quite simple, ODEs have regular derivatives in them \(dy/dx\) for example). Whereas PDEs have partial derivatives in them (\(\partial u/\partial x\) for some function \(u(x,y)\) for example). Techniques for linear ODEs may differ from those for nonlinear ones. To find the full set of solutions of an ODE often requires us to separate out the homogeneous part of the ODE from the nonhomogeneous part, as you will see.

So now that we have that out of the way, it is really simple to tell whether the ODE is homogeneous or not, once you write the ODE in standard form, the (linear) equation: $$a_n(x)y^{(n)}+...+a_1(x)y'+a_0(x)y = 0$$ is called homogeneous, whereas, $$a_n(x)y^{(n)}+...+a_1(x)y'+a_0(x)y = g(x)$$ for \(g(x) \neq 0\), is called nonhomogeneous.

If you want the fast version, below is a short video introducing how to identify whether an ODE is homogeneous or nonhomogeneous. Otherwise stick around for a more detailed explanation. This video includes examples, and a clear checklist for classification.

As with everything, it is always good to look at examples to make sure we understand. I highly encourage anyone who decides to go into higher level mathematics to get used to doing this type of thing to make sure you understand. Most people (myself included) have a hard time grasping abstract ideas without examples, so gaining practice making your own examples is a good idea. Ok, now lets dive in with the practice, the equation $$xy'' + x^2y = 0,$$ is homogeneous (and also linear by the way), as is, $$y''+y = 0.$$ However, $$xy^{(3)}+y''+1 = 0,$$ is nonhomogenous (yet still linear) because if we rewrite this equation in standard form $$xy^{(3)}+y'' = -1,$$ it is clear that \(g(x) = -1 \neq 0\) in this case. Also, $$y'+y = \mbox{cos}(x),$$ is also nonhomogenous because \(g(x) = \mbox{cos}(x)\).

The order of an ODE

Oyy, we have yet more classification to go. I promise we will get to the juicy topics of solving ODEs shortly, but as I mentioned above, it is really important to be able to classify the ODEs so that we know which tools in our toolbox will be available to solve them. In this section, we will briefly discuss the order of an ODE.

Lets go back to our standard way of writing an ODE, again I will for simplicity assume for this case that we are dealing with linear ODEs (so the \(a_n\) terms are ONLY functions of the dependent variable, in this case \(x\)). $$a_n(x)y^{(n)}+...+a_1(x)y'+a_0(x)y = g(x),$$ is said to have order \(n\), since the highest derivative that we take is the \(n\)th one.

If you want the fast version, below is a short video introducing how to identify what the order of an ODE is see below. Otherwise stick around for a more detailed explanation. This video includes examples of the order of an ODE.

Again it might seem simply by the way I wrote things above, but we have to be very careful to differentiate between the order of an ODE and polynomial terms that may make an ODE nonlinear. For example, $$x^2y''' + y = \mbox{sin}(x^4),$$ has order 3, since the highest derivative of \(y\) is the \(y'''\) term. However, $$[y']^5+y^4 = x^10,$$ is first order (or order 1) since the highest derivative is the \(y'\) and the 5th power is only related to the nonlinearity of the differential equation. So it is quite important that we use caution in our notation to avoid confusion. For more practice, $$[y^{(4)}]^2 + \mbox{cos}^3(x)y' = 0,$$ is a 4th order ODE. We should also be comfortable with identifying the order of an ODE from other notations, for example, $$\frac{d^2y}{dx^2}+xy = x^{0.25},$$ is a second order ODE, and $$t^2\dddot{x}+\mbox{cos}(t^8)\ddot{x}+ x = e^{-5t},$$ is a third order ODE since the highest derivative term contains 3 dots.

Again it might seem simply by the way I wrote things above, but we have to be very careful to differentiate between the order of an ODE and polynomial terms that may make an ODE nonlinear. For example, $$x^2y'''+y = \mbox{sin}(x^4),$$ has order 3, since the highest derivative of \(y\) is the \(y'''\) term. However, $$[y']^5+y^4=x^{10},$$ s first order (or order 1) since the highest derivative is the \(y'\) and the 5th power is only related to the nonlinearity of the differential equation. So it is quite important that we use caution in our notation to avoid confusion. For more practice, $$[y^{(4)}]^2+\mbox{cos}(x^3)y' = 0,$$ is a 4th order ODE. We should also be comfortable with identifying the order of an ODE from other notations, for example, $$\frac{d^2y}{dx^2}+xy=x^{0.25},$$ is a second order ODE, and $$t^2\dddot{x}+\mbox{cos}(t^8)\ddot{x}+x = e^{-5t},$$ is a third order ODE, since the highest derivative term contains 3 dots.

First order ODEs

Amazing! We finally can move on from classification (well sort of anyway...). Don't put all that terminology away though, as with most courses, we will build on the information that we have already learned. So if you forget what a nonlinear, nonhomogeneous, second order ODE is later on, you are going to have a hard time understanding why the technique you tried to use didn't work out properly to solve a particular problem. And that is no fun. Also, ODEs are truly a foundational course for just about any mathematical science you can imagine, whether it be the majority of the engineering fields, or physics or chemistry, and when you get right down to it, biology too, at least when we model biological systems. We will stick with first order ODEs for a while because a number of ideas from these types of ODEs carry over into the higher order ODEs.

We are going to add in more terminology now, a first order ODE is called autonomous if the only the dependent variable is explicitely given in the equation, that is, $$\frac{dy}{dx} = f(y).$$ Notice that the right hand of the equation only depends on the dependent variable \(y\), there is no mention of the dependent variable \(x\) other than in the derivative itself, this is the definition of autonomous. Now we will see some examples, the first order ODE, $$\frac{dy}{dx} = y^2,$$ is autonomous, notice also that it is nonlinear and homogeneous because if we write it in standard form, it becomes $$\frac{dy}{dx} -y^2 = 0.$$ Also, the first order differential equation, $$\dot{x} = \mbox{cos}(x)-1,$$ is autonomous, because the independent variable (in this case remember the independent variable is \(t\), anytime you see a dot over the top this implies that \(t\) is the independent variable) does not appear, however the above equation is also nonlinear, but it is nonhomogeneous, because when written in standard form $$\dot{x}-\mbox{cos}(x) = -1.$$ Also, $$y' = e^{-y}+3y,$$ is first order, autonomous, nonlinear and in this case homogeneous, try writing it in standard form to see this. You may wonder why we do not always write differential equations in standard form, it will be abundantly clear soon, but I will stop for a moment to note that sometimes (or maybe even often) it is convenient to write the ODE in other forms as we have been doing here. This is particularly true when dealing with solutions to autonomous ODEs.

For nonautonomous ODEs we may write it as, $$\frac{dy}{dx} = f(x,y).$$ Notice in this equation the function \(f\) will depend on both the independent and the dependent variable, or potentially only the independent one. So for example the first order ODE, $$\frac{dy}{dx} = \mbox{cos}(x),$$ is nonautonomous, and it also linear, and nonhomogeneous. Additionally, $$\dot{x} = -t^2+\mbox{cos}(x),$$ is nonautonomous, because the independent variable (\(t\)) shows up in the equation, naturally this is a first order ODE, it is nonlinear and it is nonhomogeneous. Now for a slightly tricky case, $$xy' = 0,$$ is also nonautonomous, you might yell at me on that one, because I wrote that the right hand side as \(f(x,y)\), but where is the \(x\) on the right hand side? Well notice that if I divide both sides by \(x\) that the right hand side becomes \(\frac{0}{x}\), if we were careless we would just write that as \(0\) but that is actually not entirely correct, it is only true if we explicitely rule that \(x \neq 0\), but recall that if \(x = 0\) this becomes \(\frac{0}{0}\) which is an indeterminant form. You can read up on indeterminant forms if you click here.

If you want the fast version, below is a short video introducing how to identify what the order of an ODE is see below. Otherwise stick around for a more detailed explanation. This video includes examples of the order of an ODE.

Differential Operators

Time to learn about differential operators! More to come!

More to come!

More to come!

More to come!