Calculus (Texas A&M University) | Source: MATH 308 Lecture Notes, Ch. 9
Tags: differential equations, separable equations, linear first order, initial value problem, integrating factor, IVP, ODE, separation of variables, MATH 308
Differential equations are equations whose solutions are functions, not numbers. The simplest type is solved by direct integration. Two key first-order types are separable equations (rearrange so each variable is on its own side, then integrate) and linear equations (use an integrating factor to collapse the left side into a product-rule derivative).
Differential equation
An equation involving an unknown function and one or more of its derivatives. Where an algebraic equation like x² – 5x + 6 = 0 has numbers as solutions (x = 2, x = 3), a differential equation like y'' – 5y' + 6y = 0 has functions as solutions, e.g. y(x) = e^(2x).
Initial value problem (IVP)
A differential equation paired with an initial condition that pins down a single solution from the family of all possible solutions. The initial condition specifies the value of the unknown function at a particular point.
Separable differential equation
A first-order ODE that can be written in the form y' = g(x)·f(y), so that the x-parts and y-parts can be moved to opposite sides of the equation and integrated independently.
First-order linear differential equation
An ODE of the form dy/dx + P(x)·y = Q(x). "First order" means only the first derivative appears. "Linear" means y and y' appear only to the first power, with no terms like y², e^y, etc.
Integrating factor
The function I(x) = e^(∫P(x) dx) used to solve a first-order linear ODE. Multiplying both sides by I(x) turns the left side into the derivative of (y · I(x)), which can then be integrated directly.
Standard form (of a linear first-order ODE)
The arrangement dy/dx + P(x)·y = Q(x). You must put the equation into this form before identifying P(x) and computing the integrating factor.
Most physical laws are expressed as differential equations. Newton's second law for a pendulum, for instance, gives –kθ(t) = mθ''(t), a second-order ODE relating the angle θ to its own second derivative. Solving the equation tells you how the system evolves over time.
The most basic type: given a known function f(x), find y(x) such that y'(x) = f(x).
The answer is y(x) = ∫f(x) dx + C
The constant C means there are infinitely many solutions
An initial condition (e.g. y(0) = –1) fixes C and gives one particular solution
Worked example: y' = sin x. General solution: y(x) = –cos x + C. With y(0) = –1: –cos(0) + C = –1, so –1 + C = –1, giving C = 0. Particular solution: y(x) = –cos x.
A first-order ODE is separable if it can be written as dy/dx = g(x)·f(y).
Method:
Rewrite as (1/f(y)) dy = g(x) dx
Integrate both sides: ∫(1/f(y)) dy = ∫g(x) dx
Solve for y if possible
Worked example: y' = (2 sin x + 2x) / y².
Separate: y² dy = (2 sin x + 2x) dx
Integrate: y³/3 = –2 cos x + x² + C
General solution: y³ = –6 cos x + 3x² + C₁
With y(0) = 1: 1 = –6 + 0 + C₁, so C₁ = 7
Recognising separable form: sometimes you need to factor first. For x'(t) = 1 + t – x – tx, factor the right side as (1 + t)(1 – x). That gives the separable form x' = (1 + t)(1 – x).
Identifying the type:
y' + 2xy = x is first-order linear (y and y' to the first power only)
y'' + y = 0 is second order (contains y''), so this method does not apply
y' + xy² = 0 is non-linear (contains y²), though it happens to be separable
The integrating factor method (three steps):
Step 1. Put the equation into standard form: dy/dx + P(x)·y = Q(x).
Step 2. Compute the integrating factor: I(x) = e^(∫P(x) dx).
Step 3. Multiply both sides by I(x). The left side collapses (via the product rule) into (y · I(x))'. Integrate both sides and solve for y.
Worked example: y' + 2xy = x.
Already in standard form with P(x) = 2x, Q(x) = x
Integrating factor: I(x) = e^(∫2x dx) = e^(x²)
Multiply through: e^(x²)·y' + 2x·e^(x²)·y = x·e^(x²)
Left side is (e^(x²)·y)' by the product rule
Integrate: e^(x²)·y = ∫x·e^(x²) dx = (1/2)e^(x²) + C
Solve for y: y(x) = 1/2 + C·e^(–x²)
Another example: xy' + y = 2x.
Divide by x to get standard form: y' + (1/x)·y = 2
P(x) = 1/x, so I(x) = e^(∫(1/x) dx) = e^(ln x) = x
Multiply: x·y' + y = 2x, which gives (xy)' = 2x
Integrate: xy = x² + C, so y = x + C/x
With y(1) = 3: 3 = 1 + C, so C = 2 and y = x + 2/x
Example: y' – 3y = eˣ.
Standard form with P(x) = –3, Q(x) = eˣ
Integrating factor: I(x) = e^(–3x)
(e^(–3x)·y)' = eˣ·e^(–3x) = e^(–2x)
Integrate: e^(–3x)·y = –(1/2)e^(–2x) + C
y = –(1/2)eˣ + C·e^(3x)
Direct integration: y' = f(x) ⟹ y = ∫f(x) dx + C
Separable equation: dy/dx = g(x)·f(y) ⟹ ∫(1/f(y)) dy = ∫g(x) dx
Linear first-order ODE standard form: dy/dx + P(x)·y = Q(x)
Integrating factor: I(x) = e^(∫P(x) dx)
Solution via integrating factor: y = (1/I(x)) · ∫Q(x)·I(x) dx
⚠️ Always check whether an equation is separable, linear, or both before choosing a method. Some equations (like y' + xy² = 0) are separable but not linear.
⚠️ For the integrating factor method, you must have the equation in standard form (coefficient of y' equal to 1) before reading off P(x).
⚠️ When converting to separable form, watch for hidden factorisations. The expression 1 + t – x – tx factors as (1 + t)(1 – x).
⚠️ The general solution always contains an arbitrary constant C. Only an initial condition pins it down. Forgetting +C is one of the most common errors.
⚠️ When dividing by x (or any expression) to reach standard form, note where that expression is zero. The solution may not be valid at those points.
Q: What distinguishes a differential equation from an algebraic equation?
A: An algebraic equation has numbers as solutions (e.g. x = 2). A differential equation has functions as solutions (e.g. y(x) = e^(2x)).
Q: Solve y' = cos x with y(π) = 0.
A: General solution: y = sin x + C. Apply initial condition: 0 = sin π + C = 0 + C, so C = 0. Solution: y = sin x.
Q: Is x'(t) = 1 + t – x – tx separable? If so, separate it.
A: Yes. Factor: x' = (1 + t)(1 – x). Separated form: dx/(1 – x) = (1 + t) dt.
Q: Solve y' + 2xy = x.
A: Integrating factor I(x) = e^(x²). Solution: y = 1/2 + Ce^(–x²).
Q: For the equation xy' + y = 0, what is P(x) in standard form?
A: Divide by x: y' + (1/x)y = 0, so P(x) = 1/x.
differential equation, ODE, ordinary differential equation, initial value problem, IVP, separable equation, separation of variables, first-order linear ODE, integrating factor, standard form, product rule, general solution, particular solution, constant of integration, pendulum equation, MATH 308, Texas A&M, calculus