Differential Equations · § 01

Introduction to Ordinary
Differential Equations

What is an ODE? Why do they matter? Order, degree, linearity, and the difference between a general solution and a particular solution, all explained from scratch.

8Worked Examples
10Quiz Questions
1,600+Words
Share this page

§ 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:

Example A — First Order
dy/dx = 3x²

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).

Example B — Second Order
y'' − 5y' + 6y = 0

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.

Example C — Non-Linear
(y')2 + y = sin(x)

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.

Key distinction Order = which derivative is highest. Degree = the power on that highest derivative. Most equations you will encounter have degree 1. "Degree" and "order" are not the same thing — confusing them is one of the most common early mistakes.
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:

General Linear ODE Form
an(x)y(n) + an−1(x)y(n−1) + ··· + a1(x)y' + a0(x)y = g(x)

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.

Homogeneous (g = 0)
y'' − 3y' + 2y = 0
Non-Homogeneous (g ≠ 0)
y'' − 3y' + 2y = 4eˣ

§ 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:

General Solution
y = x² + C

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:

Applying the Initial Condition y(0) = 3
3 = 0² + C  ⟹  C = 3  ⟹  y = x² + 3

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₀.

Existence and Uniqueness Under reasonable conditions on the ODE (made precise by the Picard-Lindelöf theorem), an IVP has exactly one solution. This is why specifying n initial conditions for an nth-order ODE is both necessary and sufficient — no more, no fewer.

§ 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.

Why ODEs are unavoidable Any time a physical quantity changes in a way that depends on its current state — temperature, position, charge, concentration, population — you get a differential equation. Calculus gives you the tools to write the equation; the study of ODEs gives you the tools to solve it.

§ 068 Fully Worked Examples

Work through each example carefully. Focus on identifying the order, degree, and linearity before jumping to any solution.

Example 1 — Identify Order and Degree

Determine the order and degree of: (y'')³ + 5y' − y = 0

1
Identify the highest-order derivative: y'' (second derivative).Order = 2
2
Find the power on that highest derivative: (y'')³ — the power is 3.Degree = 3
Order: 2   |   Degree: 3   |   Non-linear (degree ≠ 1)
Example 2 — Classify as Linear or Non-Linear

Is the equation y'' + x²y' + exy = ln(x) linear?

1
Check y'': appears to the first power only. ✓
2
Check y': appears to the first power only, multiplied by x² (a function of x, not y). ✓
3
Check y: appears to the first power, multiplied by eˣ (a function of x). ✓
4
Right-hand side: ln(x) — a function of x only. ✓
Linear ODE of order 2, degree 1. (The coefficients x², eˣ, ln(x) are functions of the independent variable x, which is perfectly fine for linearity.)
Example 3 — Verify a Solution

Show that y = 2e3x satisfies the ODE y' − 3y = 0.

1
Compute y':y' = 6e3x
2
Substitute into the left-hand side:y' − 3y = 6e3x − 3(2e3x) = 6e3x − 6e3x = 0
The left-hand side equals 0 = right-hand side. ✓ So y = 2e³ˣ is a solution. (It is actually a particular solution corresponding to C = 2 in the general solution y = Ce³ˣ.)
Example 4 — Find the General Solution by Integration

Solve dy/dx = 4x³ − 2x.

1
Since the right-hand side is purely a function of x, integrate both sides with respect to x:y = ∫(4x³ − 2x) dx
2
Integrate term by term:y = x⁴ − x² + C
General solution: y = x⁴ − x² + C. The single arbitrary constant C reflects that this is a first-order ODE (one integration needed).
Example 5 — Apply an Initial Condition

Given the IVP dy/dx = 4x³ − 2x,   y(1) = 5, find the particular solution.

1
From Example 4, the general solution is y = x⁴ − x² + C.
2
Apply y(1) = 5: substitute x = 1, y = 5:5 = (1)⁴ − (1)² + C = 1 − 1 + C = C
3
Therefore C = 5.
Particular solution: y = x⁴ − x² + 5.
Example 6 — Exponential Growth Model

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.

1
Growth rate is proportional to population: dP/dt = kP. This is a first-order linear homogeneous ODE.
2
The general solution (which we verify by differentiation) is P(t) = Cekt.
3
Apply P(0) = 500: 500 = Ce⁰ = C. So C = 500.
4
Use P(3) = 1000 to find k: 1000 = 500e³ᵏ → e³ᵏ = 2 → 3k = ln(2) → k = ln(2)/3 ≈ 0.231.
ODE: dP/dt = (ln 2 / 3)P   |   Particular solution: P(t) = 500 · 2t/3
Example 7 — Identify All Features

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.

1
Highest derivative: d³y/dx³ (third derivative). Order = 3.
2
Power on d³y/dx³: it appears to the first power. Degree = 1.
3
All terms in y and its derivatives are degree 1; coefficients are functions of x. Linear.
4
Right-hand side is cos(x) ≠ 0. Non-homogeneous. Forcing function g(x) = cos(x).
Order 3, Degree 1, Linear, Non-homogeneous. Forcing function: cos(x).
Example 8 — Second-Order IVP (Verify the Solution)

Verify that y = 3cos(2x) + sin(2x) satisfies the IVP: y'' + 4y = 0,   y(0) = 3,   y'(0) = 2.

1
Compute y': y' = −6sin(2x) + 2cos(2x).
2
Compute y'': y'' = −12cos(2x) − 4sin(2x).
3
Check the ODE: y'' + 4y = [−12cos(2x) − 4sin(2x)] + 4[3cos(2x) + sin(2x)] = −12cos + 12cos − 4sin + 4sin = 0. ✓
4
Check y(0): y(0) = 3cos(0) + sin(0) = 3 + 0 = 3. ✓
5
Check y'(0): y'(0) = −6sin(0) + 2cos(0) = 0 + 2 = 2. ✓
All three conditions satisfied. y = 3cos(2x) + sin(2x) is the unique solution to this IVP.

§ 07Common Mistakes

Mistake 1: Confusing order and degree In (y'')³ + y = 0, students often say "order 3". The order is 2 (the highest derivative is y'', which is second order). The 3 is the power — that is the degree.
Mistake 2: Thinking linear means "straight line" A linear ODE does not produce a straight-line solution. "Linear" refers to the structure of the equation — the unknown function and its derivatives must each appear to the first power. The solutions can be curves, oscillations, or exponentials.
Mistake 3: Forgetting the arbitrary constant When integrating to find a general solution, the constant C must always be included. Omitting it gives a particular solution, not the general one — and without C, you cannot fit initial conditions.
Mistake 4: Applying too few initial conditions An nth-order ODE needs exactly n initial conditions to determine a unique particular solution. For a second-order ODE you need both y(x₀) and y'(x₀) — just y(x₀) on its own is not enough.
Mistake 5: Calling a non-homogeneous ODE "homogeneous" The word "homogeneous" has a specific meaning: g(x) = 0 on the right-hand side. Do not confuse this with "homogeneous functions" from multivariable calculus, which is a completely different concept.

§ 0810-Question Quiz

Test your understanding. Select an answer for each question to see immediate feedback.

Score: 0 / 0
Question 1

What is the order of the ODE y''' − 4y'' + y = 0?

Question 2

What is the degree of the ODE (y'')⁴ + 3y' = sin(x)?

Question 3

Which of the following is a linear ODE?

Question 4

The general solution of a second-order ODE contains how many arbitrary constants?

Question 5

Is the ODE y'' + x·y' − y = ex homogeneous?

Question 6

How many initial conditions are needed to uniquely determine the solution of a third-order IVP?

Question 7

Which physical law leads directly to the ODE dT/dt = −k(T − T)?

Question 8 — Fill In

The general solution of dy/dx = 6x is y = x² + C. Enter the coefficient.

Question 9

Which feature makes y·y'' + y' = x a non-linear ODE?

Question 10

A radioactive substance decays according to dN/dt = −λN. Given N(0) = N₀, which expression represents the particular solution?

out of 10


Cookie Settings