DIFFERENTIAL EQUATIONS • FIRST-ORDER DIFFERENTIAL EQUATIONS

Linear ODEs with Initial Conditions — Solving Linear First-Order ODEs with Initial Conditions

Learn to find the one specific solution that satisfies both a differential equation and a given starting value.

Historical Context & Motivation

Imagine you know that a car is accelerating at a specific rate, but you also know exactly where the car started. With both pieces of information, you can predict the car's exact position at any future time. This is precisely the idea behind solving a differential equation with an initial condition. The equation tells you how something changes, and the initial condition pins down where the story begins.

For centuries, mathematicians and scientists have been fascinated by equations that describe rates of change. From tracking the motion of planets to modeling how populations grow or how substances decay, ordinary differential equations (ODEs) have served as the backbone of scientific prediction. The development of techniques for solving these equations — especially first-order linear ones — unfolded gradually across the 17th, 18th, and 19th centuries.

1676
Leibniz and Newton Lay the Foundations
Gottfried Wilhelm Leibniz and Isaac Newton independently developed calculus, introducing the concept of derivatives and integrals that made differential equations possible.
1694
Leibniz Solves Linear First-Order ODEs
Leibniz published a method for solving linear first-order differential equations, recognizing the special structure that makes them solvable by a systematic technique.
1739
Euler Develops the Integrating Factor
Leonhard Euler formalized the integrating factor method, turning the solution of linear first-order ODEs into a routine, step-by-step procedure that students still learn today.
1800s
Initial Value Problems in Physics
Scientists began routinely pairing differential equations with initial conditions to model real-world phenomena like heat conduction, electrical circuits, and radioactive decay.

The key question that this lesson addresses is: when you solve a differential equation, you typically get a family of solutions containing an arbitrary constant. How do you determine the one specific solution that matches a particular real-world scenario? The answer lies in applying an initial condition — a known value of the function at a specific point.

Core Principles & Definitions

Before diving into the solving technique, let's establish the key ideas and vocabulary you need. A first-order linear ODE is a differential equation involving the first derivative of an unknown function y(x), where both y and dy/dx appear to the first power — no squares, no products of y with dy/dx, and no other nonlinear operations. When paired with an initial condition, the problem is called an initial value problem (IVP).

1

Standard Form

A first-order linear ODE is written as dy/dx + P(x)·y = Q(x), where P(x) and Q(x) are functions of x (or constants). Getting your equation into this form is always the first step.
2

General Solution

The general solution contains an arbitrary constant C. It represents an infinite family of curves, all of which satisfy the differential equation but start from different values.
3

Initial Condition

An initial condition takes the form y(x₀) = y₀, specifying the exact value of y at a particular x. This pins down the constant C and gives you one specific solution curve.
4

Integrating Factor

The integrating factor μ(x) = e^(∫P(x)dx) is a cleverly chosen function that, when multiplied through the equation, turns the left side into an exact derivative. This makes integration straightforward.
5

Particular Solution

After applying the initial condition to determine C, you obtain the particular solution — the unique function that satisfies both the ODE and the starting value.
KEY TAKEAWAY
Think of a differential equation like a set of driving directions that say "always turn left when you reach an intersection." Many routes follow that rule, depending on where you start. The initial condition is like telling someone the exact address where the trip begins — now there's only one possible route.

Visualizing the Family of Solutions

To build intuition, consider the differential equation dy/dx + y = 2. Its general solution is y = 2 + Ce−x. Different values of C produce different curves that all satisfy the ODE. The diagram below shows several of these curves. Notice how they all share the same long-term behavior — approaching y = 2 — but they start at different heights depending on C.

Each curve represents a solution to dy/dx + y = 2 for a different value of C. The cyan dot marks the initial condition y(0) = 3 (C = 1), while the pink dot marks y(0) = 1 (C = −1). All curves converge to the equilibrium line y = 2.

In the diagram above, each colored curve is one member of the solution family. Without an initial condition, you cannot tell which curve describes your system. The moment you specify a starting value — such as y(0) = 3 — you pick out exactly one curve from the entire family. That is the power of the initial value problem: it transforms an infinite family into a single, definite answer.

Mathematical Framework — The Integrating Factor Method

The standard technique for solving a first-order linear ODE is the integrating factor method. Here is the complete framework, broken into the equations you need to know.

STANDARD FORM
dy/dx + P(x) · y = Q(x)
P(x) is the coefficient of y, and Q(x) is the right-hand side. The coefficient of dy/dx must be 1 — if it isn't, divide the entire equation by whatever multiplies dy/dx.
INTEGRATING FACTOR
μ(x) = e^(∫P(x) dx)
μ(x) is a special multiplier that transforms the left side of the equation into the derivative of a product. You do not need a constant of integration here — any antiderivative of P(x) works.
KEY IDENTITY
d/dx [μ(x) · y] = μ(x) · Q(x)
After multiplying both sides of the ODE by μ(x), the left side collapses into the derivative of the product μ(x) · y. This is what makes the method work — now you can integrate both sides directly.
GENERAL SOLUTION
y = (1/μ(x)) · [∫ μ(x) · Q(x) dx + C]
C is the arbitrary constant that gets determined by the initial condition. This formula gives every possible solution to the ODE.
🗺️ The Roadmap
The complete procedure is: (1) Rewrite in standard form, (2) Identify P(x), (3) Compute μ(x) = e^(∫P(x) dx), (4) Multiply both sides by μ(x) and integrate, (5) Solve for y to get the general solution, (6) Apply the initial condition to find C.

The Solving Process — Step by Step

The flowchart below maps out each decision point in the solving process. Follow the arrows from top to bottom — each box represents one action you take, and the final box is your answer.

This flowchart shows the six steps of the integrating factor method, from rewriting the ODE in standard form (top) to obtaining the particular solution (bottom). Each colored border indicates a distinct phase of the procedure.

The most common mistake students make is forgetting to put the equation into standard form before identifying P(x). For example, if you're given 2·(dy/dx) + 6y = 10, you must first divide everything by 2 to get dy/dx + 3y = 5. Only then is P(x) = 3. Another common pitfall is including a "+ C" in the integrating factor exponent — you don't need it there because any single antiderivative works.

Worked Example

Let's solve a complete initial value problem step by step. We will work through every detail so you can see the method in action.

Solve dy/dx − 2y = 4, with y(0) = 1
1
Step 1 — Write in Standard FormThe equation is already in the form dy/dx + P(x)·y = Q(x). Comparing: dy/dx + (−2)·y = 4, so P(x) = −2 and Q(x) = 4.
P(x) = −2, Q(x) = 4
2
Step 2 — Compute the Integrating FactorThe integrating factor is μ(x) = e^(∫P(x) dx) = e^(∫(−2) dx) = e^(−2x). We don't include a constant of integration here.
μ(x) = e^(−2x)
3
Step 3 — Multiply Both Sides by μ(x)Multiply through: e^(−2x) · dy/dx − 2e^(−2x) · y = 4e^(−2x). The left side is the derivative of the product: d/dx[e^(−2x) · y] = 4e^(−2x). You can verify this by applying the product rule to e^(−2x) · y.
d/dx[e^(−2x) · y] = 4e^(−2x)
4
Step 4 — Integrate Both SidesIntegrating: e^(−2x) · y = ∫4e^(−2x) dx = 4 · (−1/2) · e^(−2x) + C = −2e^(−2x) + C. Remember to include the constant C on this step.
e^(−2x) · y = −2e^(−2x) + C
5
Step 5 — Solve for yDivide both sides by e^(−2x), which is the same as multiplying by e^(2x): y = −2 + Ce^(2x). This is the general solution.
General solution: y = −2 + Ce^(2x)
6
Step 6 — Apply the Initial Condition y(0) = 1Substitute x = 0 and y = 1: 1 = −2 + C·e^(0) = −2 + C. Solving: C = 3. Therefore the particular solution is y = −2 + 3e^(2x).
Particular solution: y = −2 + 3e^(2x)
7
VerificationCheck the ODE: dy/dx = 6e^(2x), and −2y = −2(−2 + 3e^(2x)) = 4 − 6e^(2x). So dy/dx − 2y = 6e^(2x) + 4 − 6e^(2x) = 4 ✓. Check the IC: y(0) = −2 + 3(1) = 1 ✓.
Both checks pass — the solution is correct.

Strengths, Limitations, and Common Pitfalls

The integrating factor method is powerful, but like any technique, it has its sweet spots and its boundaries. The table below summarizes the key strengths and limitations you should keep in mind.

Strengths and limitations of the integrating factor method
AspectStrengthsLimitations
ApplicabilityWorks for every first-order linear ODE, regardless of what P(x) and Q(x) are.Does not work for nonlinear equations (e.g., dy/dx = y², or terms like y·(dy/dx)).
Systematic natureFollows a clear, repeatable algorithm — no guessing or creative tricks required.The integrals ∫P(x) dx and ∫μQ dx may be difficult or impossible to evaluate in closed form.
UniquenessWhen combined with an initial condition, the method always produces exactly one particular solution.If the initial condition is outside the interval where P(x) and Q(x) are continuous, uniqueness may fail.
SetupOnly basic calculus operations are needed: differentiation and integration.Forgetting to rewrite in standard form (coefficient of dy/dx equal to 1) is a very common error.
KEY TAKEAWAY
The integrating factor method is like a universal key that opens every first-order linear ODE lock. However, the lock may still be stiff — meaning the integrals can be hard. The method guarantees a way forward, even if the arithmetic gets messy. When things look complicated, double-check that you have the correct standard form — most errors trace back to that first step.

Connection to Higher-Order and Advanced Topics

The ideas you've learned here — standard form, integrating factors, and initial conditions — serve as the foundation for virtually everything that comes next in differential equations. Understanding first-order linear IVPs prepares you for higher-order equations, systems, and even partial differential equations.

Comparison of first-order and second-order linear IVPs
FeatureFirst-Order Linear IVPSecond-Order Linear IVP
Equation formdy/dx + P(x)y = Q(x)d²y/dx² + P(x)dy/dx + R(x)y = Q(x)
Number of ICs needed1 condition: y(x₀) = y₀2 conditions: y(x₀) = y₀ and y'(x₀) = y₁
Constants in general solution1 arbitrary constant (C)2 arbitrary constants (C₁, C₂)
Solving methodIntegrating factorCharacteristic equation, variation of parameters, or undetermined coefficients
Key applicationExponential growth/decay, mixing problems, simple circuitsSprings, oscillations, RLC circuits

Notice the pattern: the order of the equation equals the number of initial conditions you need and the number of arbitrary constants in the general solution. A third-order equation would require three ICs, and so on. The principle of matching initial conditions to constants is a thread that runs through all of differential equations. Mastering the first-order case gives you a template for tackling everything that follows.

Practice Problems

PROBLEM 1CONCEPTUAL
A first-order linear ODE has a general solution containing one arbitrary constant C. Explain in your own words why exactly one initial condition is needed to determine a unique (particular) solution, and describe what would happen if you had zero initial conditions or two initial conditions.
PROBLEM 2BASIC CALCULATION
Solve the initial value problem: dy/dx + 3y = 6, with y(0) = 0.
PROBLEM 3INTERMEDIATE
Solve the initial value problem: dy/dx + (2/x)·y = x, with y(1) = 3, for x > 0.
PROBLEM 4APPLIED
A tank initially contains 50 liters of pure water. A brine solution with a salt concentration of 3 grams per liter flows in at 2 liters per minute, and the well-mixed solution drains out at 2 liters per minute. Let S(t) be the amount of salt (in grams) in the tank at time t. Set up and solve the initial value problem, then find how much salt is in the tank after 10 minutes.
PROBLEM 5CRITICAL THINKING
Consider the general IVP: dy/dx + ay = b, with y(0) = y₀, where a and b are positive constants. (a) Find the particular solution in terms of a, b, and y₀. (b) Determine the long-term behavior as x → ∞. (c) Explain why the solution always approaches the same value regardless of the initial condition y₀, and describe what this value represents in the context of the ODE.

Lesson Summary

A first-order linear ODE has the standard form dy/dx + P(x)·y = Q(x). To solve it, you compute the integrating factor μ(x) = e^(∫P(x) dx), multiply both sides of the ODE by μ(x), recognize that the left side becomes d/dx[μ·y], and integrate. This yields the general solution containing one arbitrary constant C.

An initial condition of the form y(x₀) = y₀ transforms the problem into an initial value problem (IVP). By substituting the initial condition into the general solution, you determine the unique value of C and obtain the particular solution — the one specific curve from the solution family that passes through the given starting point. Always verify your answer by checking it satisfies both the original ODE and the initial condition.

Varsity Tutors • Differential Equations • Linear ODEs with Initial Conditions