01 / 20

Linear ODEs with
Initial Conditions

Learn to solve first-order linear differential equations using integrating factors and apply initial conditions to find unique solutions.

Differential Equations

What is an ODE?

An Ordinary Differential Equation (ODE) is an equation that relates a function \( y(x) \) to its derivatives. It describes how a quantity changes with respect to one independent variable.

Order
The highest derivative present. \( \frac{dy}{dx} \) means first-order.
Linearity
Linear if \( y \) and \( \frac{dy}{dx} \) appear to the first power only.

Why Initial Conditions Matter

A first-order ODE has infinitely many solutions, forming a family of curves. An initial condition such as \( y(x_0) = y_0 \) selects exactly one curve from the family.

x y
\(y=3\)
\( y(0) = 1 \)
Unique solution Family of curves

The Standard Form

Every first-order linear ODE can be written in standard form by isolating \( \frac{dy}{dx} \):

\( P(x) \)
The coefficient of \( y \). Must be a function of \( x \) only (not \( y \)).
\( Q(x) \)
The "forcing" term on the right side. Drives the particular solution.

The Integrating Factor

The key to solving a linear ODE is the integrating factor \( \mu(x) \). It transforms the left side into an exact derivative.

Multiplying both sides of the ODE by \( \mu(x) \) gives:

Why It Works

1
Start with standard form: \( \frac{dy}{dx} + P(x)\,y = Q(x) \).
2
Multiply by \( \mu(x) \): \( \mu\,\frac{dy}{dx} + \mu\,P\,y = \mu\,Q \).
3
Key insight: Since \( \mu' = P\mu \), the left side equals \( \frac{d}{dx}[\mu\,y] \) by the product rule.
4
Integrate both sides: \( \mu(x)\,y = \int \mu(x)\,Q(x)\,dx + C \).

General vs Particular Solution

General Solution
Contains the arbitrary constant \( C \). Represents the entire family of solutions.
Particular Solution
The specific solution found after applying the initial condition to determine \( C \).

Separable vs Linear ODEs

Separable Linear (First-Order)
Form \( \frac{dy}{dx} = f(x)\,g(y) \) \( \frac{dy}{dx} + P(x)\,y = Q(x) \)
Method Separate & integrate Integrating factor
Requirement RHS must factor as \( f(x) \cdot g(y) \) \( y \) appears linearly (degree 1)
Overlap? Some ODEs are both separable and linear

Step-by-Step Method

1
Rewrite in standard form: \( \frac{dy}{dx} + P(x)\,y = Q(x) \). Identify \( P(x) \) and \( Q(x) \).
2
Compute the integrating factor: \( \mu(x) = e^{\int P(x)\,dx} \). Omit the constant of integration here.
3
Multiply both sides by \( \mu(x) \) and recognize the left side as \( \frac{d}{dx}[\mu\,y] \).
4
Integrate both sides: \( \mu\,y = \int \mu\,Q\,dx + C \). Solve for \( y \).
5
Apply the initial condition \( y(x_0) = y_0 \) to find \( C \). Write the particular solution.

Example 1: Constant Coefficient

1
Already in standard form: \( P(x) = 2 \), \( Q(x) = 6 \).
2
Integrating factor: \( \mu = e^{\int 2\,dx} = e^{2x} \).
3
Multiply: \( \frac{d}{dx}[e^{2x}\,y] = 6e^{2x} \).
4
Integrate: \( e^{2x}\,y = 3e^{2x} + C \), so \( y = 3 + Ce^{-2x} \).
5
Apply \( y(0) = 1 \): \( 1 = 3 + C \), so \( C = -2 \).

Example 1: Graph

x y 0 1 2 3 4 1 2 3 4
\(y=3\)
\( y(0) = 1 \)

Example 2: Variable Coefficient

1
Standard form: \( P(x) = \frac{1}{x} \), \( Q(x) = x \).
2
Integrating factor: \( \mu = e^{\int \frac{1}{x}\,dx} = e^{\ln|x|} = x \) (since \( x > 0 \)).
3
Multiply: \( \frac{d}{dx}[x\,y] = x^2 \).
4
Integrate: \( x\,y = \frac{x^3}{3} + C \), so \( y = \frac{x^2}{3} + \frac{C}{x} \).
5
Apply \( y(1) = 2 \): \( 2 = \frac{1}{3} + C \), so \( C = \frac{5}{3} \).

Example 3: Exponential Coefficient

1
Standard form: \( P(x) = -3 \), \( Q(x) = e^{2x} \).
2
Integrating factor: \( \mu = e^{\int (-3)\,dx} = e^{-3x} \).
3
Multiply: \( \frac{d}{dx}[e^{-3x}\,y] = e^{-3x} \cdot e^{2x} = e^{-x} \).
4
Integrate: \( e^{-3x}\,y = -e^{-x} + C \), so \( y = -e^{2x} + Ce^{3x} \).
5
Apply \( y(0) = 4 \): \( 4 = -1 + C \), so \( C = 5 \).

Solution Structure

General Solution (has C)
Apply \( y(x_0) = y_0 \)
Particular Solution (unique) Family of curves Solve for C One curve

Common Mistakes

✕ Forgetting Standard Form
The coefficient of \( \frac{dy}{dx} \) must be 1. If given \( 2\frac{dy}{dx} + 4y = 6 \), divide everything by 2 first.
✕ Adding C in \( \mu(x) \)
When computing \( \mu = e^{\int P\,dx} \), do not include a constant of integration. It cancels out.
✕ Wrong Sign on \( P(x) \)
In \( \frac{dy}{dx} - 3y = 5 \), \( P(x) = -3 \), not \( +3 \). The sign must match the standard form.

Question 1 of 5

What is the integrating factor for the ODE \( \frac{dy}{dx} + 4y = 8 \)?

Question 2 of 5

Given the general solution \( y = 5 + Ce^{-x} \) and the initial condition \( y(0) = 3 \), what is the value of \( C \)?

Question 3 of 5

For the ODE \( x\frac{dy}{dx} + 2y = x^3 \), what is the first step to apply the integrating factor method?

Question 4 of 5

What is the particular solution to \( \frac{dy}{dx} + y = 0 \) with \( y(0) = 7 \)?

Question 5 of 5

The integrating factor for \( \frac{dy}{dx} - \frac{2}{x}y = x \) (with \( x > 0 \)) is: