A differential equation is simply an equation that contains a function and one or more of its derivatives. They are the language science uses to describe change: how populations grow, how hot tea cools, how springs vibrate and how current flows in a circuit. This guide gives you the vocabulary and the first skills you need before learning any solution methods.
What Is a Differential Equation?
In ordinary algebra, the unknown is a number. In a differential equation, the unknown is a function. For example,
$$ \frac{dy}{dx} = 2y $$
asks: which function \( y(x) \) has a derivative equal to twice itself? Solving the equation means finding that function.
Here are some famous examples:
- Exponential growth: \( \frac{dP}{dt} = kP \), where a population grows at a rate proportional to its size.
- Newton's law of cooling: \( \frac{dT}{dt} = -k(T - T_s) \), where an object cools towards the surrounding temperature \( T_s \).
- Simple harmonic motion: \( \frac{d^2x}{dt^2} + \omega^2 x = 0 \), which describes a mass on a spring.
How to Classify Differential Equations
Classifying an equation tells you which methods will work, so it is always the first step.
Ordinary vs Partial
- An ordinary differential equation (ODE) has one independent variable, such as \( y'' + y = 0 \).
- A partial differential equation (PDE) has two or more independent variables and partial derivatives, such as the heat equation \( \frac{\partial u}{\partial t} = k\frac{\partial^2 u}{\partial x^2} \).
Order
The order is the highest derivative that appears. \( y' = 3x \) is first order; \( y'' - 4y' + y = 0 \) is second order.
Linear vs Nonlinear
An ODE is linear if the unknown \( y \) and all its derivatives appear only to the first power, are not multiplied together, and are not inside functions like \( \sin y \) or \( e^y \). The coefficients may depend on \( x \).
The general linear second-order equation looks like
$$ a(x)y'' + b(x)y' + c(x)y = g(x). $$
Worked Example 1: Classifying Equations
Classify each equation by order and linearity.
- \( y''' + xy' = \sin x \)
- \( (y')^2 + y = 0 \)
- \( y'' + \sin y = 0 \)
Solution.
- The highest derivative is \( y''' \), so it is third order. Each of \( y''' \) and \( y' \) appears to the first power with a coefficient depending only on \( x \). The \( \sin x \) term involves only \( x \). It is linear.
- The highest derivative is \( y' \), so it is first order. But \( y' \) is squared, so it is nonlinear.
- The highest derivative is \( y'' \), so it is second order. The term \( \sin y \) makes it nonlinear. (This is the exact pendulum equation.)
General and Particular Solutions
Solving a first-order ODE usually produces one arbitrary constant; a second-order ODE produces two. A solution containing these constants is the general solution, a whole family of curves.
To pick out one curve, we need extra information called initial conditions, such as \( y(0) = 3 \). An ODE together with initial conditions is an initial value problem (IVP), and its answer is a particular solution.
Worked Example 2: Verifying a First-Order Solution
Show that \( y = Ce^{2x} \) is the general solution of \( y' = 2y \), and find the particular solution with \( y(0) = 3 \).
Step 1: Differentiate the proposed solution.
$$ y' = 2Ce^{2x}. $$
Step 2: Substitute into the equation.
$$ \text{LHS} = 2Ce^{2x}, \qquad \text{RHS} = 2y = 2Ce^{2x}. $$
Both sides are equal for every \( x \) and every constant \( C \), so the family is a solution.
Step 3: Apply the initial condition.
$$ y(0) = Ce^{0} = C = 3. $$
So the particular solution is \( y = 3e^{2x} \).
Worked Example 3: Verifying a Second-Order Solution
Verify that \( y = c_1\cos 2x + c_2\sin 2x \) solves \( y'' + 4y = 0 \), then find the solution with \( y(0) = 1 \) and \( y'(0) = 4 \).
Step 1: Find the derivatives.
$$ y' = -2c_1\sin 2x + 2c_2\cos 2x, $$
$$ y'' = -4c_1\cos 2x - 4c_2\sin 2x. $$
Step 2: Substitute.
$$ y'' + 4y = (-4c_1\cos 2x - 4c_2\sin 2x) + 4(c_1\cos 2x + c_2\sin 2x) = 0. $$
The equation is satisfied.
Step 3: Use the initial conditions.
$$ y(0) = c_1(1) + c_2(0) = c_1 = 1, $$
$$ y'(0) = -2c_1(0) + 2c_2(1) = 2c_2 = 4 \quad\Longrightarrow\quad c_2 = 2. $$
So the particular solution is \( y = \cos 2x + 2\sin 2x \). Notice that a second-order equation needed two conditions to fix two constants.
Common Mistakes
- Confusing order with degree. \( (y')^3 = x \) is first order, even though \( y' \) is cubed.
- Calling an equation nonlinear because of \( x \). Terms like \( x^2 y' \) or \( e^x y \) are still linear in \( y \).
- Applying initial conditions too early. Find the general solution first, then substitute the conditions.
- Forgetting to check. Substituting your answer back into the equation is the quickest way to catch errors.
What Comes Next
Once you can classify equations, you can learn the main solution techniques: separation of variables, integrating factors for first-order linear equations, the characteristic equation for constant-coefficient equations, and the Laplace transform. Each method matches a particular type of equation, which is why classification matters so much.
Key Takeaways
- A differential equation relates an unknown function to its derivatives.
- Classify every equation by type (ODE or PDE), order and linearity before solving it.
- The general solution contains arbitrary constants; initial conditions turn it into a particular solution.
- An \( n \)th-order equation usually needs \( n \) conditions.
- Verify solutions by substituting them back into the equation.
If you need help with a differential equations assignment or want step-by-step solutions, reach out to Amathify on WhatsApp or through the "Ask a Question" form, where our experts and PhD scholars are ready to help.
Stuck on a problem or assignment?
Our experts and PhD scholars solve maths, physics and chemistry — step by step.