No history yet

Introduction to ODEs

Equations of Change

Many things in the world change over time: the temperature of a cooling cup of coffee, the speed of a falling object, the size of a population. Differential equations are the mathematical language we use to describe this change.

A differential equation is simply an equation that relates a function to its derivatives. If you know how fast something is changing (its derivative), you can use a differential equation to figure out what the original quantity is.

For example, the rate of population growth is often proportional to the current population size. If P(t)P(t) is the population at time tt, we can write this relationship as a differential equation.

dPdt=kP\frac{dP}{dt} = kP

This equation says the rate of change of the population with respect to time, dPdt\frac{dP}{dt}, is equal to the population PP multiplied by a constant kk.

We're focusing on ordinary differential equations (ODEs). This just means the function we're interested in depends on only one independent variable, like time in the population example. This is different from partial differential equations (PDEs), where functions can depend on multiple variables, like space and time.

Order and Linearity

To solve an ODE, we first need to classify it. Two of the most important classifications are its order and whether it's linear. These properties help dictate which solution method to use.

Order

noun

The order of an ODE is the highest-order derivative that appears in the equation.

Next, we look at linearity. An ODE is linear if the dependent variable (let's call it yy) and all its derivatives (y,y,y', y'', \dots) appear by themselves, raised only to the first power. They can be multiplied by constants or functions of the independent variable (like xx), but not by themselves or each other. Functions like sin(y)\sin(y) or eye^y make an equation non-linear.

EquationTypeReason
y+2y=exy' + 2y = e^xLinearBoth yy' and yy are raised to the first power.
y+4y=0y'' + 4y = 0LinearBoth yy'' and yy are raised to the first power.
y+y2=xy' + y^2 = xNon-linearThe term y2y^2 makes the equation non-linear.
y+sin(y)=0y'' + \sin(y) = 0Non-linearThe function sin(y)\sin(y) makes the equation non-linear.

Solving an ODE

A solution to an ODE is a function that, when substituted into the equation, makes it true. For example, a solution to the simple ODE y=yy' = y is the function y(x)=Cexy(x) = Ce^x, where CC is any constant. Why? Because the derivative of CexCe^x is just CexCe^x.

That constant CC is important. It means there isn't just one solution, but a whole family of them. To pin down a specific solution, we need more information. This usually comes in the form of an initial value or a boundary value.

An Initial Value Problem (IVP) gives us the value of the function at a specific point, like y(0)=2y(0) = 2. This starting condition allows us to solve for the constant CC and find a unique solution.

For the equation y=yy' = y with the initial condition y(0)=2y(0) = 2, we can plug these values into our general solution y(x)=Cexy(x) = Ce^x. We get 2=Ce02 = Ce^0, which simplifies to 2=C2 = C. The unique solution is y(x)=2exy(x) = 2e^x.

A Boundary Value Problem (BVP) is similar, but it specifies conditions at different points, often the endpoints (or boundaries) of an interval. These are common in higher-order equations. For example, we might be given y(0)=0y(0)=0 and y(1)=5y(1)=5 for a second-order ODE.

Lesson image

For first-order ODEs, one of the most common solution methods is Separation of Variables. This technique works when you can algebraically rearrange the equation to get all the terms involving the dependent variable yy on one side and all the terms involving the independent variable xx on the other.

Let's solve dydx=xy2\frac{dy}{dx} = xy^2. First, we separate the variables.

1y2dy=xdx\frac{1}{y^2} dy = x \, dx

Now, we integrate both sides of the equation.

1y2dy=xdx\int \frac{1}{y^2} \, dy = \int x \, dx

Performing the integration gives us our solution.

1y=12x2+C-\frac{1}{y} = \frac{1}{2}x^2 + C

We can then solve for yy to get an explicit function of xx. This is just one of several methods for first-order ODEs. Other types, like linear first-order equations, require different approaches, such as using an integrating factor.

Higher-order ODEs, like those with second derivatives (yy''), often describe physical systems like springs and circuits. Solving them can be more complex and may involve finding multiple independent solutions that are combined to form a general solution.

Quiz Questions 1/7

What is the primary purpose of a differential equation?

Quiz Questions 2/7

An equation that involves a function dependent on multiple independent variables (like time and position) and its derivatives is called a Partial Differential Equation (PDE).