# First order differential equations (HL only)

> IB Mathematics: Analysis and Approaches HL · IB AA HL Calculus
> Source: https://www.owlsprep.com/study/ib-math-aa-hl-u5-first-order-differential-equations/

First order differential equations relate an unknown function to its first derivative. This module covers solving separable, homogeneous, and linear first-order ODEs, including finding particular solutions from initial conditions for applied problems.

**Prerequisites:** [Integration techniques](https://www.owlsprep.com/study/ib-math-aa-hl-u5-integration-techniques/); [Implicit differentiation](https://www.owlsprep.com/study/ib-math-aa-hl-u4-differentiation-rules/); [Partial fraction decomposition](https://www.owlsprep.com/study/ib-math-aa-hl-u5-partial-fractions/)

## Learning objectives

- Classify types of first order differential equations
- Solve separable first order ODEs with initial conditions
- Solve homogeneous first order ODEs using substitution
- Solve linear first order ODEs using integrating factor method
- Find particular solutions for applied initial value problems

## Fundamentals and Separable Differential Equations

**First order differential equation** — An equation relating independent variable $x$, dependent variable $y$, and the first derivative of $y$. The general solution includes an arbitrary constant; an initial condition fixes the constant for a particular solution.

*Notation:* \frac{dy}{dx} = f(x,y)

*Example:* \frac{dy}{dx} = 2xy

A separable ODE can be rearranged to group all $y$ terms on one side and all $x$ terms on the other, allowing direct integration of both sides.

**Worked example:** Find the general solution to $\frac{dy}{dx} = \frac{x^2}{y^2}$

1. Separate variables by multiplying both sides by $y^2 dx$:

   $$y^2 dy = x^2 dx$$
2. Integrate both sides, add the constant of integration:

   $$\int y^2 dy = \int x^2 dx$$
3. Evaluate the integrals:

   $$\frac{y^3}{3} = \frac{x^3}{3} + C$$
4. Simplify to get the general solution:

   $$y = \sqrt[3]{x^3 + C}$$

> **tip**
>
> Always include the constant of integration for general solutions; forgetting it is a common mark deduction.

## Homogeneous First Order Differential Equations

**Homogeneous first order ODE** — A first order ODE of the form $\frac{dy}{dx} = f\left(\frac{y}{x}\right)$, solved using the substitution $v = \frac{y}{x}$ that transforms the ODE into a separable equation.

Since $y = vx$, differentiate with respect to $x$ using the product rule to get $\frac{dy}{dx} = v + x\frac{dv}{dx}$. Substitute this into the original ODE to get a separable equation in $v$ and $x$.

**Worked example:** Solve the homogeneous ODE $x\frac{dy}{dx} = y + x$, for $x>0$

1. Rearrange to confirm it is homogeneous:

   $$\frac{dy}{dx} = \frac{y}{x} + 1 = f\left(\frac{y}{x}\right)$$
2. Substitute $v = \frac{y}{x}$ and $\frac{dy}{dx} = v + x\frac{dv}{dx}$:

   $$v + x\frac{dv}{dx} = v + 1$$
3. Simplify and separate variables:

   $$dv = \frac{dx}{x}$$
4. Integrate both sides:

   $$v = \ln x + C$$
5. Substitute back $v = \frac{y}{x}$ for the general solution:

   $$y = x(\ln x + C)$$

## Linear First Order ODEs and Integrating Factor

**Linear first order ODE** — A first order ODE linear in $y$, where $P(x)$ and $Q(x)$ are functions of $x$ only, solved using the integrating factor method.

*Notation:* \frac{dy}{dx} + P(x)y = Q(x)

The integrating factor is defined as $I(x) = e^{\int P(x) dx}$. Multiplying through by $I(x)$ turns the left-hand side into the derivative of the product $I(x)y$, which can be integrated directly:

$$\frac{d}{dx}\left(I(x)y\right) = I(x)Q(x)$$

**Worked example:** Find the general solution to $\frac{dy}{dx} + \frac{y}{x} = x^2$, $x>0$

1. Confirm the ODE is in standard linear form, with $P(x) = \frac{1}{x}$ and $Q(x) = x^2$.
2. Calculate the integrating factor:

   $$I(x) = e^{\int \frac{1}{x} dx} = e^{\ln x} = x$$
3. Multiply both sides by $I(x) = x$:

   $$x\frac{dy}{dx} + y = x^3$$
4. Recognize left-hand side as $\frac{d}{dx}(xy)$:

   $$\frac{d}{dx}(xy) = x^3$$
5. Integrate and rearrange for $y$:

   $$xy = \frac{x^4}{4} + C \implies y = \frac{x^3}{4} + \frac{C}{x}$$

> **exam_tip**
>
> Always rewrite the ODE in standard form before calculating the integrating factor. Failing to do this gives an incorrect integrating factor.

## Initial Value Problems in Applied Contexts

In applied problems, you will almost always get an initial condition $y(x_0) = y_0$, which lets you solve for the arbitrary constant $C$ and get a unique particular solution. Common applications include population growth, radioactive decay, Newton's law of cooling, and motion with resistance.

**Worked example:** A population grows according to $\frac{dP}{dt} = 0.02P$, with initial population $P(0) = 1000$. Find $P$ when $t=10$.

1. Separate variables:

   $$\frac{dP}{P} = 0.02 dt$$
2. Integrate both sides:

   $$\ln P = 0.02 t + C$$
3. Exponentiate to simplify, rename $e^C = A$:

   $$P = Ae^{0.02 t}$$
4. Apply initial condition $P(0) = 1000$:

   $$1000 = Ae^0 \implies A = 1000$$
5. Calculate $P(10)$:

   $$P(10) = 1000 e^{0.2} \approx 1221$$

## Common pitfalls

- **Wrong:** Forgetting to add the constant of integration when integrating both sides.
  - Why it fails: This gives an incorrect general solution, leading to wrong particular solutions and lost marks.
  - Correct: Add the constant of integration immediately after integrating.
- **Wrong:** Calculating the integrating factor without writing the ODE in standard form with $dy/dx$ coefficient 1.
  - Why it fails: P(x) will be incorrect, leading to a wrong integrating factor and wrong solution.
  - Correct: Always divide through by the coefficient of $dy/dx$ first.
- **Wrong:** Incorrect substitution for homogeneous ODEs, writing $dy/dx = dv/dx$ instead of $dy/dx = v + x dv/dx$.
  - Why it fails: Forgetting the product rule for differentiating $y=vx$ gives a wrong separable equation.
  - Correct: Always use the product rule for the substitution.
- **Wrong:** Dropping the absolute value when integrating $1/x$.
  - Why it fails: This leads to invalid solutions for negative $x$, or incorrect integrating factors.
  - Correct: Keep the absolute value until simplifying, or confirm domain.
- **Wrong:** Using integrating factor for non-linear ODEs.
  - Why it fails: The method only works for linear ODEs in $y$, so it will not give a correct solution.
  - Correct: Classify the ODE first: separate, test homogeneity, then use integrating factor only for linear ODEs.

## Cheatsheet

| ODE Type | Standard Form | Solution Method |
| --- | --- | --- |
| Separable | $\frac{dy}{dx} = f(x)g(y)$ | $\int \frac{1}{g(y)} dy = \int f(x) dx$ |
| Homogeneous | $\frac{dy}{dx} = f\left(\frac{y}{x}\right)$ | Substitute $v = \frac{y}{x}$, solve separable |
| Linear | $\frac{dy}{dx} + P(x)y = Q(x)$ | Integrating factor $I(x) = e^{\int P(x) dx}$, solve $\frac{d}{dx}(I(x)y) = I(x)Q(x)$ |
| Initial Value | $\frac{dy}{dx} = f(x,y), y(x_0) = y_0$ | Find general solution, substitute initial condition to find $C$ |

## What's next

First order differential equations are the foundation for more advanced topics in calculus and dynamic systems modeling, widely used across STEM fields. In IB AA HL (AHL 5.18) they are solved using Euler's method, separation of variables, the homogeneous substitution $y = vx$, and the integrating factor, and mixed problems requiring you to select the right method are common. Note that second order differential equations and qualitative slope-field or equilibrium analysis are not part of the AA HL syllabus. Practicing mixed problems that require classification first is the best way to prepare for exam questions.

- [Maclaurin and Taylor series (HL only)](https://www.owlsprep.com/study/ib-math-aa-hl-u5-maclaurin-and-taylor-series/)
- [Fundamental theorem of calculus](https://www.owlsprep.com/study/ib-math-aa-hl-u5-fundamental-theorem-of-calculus/)

---

From [OwlsPrep](https://www.owlsprep.com) — free study guides for A-Level, IB, AP and IGCSE, written against the official syllabus. Canonical page: https://www.owlsprep.com/study/ib-math-aa-hl-u5-first-order-differential-equations/
