Finite Difference Method for ODEs
Introduction to Differential Equations
Equations of Change
Many things in the universe are in a constant state of flux. A population of bacteria grows, a hot cup of coffee cools, and a planet orbits a star. Differential equations are the mathematical language we use to describe this change.
At its core, a differential equation relates a function to its derivatives. Think of it this way: instead of an equation telling you the value of something, it tells you the rate at which it's changing. For instance, it might not tell you how many bacteria there are, but it could describe how quickly the population is growing at any given moment.
A differential equation is an equation that contains an unknown function and one or more of its derivatives.
Solving one means finding the specific function that fits the description of its change. It's like being given clues about a car's speed and acceleration and using them to figure out its exact path.
Classifying the Clues
Not all change is the same, so we classify differential equations to better understand what they're telling us. There are a few key ways to sort them.
Ordinary Differential Equation
adjective
An equation involving derivatives of a function with respect to only one independent variable.
An Ordinary Differential Equation (ODE) describes how something changes with respect to a single variable, usually time. For example, the rate of radioactive decay depends only on time. Here's a simple ODE describing population growth, where is the population and is time:
A Partial Differential Equation (PDE) is used when a function depends on more than one independent variable. Imagine heat spreading across a metal plate. The temperature at any point depends on its position (x and y coordinates) and on time (t). A PDE can describe this complex process.
Another way to classify these equations is by their order. The order is simply the highest derivative that appears in the equation. The population growth equation above is first-order because it only involves the first derivative. Newton's Second Law of Motion () is a classic second-order ODE, because acceleration is the second derivative of position:
Finally, we can classify them as linear or nonlinear. A linear differential equation is one where the unknown function and its derivatives are all raised to the first power and are not multiplied together. This property makes them much simpler to solve. Most introductory courses focus on linear equations.
A differential equation is linear if the equation is of the first degree in and its derivatives, and if the coefficients are functions of the independent variable.
Finding the Solution
Solving a differential equation isn't like solving a typical algebraic equation for a number. The solution is a function, or even a whole family of functions.
A general solution includes arbitrary constants. For the first-order ODE , the solution is . The constant means there are infinitely many parabolas whose slope is described by . The general solution represents this entire family of curves.
A particular solution is one specific function from that family. To find it, we need more information. This extra information comes in the form of initial or boundary conditions.
An Initial Value Problem (IVP) provides the state of the system at one single point. For our example, if we're told that , we can plug that in to find .
, which means .
The particular solution is . This is like knowing the starting position and velocity of a rocket to predict its entire flight path.
A Boundary Value Problem (BVP) provides conditions at different points, or boundaries. For example, if you have a guitar string held down at both ends, you know its position is zero at and at its full length, . These two boundary conditions, and , help you find the particular shape of the vibrating string.
Now you're ready to put these concepts to the test.
What is the core concept that a differential equation describes?
A physicist is modeling the vibration of a guitar string. They know the string is fixed at both ends (at x=0 and x=L), meaning its displacement is zero at these two points. What kind of problem is this?
Understanding the language of change is the first step. With these fundamentals, you can begin to model and solve complex problems in science, engineering, and beyond.
