First-Order Differential Equations, MATH 104 Ch. 9 – Study Notes
offline

Difficulty: Intermediate | Prerequisites: Calculus 1 through integration techniques (Chapters 1 through 8), including antiderivatives, integration by parts and partial fractions.

Big Picture

This chapter introduces differential equations, which are equations involving derivatives of unknown functions. You have already been solving simple differential equations every time you computed an antiderivative. Now you formalise that process and learn to handle equations where the derivative depends on both the input variable and the function itself. The two techniques covered here, separation of variables and integrating factors, form the foundation for all later work in ordinary differential equations.


TL;DR

A differential equation relates a function to its derivatives. First-order equations of the form dy/dx = f(x, y) are solved using either separation of variables (when all y terms can be moved to one side) or the integrating factor method (for linear equations). Slope fields give a geometric picture of solutions, and Euler's method provides numerical approximations when no closed-form solution exists.

Key Terms

Differential equation

An equation that contains one or more derivatives of an unknown function. In simple terms, it is a rule that tells you how a function changes, and your job is to find the function itself.

General solution

The family of all solutions to a differential equation, expressed with an arbitrary constant C. Think of it as every possible answer, collected into one formula with a free parameter.

Particular solution

The single solution obtained by applying an initial condition to pin down the constant C. In simple terms, the initial condition picks out exactly one curve from the family.

Initial condition

A known value of the function at a specific input, such as y(0) = 7, used to determine C.

Separable differential equation

A first-order equation that can be rewritten so that all y terms (including dy) are on one side and all x terms (including dx) are on the other. Think of it as "split and integrate both sides independently."

Linear first-order differential equation

An equation of the form dy/dx + P(x) y = Q(x). The unknown function y and its derivative appear only to the first power, with no products like y dy/dx.

Integrating factor

The function µ(x) = e^(∫P(x) dx) that, when multiplied through a linear first-order equation, makes the left side collapse into the derivative of a product. In simple terms, it is the magic multiplier that turns the equation into something you can integrate directly.

Slope field (direction field)

A grid of short line segments drawn at sample points (x, y), each with slope equal to f(x, y). The pattern shows the shape of solution curves without solving the equation.

Euler's method

A numerical technique that approximates a solution by stepping forward in small increments: y_(n+1) = y_n + f(x_n, y_n) dx. Think of it as walking along the slope field in tiny straight-line steps.

9.1 Introduction to Differential Equations

From Antiderivatives to Differential Equations

Every indefinite integral you have computed is a differential equation in disguise. When you evaluate ∫(x² – 3x + 4) dx, you are solving dy/dx = x² – 3x + 4 and finding the general solution y(x) = x³/3 – 3x²/2 + 4x + C.

Applying an initial condition such as y(0) = 7 pins down C and gives the particular solution y(x) = x³/3 – 3x²/2 + 4x + 7.

First-Order Equations: dy/dx = f(x, y)

A more challenging situation arises when the derivative depends on y as well as x. Two main classes are covered in this course:

  • Separable equations can be rearranged so that one side contains only y and dy, the other only x and dx. You then integrate each side independently. Examples: dy/dx = y²x and dy/dx = (3x²y³ – 6x²)/y². Separable equations are covered in Section 7.2.

  • Linear equations have the standard form dy/dx + P(x)y = Q(x) and are solved using an integrating factor. Examples: dy/dx = y – x and dy/dx = (y + 2x ln x)/x. Linear equations are covered in Section 9.2.

Slope Fields

A slope field (also called a direction field) provides a geometric view of a differential equation.

  • At each sample point (x, y), you draw a short segment whose slope equals f(x, y).

  • Solution curves follow the pattern of these segments, so the field shows the qualitative behaviour of solutions even when you cannot find a formula.

  • Matching a slope field to its equation is a common exam question. Check key points: along the x-axis (y = 0), along the y-axis (x = 0), and along any line where f(x, y) = 0 (horizontal segments).

Euler's Method

When no closed-form solution exists, Euler's method produces a numerical approximation by stepping forward from a known point:

  1. Start with the initial condition (x₀, y₀).

  1. Choose a step size dx.

  1. Compute y₁ = y₀ + f(x₀, y₀) · dx.

  1. Repeat: y_(n+1) = y_n + f(x_n, y_n) · dx.

Each step follows the tangent line from the current point, so smaller step sizes give better accuracy.

9.2 Linear Differential Equations and the Integrating Factor

Standard Form

A linear first-order differential equation is written as:

dy/dx + P(x) y = Q(x)

Before applying the method, always rewrite the equation so the coefficient of dy/dx is 1. For example, x² y′ + 2xy = cos 2x becomes y′ + (2/x)y = cos 2x / x².

The Integrating Factor Method (Step by Step)

  1. Identify P(x) and Q(x) from the standard form.

  1. Compute the integrating factor µ(x) = e^(∫P(x) dx). You may drop the constant of integration here, since it cancels later.

  1. Multiply the entire equation by µ(x). The left side becomes d/dx[µ(x) · y].

  1. Integrate both sides: µ(x) · y = ∫ µ(x) Q(x) dx.

  1. Solve for y: divide both sides by µ(x).

Why the Integrating Factor Works

The product rule states d/dx[µ y] = µ dy/dx + µ′ y. Choosing µ so that µ′ = P(x)µ makes the left side of the multiplied equation equal to d/dx[µ y], which collapses a two-term expression into a single derivative you can integrate directly.

Worked Example: x² y′ + 2xy = cos 2x

  • Divide by x²: y′ + (2/x)y = cos(2x)/x². Here P(x) = 2/x, Q(x) = cos(2x)/x².

  • Integrating factor: µ = e^(∫ 2/x dx) = e^(2 ln|x|) = x².

  • Multiply: d/dx[x² y] = cos 2x.

  • Integrate: x² y = (1/2) sin 2x + C.

  • Solve: y = sin(2x)/(2x²) + C/x².

Worked Example: x ln(x) y′ + y = x e^x

  • Divide by x ln x: y′ + y/(x ln x) = e^x / ln x. Here P(x) = 1/(x ln x).

  • Integrating factor: µ = e^(∫ 1/(x ln x) dx) = e^(ln(ln x)) = ln x.

  • Multiply: d/dx[(ln x) y] = x e^x / (x) · (ln x / ln x) – follow through carefully with algebra.

  • Integrate and solve for y.

Initial Value Problems

When an initial condition is given, such as y(0) = 2 and y(1) = 1, substitute into the general solution to find C and then evaluate at the required point. A common exam setup is: given dy/dt = –k(y + 1) with two conditions, find y(2).

Formulas and Key Equations

General solution via antiderivative

dy/dx = f(x) ⇒ y = ∫f(x) dx + C

Standard form of a linear first-order equation

dy/dx + P(x) y = Q(x)

Integrating factor

µ(x) = e^(∫P(x) dx)

Solution formula for linear equations

y = [1/µ(x)] ∫ µ(x) Q(x) dx

where µ(x) = e^(∫P(x) dx)

Euler's method iteration

y_(n+1) = y_n + f(x_n, y_n) · Δx

Real-World Applications

Differential equations model any situation where the rate of change of a quantity depends on the quantity itself. Radioactive decay, Newton's law of cooling, population growth, mixing problems (a tank with solution flowing in and out) and electrical circuits with resistors and capacitors all reduce to first-order linear or separable equations. The equation dy/dt = –k(y + 1), for instance, appears in cooling and decay problems where the equilibrium value is shifted from zero.

Common Misconceptions

  • Students often forget to divide by the leading coefficient before identifying P(x) and Q(x). If the equation is x² y′ + 2xy = cos 2x, you must divide through by x² first.

  • When computing the integrating factor, students sometimes keep the "+ C" from the integral of P(x). Drop it: the constant cancels and keeping it only creates unnecessary algebra.

  • Euler's method gives an approximation, not the exact solution. A smaller step size improves accuracy but never makes the answer exact.

  • Students sometimes try to use the integrating factor method on a separable equation or vice versa. Either method may work on a given equation, but recognising which one is simpler saves time on exams.

Why It Matters / Exam Flags

⚠️ Expect to be asked to solve a linear first-order ODE using the integrating factor from start to finish, including finding the particular solution from an initial condition.

⚠️ Slope field matching questions are common on multiple-choice sections. Check what happens along the axes and where the slope is zero.

⚠️ Euler's method table problems appear regularly. You will be given a step size and asked to compute two or three iterations. Carry enough decimal places to avoid rounding errors.

⚠️ You may be asked to classify an equation as separable, linear, both, or neither before solving it.

Quick Self-Test

  1. True or False: Every antiderivative problem is a differential equation. True.

  1. Fill in the blank: The integrating factor for dy/dx + P(x)y = Q(x) is µ = ____. e^(∫P(x) dx).

  1. True or False: In Euler's method, a larger step size gives a more accurate approximation. False (smaller steps give better accuracy).

  1. Fill in the blank: A differential equation is called separable when you can write all y terms on one side and all ____ terms on the other. x.

  1. True or False: The general solution of a first-order ODE contains exactly one arbitrary constant. True.

Practice Q&A

Q: Given dy/dx + (2/x)y = cos(2x)/x² with y(π) = 0, find the particular solution.

A: The integrating factor is µ = x². Multiplying through gives d/dx[x² y] = cos 2x. Integrating: x² y = (1/2) sin 2x + C. Applying y(π) = 0: 0 = 0 + C, so C = 0. The particular solution is y = sin(2x)/(2x²).

Q: Classify each equation as separable, linear, both, or neither: (a) dy/dx = y²x, (b) dy/dx = y – x, (c) dy/dx = xy + x.

A: (a) Separable (not linear, because of y²). (b) Linear (rewrite as dy/dx – y = –x). (c) Both: it is linear (dy/dx – xy = x) and separable (factor the right side as x(y + 1)).

Q: Use Euler's method with step size Δx = 0.1 to estimate y(0.2) for dy/dx = x + y, y(0) = 1.

A: Step 1: y₁ = 1 + f(0, 1)(0.1) = 1 + 1(0.1) = 1.1. Step 2: y₂ = 1.1 + f(0.1, 1.1)(0.1) = 1.1 + 1.2(0.1) = 1.22. So y(0.2) ≈ 1.22.

Q: What is the purpose of the integrating factor in solving a linear first-order ODE?

A: It transforms the left side of the equation into the exact derivative of the product µ(x)·y, so you can integrate both sides directly.

Q: A slope field shows horizontal segments along the line y = 2. Which of the following equations could produce this field? (a) y′ = 2 – y, (b) y′ = x(2 – y), (c) y′ = x + y – 1.

A: Both (a) and (b). Setting y = 2 in either equation gives y′ = 0, producing horizontal segments. For (c), y′ = x + 1, which is not zero for all x.

Connections to Other Topics

Separable equations (Section 7.2) are a prerequisite for this chapter; if you are not comfortable separating variables and integrating both sides, review that section first. The integrating factor method reappears in higher courses (Math 250/251) for systems of differential equations. Slope fields and Euler's method connect directly to the idea of local linear approximation from Chapter 3.


Related Terms / Search Tags

Differential equations, ODE, first-order ODE, separable equation, linear first-order equation, integrating factor, slope field, direction field, Euler's method, numerical approximation, initial value problem, IVP, general solution, particular solution, dy/dx = f(x,y), product rule, antiderivative, Math 104, Penn State, Calculus 1, Chapter 9