Ordinary Differential Equations (ODE)
Let’s begin with a familiar idea. In Analysis I, you became an expert at finding the “anti-derivative” of a function. What you were really doing, without the fancy name, was solving your first differential equation.
An ODE is simply an equation that defines a relationship between an unknown function and its own derivatives. Our mission, should we choose to accept it, is to find the function that satisfies this relationship.
A First Look: Building Intuition
The Equation: This is just a formal way of asking, “What function
f
has a derivative that is always 2?” From basic integration, you know the answer isn’t a single function, but a whole family: For any constant , this equation holds. We have infinitely many solutions.The Equation: This asks for a function that is its own derivative. The undisputed champion of this property is the exponential function. The family of solutions is: Again, we have a universe of solutions, one for each choice of the constant .
This ambiguity is a central theme. An ODE on its own usually defines a family of functions. To single out one specific solution, we need to provide an anchor point—an extra piece of information.
The Initial Value Problem (IVP)
An ODE combined with one or more initial conditions is called an Initial Value Problem. It provides the specific starting point needed to select a unique solution from the infinite family.
Let’s turn our first example into an IVP by specifying that the function must pass through the origin, i.e., .
We start with our general solution, . Now we enforce the condition: The initial condition has eliminated all ambiguity. The unique solution to the IVP is .
The Language of ODEs: Formal Definitions
Definition: Ordinary Differential Equation (ODE)
An ODE is an equation involving a function of a single independent variable (like or ) and one or more of its derivatives. The general form is: The key word is “ordinary,” which means all derivatives are with respect to that single variable.
Definition: Order of an ODE
The order of an ODE is simply the order of the highest derivative that appears in the equation.
- is first-order.
- is third-order.
A Quick Aside: ODE vs. PDE
If an equation involves a function of several independent variables and its partial derivatives, it’s called a Partial Differential Equation (PDE). A famous example is the heat equation, which describes how temperature evolves in a rod over position and time : PDEs are fundamentally more complex. We will focus exclusively on the “ordinary” world.
Notation and A Classic Example
What's the deal with vs. ?
You’ll see us switch between writing , and just . This is a common and useful shorthand. When the context is clear, we drop the
(x)
to make the equations cleaner and easier to read. Always remember that is a function of an underlying variable (like or ), not just a number.
A Classic Physics Example: Gravity
Newton’s second law, , is one of the most important ODEs in science. Let’s model a mass falling, with its position at time given by .
- Force: The force of gravity is constant, .
- Acceleration: Acceleration is the second derivative of position, .
Equating them gives our ODE: This is a second-order ODE. We can solve it by simply integrating twice:
- Integrate once (to get velocity):
- Integrate again (to get position):
The two constants of integration, and , correspond to the initial velocity and initial position of the object.
The Main Event: Linear ODEs
The world of ODEs is vast and wild. Most are impossible to solve with a neat formula. So, we focus on the most important, well-behaved class: Linear ODEs.
Definition: Linear ODE
A linear ODE of order k is an equation that can be written in the form:
- If , the equation is homogeneous.
- Otherwise, it’s inhomogeneous.
Why is this "linear" if can be a complicated function?
This is a crucial point! The term “linear” refers to the relationship with respect to the unknown function and its derivatives. The coefficients and the right-hand side can be any continuous functions of . The equation is linear because appear on their own (not squared, not inside a sine function, not multiplied by each other).
The structure of a linear ODE is a perfect analogy for the matrix equation from linear algebra. This isn’t a coincidence; it’s the deep structure of the problem. The solutions behave just like vectors.
The Main Theorem for Linear ODEs (Our Roadmap)
This theorem is the foundation for everything we will do. It tells us exactly what the set of solutions to a linear ODE looks like.
The Homogeneous Solution Space: The set of all solutions to the homogeneous equation () forms a vector space of dimension k.
What this means: For a -th order ODE, we need to find “basis” solutions () that are linearly independent. Then every single solution to the homogeneous equation can be written as a linear combination: .
The Inhomogeneous General Solution: To solve the full inhomogeneous equation, you only need to find one single solution, which we call a “particular solution” (). The complete set of all solutions is then: This is the heart of the method: General Solution = One Particular Solution + Every Homogeneous Solution.
Uniqueness: An IVP with initial conditions for an order- ODE will nail down the free constants () and give you one unique solution.
Small example from linalg and it’s equivalent here…
Linear Algebra Example With Non-Trivial Null Space
Consider the system:
Homogeneous Solution (Null Space):
The associated homogeneous system is:There is one free variable, so the null space is one-dimensional with basis:
Particular Solution:
One particular solution to the full system is:General Solution:
All solutions to the original system are:Concrete Solution (with Constraint ):
Imposing and fixes and , so the concrete solution is:This shows how the null space (homogeneous solution), particular solution, and a concrete solution conditioned on extra constraints together build the full solution space.
similarly…
Homogeneous, Particular, and Concrete (Initial Value)
Particular solution != IVP
Take the ODE :
Homogeneous Solution (Null Space): The homogeneous equation has general solution for any .
Particular Solution: A particular solution to the full equation is (found by guessing and substituting).
Concrete Solution: The Initial Value Problem (IVP) Suppose we’re given an initial value, e.g., . The solution that matches this is:
Substitute : Therefore, and the concrete solution is:
The initial value “chooses” the one specific curve from the infinite general solutions—all passing through .
Solving First-Order Linear ODEs
Let’s apply this powerful roadmap to the simplest case: .
Our strategy is clear:
- Step 1: Find the general solution to the homogeneous equation .
- Step 2: Find one particular solution to the full equation.
- Final Answer: Combine them: .
Step 1: The Homogeneous Solution
We need to solve . This is a separable equation: Now, we integrate both sides with respect to :
How to integrate the left side?
Remember the chain rule! The derivative of is . So, the integral is simply . (or simply us U-Sub)
Let be any anti-derivative of , so . Our equation becomes: To solve for , we exponentiate both sides: We can absorb the constant term into a single new constant, .
Homogeneous Solution for First-Order ODE
The general solution to is:
Step 2: Finding a Particular Solution
We need just one solution to .
Method 1: The Educated Guess (Method of Undetermined Coefficients)
The philosophy here is that for a linear system, the output’s form often mirrors the input’s form. We guess a solution of a similar type to and see if we can make it work.
Solving
Step 1: Homogeneous Solution Here , so an anti-derivative is . The homogeneous solution is .
Step 2: Particular Solution (Educated Guess) The input is , a first-degree polynomial. Our educated guess is that the particular solution is also a first-degree polynomial: .
Why are and constants? They are "undetermined coefficients." We are proposing a form for the solution, and our task is to determine the specific constant coefficients that will make this form a true solution.
Now, substitute the guess into the ODE: Group terms by powers of : For this polynomial identity to hold for all , the coefficients of each power of must be equal on both sides:
- Coefficients of :
- Constant terms:
We found our coefficients! The particular solution is .
Method 2: Variation of Parameters
This method is more systematic and feels less like guesswork. The brilliant idea is to take the homogeneous solution, , and allow the parameter to vary—that is, we replace the constant with an unknown function .
Solving (with Variation of Parameters)
Step 2: Particular Solution We start with the form of the homogeneous solution, , and propose a particular solution of the form .
Substitute this into the ODE. We’ll need its derivative (using the product rule): .
Now, watch the magic. The terms involving (without a derivative) are guaranteed to cancel out! We are left with a much simpler equation for : To find , we just integrate (this requires integration by parts): We have our function . Now we build our particular solution: We get the exact same result. This method is more robust and will work even when guessing is difficult.
The Grand Finale: The Full Solution
Final Solution for
We combine our findings according to the Main Theorem: . This is the complete family of functions that solve the differential equation.