Skip to content
Part IA Michaelmas, Lent, Easter Term

First Order ODEs

What is an ODE?

An ordinary differential equation (ODE) relates an unknown function to its derivatives:

F(x,y,dydx,d2ydx2,)=0F\left(x, y, \frac{dy}{dx}, \frac{d^2y}{dx^2}, \ldots\right) = 0

Order: the highest derivative appearing.

Linear vs nonlinear: Linear means yy and its derivatives appear to the first power only.


Integrable ODEs

The simplest case: dydx=f(x)\frac{dy}{dx} = f(x)

Solution by integration:

y=f(x)dx+Cy = \int f(x)\,dx + C


Separable ODEs

Form: dydx=f(x)g(y)\frac{dy}{dx} = f(x)g(y)

Method: Separate variables and integrate:

dyg(y)=f(x)dx\int \frac{dy}{g(y)} = \int f(x)\,dx

Separation of variables showing dy terms with y and dx terms with x on opposite sides

Example: Solve dydx=xy\frac{dy}{dx} = xy.

Separate: dyy=xdx\frac{dy}{y} = x\,dx

Integrate: lny=x22+C\ln|y| = \frac{x^2}{2} + C

Solve: y=Aex2/2y = Ae^{x^2/2} where A=±eCA = \pm e^C.


Linear First Order ODEs

Standard form:

dydx+P(x)y=Q(x)\frac{dy}{dx} + P(x)y = Q(x)

Integrating Factor Method

Multiply by integrating factor μ(x)=eP(x)dx\mu(x) = e^{\int P(x)\,dx}:

μdydx+μPy=μQ\mu \frac{dy}{dx} + \mu P y = \mu Q

The left side is ddx(μy)\frac{d}{dx}(\mu y), so:

ddx(μy)=μQ\frac{d}{dx}(\mu y) = \mu Q

Integrate:

y=1μμQdx+Cμy = \frac{1}{\mu}\int \mu Q\,dx + \frac{C}{\mu}

Example: Solve y+3y=e2xy' + 3y = e^{-2x}.

P=3P = 3, so μ=e3x\mu = e^{3x}.

ddx(e3xy)=e3xe2x=ex\frac{d}{dx}(e^{3x}y) = e^{3x}e^{-2x} = e^x

e3xy=ex+Ce^{3x}y = e^x + C

y=e2x+Ce3xy = e^{-2x} + Ce^{-3x}


Bernoulli Equation

Form: dydx+P(x)y=Q(x)yn\frac{dy}{dx} + P(x)y = Q(x)y^n

Method: Substitute z=y1nz = y^{1-n} to transform to linear.

Differentiating: dzdx=(1n)yndydx\frac{dz}{dx} = (1-n)y^{-n}\frac{dy}{dx}

Substituting gives a linear ODE in zz:

dzdx+(1n)Pz=(1n)Q\frac{dz}{dx} + (1-n)Pz = (1-n)Q

Example: Solve yxy=xy2y' - xy = xy^2.

Here n=2n = 2. Let z=y1z = y^{-1}, so dzdx=y2y\frac{dz}{dx} = -y^{-2}y'.

y2dzdxxyy2=x-y^2\frac{dz}{dx} - xy y^{-2} = x

dzdxxz=x-\frac{dz}{dx} - xz = x

dzdx+xz=x\frac{dz}{dx} + xz = -x

This is linear with P=xP = x. The integrating factor μ=ex2/2\mu = e^{x^2/2}.

Solve: z=1+Cex2/2z = -1 + Ce^{-x^2/2}, so y=11+Cex2/2y = \frac{1}{-1 + Ce^{-x^2/2}}.


Homogeneous Substitution

Form: dydx=f(yx)\frac{dy}{dx} = f\left(\frac{y}{x}\right)

Method: Let u=yxu = \frac{y}{x}, so y=uxy = ux and dydx=u+xdudx\frac{dy}{dx} = u + x\frac{du}{dx}.

Substitute:

u+xdudx=f(u)u + x\frac{du}{dx} = f(u)

dudx=f(u)ux\frac{du}{dx} = \frac{f(u) - u}{x}

This is now separable.


Exact Equations

An equation dydx=P(x,y)Q(x,y)\frac{dy}{dx} = -\frac{P(x,y)}{Q(x,y)} is exact if there exists F(x,y)F(x,y) such that:

Fx=PandFy=Q\frac{\partial F}{\partial x} = P \quad \text{and} \quad \frac{\partial F}{\partial y} = Q

Test: Py=Qx\frac{\partial P}{\partial y} = \frac{\partial Q}{\partial x}

Solution: The ODE becomes dF=0dF = 0, so F(x,y)=CF(x,y) = C.

Find FF by integrating PP with respect to xx, then matching partial derivatives with QQ.


Existence and Uniqueness

For the initial value problem y=f(x,y)y' = f(x,y), y(x0)=y0y(x_0) = y_0:

If ff and fy\frac{\partial f}{\partial y} are continuous near (x0,y0)(x_0, y_0), then a unique solution exists locally.

Warning: Solutions may not exist for all xx (finite-time blow-up).


Why These Methods Matter

  • Physical systems often yield ODEs
  • The classification tells you which tool to use
  • Numerical methods apply when analytical solutions don’t exist
  • Understanding behaviour (steady states, stability) comes from the solution structure