§ 01What Is a Differential Equation?
A differential equation is any equation that contains an unknown function together with one or more of its derivatives. Rather than asking "what number satisfies this equation?", we ask "what function satisfies this equation?"
In a standard algebraic equation (say, 2x + 5 = 11) we solve for a number. Differential equations are a step up: we solve for an entire function. The equation tells us something about how the function changes, and our job is to work backwards to find the function itself.
Here are three examples of increasing complexity to make the idea concrete:
This is essentially asking: "What function y has a derivative of 3x²?" You already know how to answer this from integration: y = x³ + C. That is a differential equation with an infinitely many solutions (one for each value of the constant C).
Now the equation involves both y, its first derivative y', and its second derivative y''. Finding the function y is no longer a simple integral, it requires a systematic method.
Here the derivative is squared, making this a non-linear ODE. Non-linear equations are generally much harder (often impossible) to solve exactly.
All three examples involve only one independent variable (x). Equations of this type (where all derivatives are taken with respect to a single variable) are called ordinary differential equations, or ODEs. When a function depends on multiple independent variables and the equation involves partial derivatives, we get a partial differential equation (PDE), which is a different course entirely.
§ 02Order and Degree
Two numbers classify every ODE at a glance: its order and its degree. Get these right before attempting any solution method.
Order — Which Derivative Is Highest?
The order of an ODE is the order of the highest derivative appearing in the equation. It tells you, roughly speaking, how many times you will need to integrate (or apply some equivalent process) to find the solution.
| Equation | Highest Derivative | Order |
|---|---|---|
| dy/dx = cos(x) | y' (first) | 1 |
| y'' + 4y = 0 | y'' (second) | 2 |
| y''' − 2y'' + y = eˣ | y''' (third) | 3 |
| d⁴y/dx⁴ = 0 | y'''' (fourth) | 4 |
The vast majority of ODEs you will meet at undergraduate level are first or second order. First-order ODEs appear constantly in modelling; second-order ODEs arise naturally in mechanics (Newton's second law F = ma involves acceleration, which is a second derivative of position).
Degree — What Power Is the Leading Derivative Raised To?
The degree is the power to which the highest-order derivative is raised, provided the equation can be written as a polynomial in the derivatives. If the equation cannot be written as a polynomial (for instance if y' appears inside a sine, or under a square root), then the degree is undefined.
| Equation | Order | Degree |
|---|---|---|
| (y')² + y = 0 | 1 | 2 |
| y'' + 3y' − y = 0 | 2 | 1 |
| (y'')³ + y = x | 2 | 3 |
| y'' = √(1 + (y')²) | 2 | Undefined (not a polynomial in derivatives after squaring: degree 2 if rearranged) |
§ 03Linear vs. Non-Linear ODEs
This is the most important classification because it determines which solution methods are available to you.
An ODE is linear if the unknown function y and all its derivatives appear only to the first power, are not multiplied together, and do not appear inside any non-linear function (like sin, ln, or as an exponent).
A general nth-order linear ODE has the form:
Notice: the coefficients aₙ(x), aₙ₋₁(x), … can be any functions of x: they do not have to be constants. What matters is that they multiply y and its derivatives, not that they are simple numbers. The function g(x) on the right is called the forcing function or non-homogeneous term.
| Equation | Linear? | Reason |
|---|---|---|
| y' + 5y = x² | ✓ Linear | y and y' appear to the first power only |
| y'' + x·y' − 3y = sin(x) | ✓ Linear | Coefficients are functions of x, but y terms are degree 1 |
| y·y' = x | ✗ Non-linear | y and y' are multiplied together |
| (y')² + y = 0 | ✗ Non-linear | y' is squared |
| y'' + sin(y) = 0 | ✗ Non-linear | y appears inside sin( ) |
| y' = ey | ✗ Non-linear | y appears as an exponent |
Linear ODEs have a rich theory and many reliable solution methods. Non-linear ODEs are generally much harder; exact solutions often do not exist and we must resort to numerical approximation or qualitative analysis.
Homogeneous vs. Non-Homogeneous Linear ODEs
Within linear ODEs, there is one further split. If g(x) = 0 (the right-hand side is zero), the equation is called homogeneous. If g(x) ≠ 0, it is non-homogeneous. This matters because the solution strategy changes: for non-homogeneous equations we must find both a homogeneous solution and a particular solution, then add them together.
§ 04General Solutions and Particular Solutions
Every time we integrate, we introduce an arbitrary constant. ODEs of order n produce n arbitrary constants: and that freedom is exactly what makes differential equations rich and powerful.
General Solution
The general solution of an nth-order ODE contains n arbitrary constants (often labelled C₁, C₂, …, Cₙ). It represents an entire family of functions, each of which satisfies the ODE.
For example, the general solution of dy/dx = 2x is:
This is infinitely many parabolas, one shifted vertically for each value of C. Every single one of them satisfies the ODE.
Particular Solution
A particular solution is obtained from the general solution by assigning specific values to the arbitrary constants, typically by applying initial conditions or boundary conditions. Once the constants are fixed, the solution is uniquely determined.
If we add the initial condition y(0) = 3 to the example above, we substitute x = 0, y = 3 into y = x² + C:
This single parabola is the particular solution satisfying the given initial condition.
Initial Value Problems (IVPs)
An initial value problem (IVP) pairs an ODE with enough initial conditions to determine all arbitrary constants. For an nth-order ODE, we need n initial conditions, typically the values of y, y', y'', … at a single point x = x₀.
§ 05Real-World Applications
Differential equations are the language of science and engineering. Almost every physical law involving rates of change is a differential equation.
Exponential Growth and Decay
If a quantity y grows at a rate proportional to its current size, then dy/dt = ky for some constant k. Population growth, radioactive decay, compound interest, and bacterial cultures all follow this law. The solution is y = y₀eᵏᵗ, where y₀ is the initial value. If k > 0, the quantity grows; if k < 0, it decays.
Newton's Law of Cooling
The rate at which an object cools is proportional to the difference between its temperature T and the surrounding ambient temperature T_∞. This gives the ODE dT/dt = −k(T − T_∞). The solution T(t) = T_∞ + (T₀ − T_∞)e^(−kt) shows exponential approach to the ambient temperature.
Simple Harmonic Motion
A mass on a spring satisfies F = ma = m·x'', and Hooke's law gives F = −kx, so the ODE is mx'' + kx = 0, or x'' + ω²x = 0 where ω² = k/m. The general solution is x(t) = A cos(ωt) + B sin(ωt), describing oscillation. This same equation models pendulums (for small angles), LC electrical circuits, and quantum mechanical wavefunctions.
RL and RC Electrical Circuits
A series RL circuit with resistance R, inductance L, and applied voltage V(t) obeys L·dI/dt + R·I = V(t). This is a first-order linear ODE. Similarly an RC circuit gives R·dQ/dt + Q/C = V(t). Solving these tells engineers exactly how the current or charge builds up over time.
§ 068 Fully Worked Examples
Work through each example carefully. Focus on identifying the order, degree, and linearity before jumping to any solution.
Determine the order and degree of: (y'')³ + 5y' − y = 0
Is the equation y'' + x²y' + exy = ln(x) linear?
Show that y = 2e3x satisfies the ODE y' − 3y = 0.
Solve dy/dx = 4x³ − 2x.
Given the IVP dy/dx = 4x³ − 2x, y(1) = 5, find the particular solution.
A bacterial culture doubles every 3 hours. If there are 500 bacteria at t = 0, write and identify the ODE governing the population, and state its general solution.
For the equation (d³y/dx³) + x·(dy/dx) − y = cos(x), state the order, degree, whether it is linear, whether it is homogeneous, and what the forcing function is.
Verify that y = 3cos(2x) + sin(2x) satisfies the IVP: y'' + 4y = 0, y(0) = 3, y'(0) = 2.
§ 07Common Mistakes
§ 0810-Question Quiz
Test your understanding. Select an answer for each question to see immediate feedback.
What is the order of the ODE y''' − 4y'' + y = 0?
What is the degree of the ODE (y'')⁴ + 3y' = sin(x)?
Which of the following is a linear ODE?
The general solution of a second-order ODE contains how many arbitrary constants?
Is the ODE y'' + x·y' − y = ex homogeneous?
How many initial conditions are needed to uniquely determine the solution of a third-order IVP?
Which physical law leads directly to the ODE dT/dt = −k(T − T∞)?
The general solution of dy/dx = 6x is y = x² + C. Enter the coefficient.
Which feature makes y·y'' + y' = x a non-linear ODE?
A radioactive substance decays according to dN/dt = −λN. Given N(0) = N₀, which expression represents the particular solution?
out of 10
Next Steps in Differential Equations
Now that you understand what an ODE is, you are ready to start solving them. Work through these topics in order: