Skip to content
11 min read

Introduction to Differential Equations: Types, Methods, and Applications

Differential equations are equations that relate a function to its derivatives. They are the mathematical language used to describe change, and they appear everywhere in science and engineering: from population growth and radioactive decay to circuits, fluid dynamics, and economics. In this introduction, we cover what differential equations are, how to classify them, and how to solve the most common types.

What Is a Differential Equation?

A differential equation (DE) is any equation that contains one or more derivatives of an unknown function. For example:

dydx=3x2\frac{dy}{dx} = 3x^2

This says “the rate of change of yy with respect to xx equals 3x23x^2.” Solving it means finding the function y(x)y(x) that satisfies this relationship.

Classifying Differential Equations

Ordinary vs Partial

  • Ordinary differential equations (ODEs) involve derivatives with respect to a single variable, e.g. dydx+y=ex\frac{dy}{dx} + y = e^x.
  • Partial differential equations (PDEs) involve partial derivatives with respect to multiple variables, e.g. the heat equation ∂u∂t=k∂2u∂x2\frac{\partial u}{\partial t} = k\frac{\partial^2 u}{\partial x^2}.

This guide focuses on ODEs, which form the starting point for most courses.

Order

The order of a DE is the highest derivative that appears. A first-order DE contains only dy/dxdy/dx. A second-order DE contains d2y/dx2d^2y/dx^2, and so on.

Linear vs Nonlinear

A DE is linear if the unknown function and its derivatives appear only to the first power and are not multiplied together. For example, y′′+3y′−2y=sin⁡xy'' + 3y' - 2y = \sin x is linear, while y′=y2y' = y^2 is nonlinear.

Solving by Direct Integration

The simplest type of ODE has the form dydx=f(x)\frac{dy}{dx} = f(x), which is solved by integrating both sides:

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

Example: Solve dydx=6x2−4x+1\frac{dy}{dx} = 6x^2 - 4x + 1.

y=∫(6x2−4x+1) dx=2x3−2x2+x+Cy = \int (6x^2 - 4x + 1)\,dx = 2x^3 - 2x^2 + x + C

The constant CC represents the family of solutions. An initial condition like y(0)=5y(0) = 5 pins down the specific solution: C=5C = 5.

Separation of Variables

When the DE can be written as dydx=g(x)⋅h(y)\frac{dy}{dx} = g(x) \cdot h(y), we can separate the variables and integrate each side independently:

1h(y) dy=g(x) dx⇒∫1h(y) dy=∫g(x) dx\frac{1}{h(y)}\,dy = g(x)\,dx \quad \Rightarrow \quad \int \frac{1}{h(y)}\,dy = \int g(x)\,dx

Worked Example: Exponential Growth

Problem: Solve dydx=ky\frac{dy}{dx} = ky where kk is a constant.

Separate variables:

1y dy=k dx\frac{1}{y}\,dy = k\,dx

Integrate both sides:

ln⁡∣y∣=kx+C1\ln|y| = kx + C_1

Exponentiate:

y=Aekxwhere A=±eC1y = Ae^{kx} \quad \text{where } A = \pm e^{C_1}

This is the exponential growth/decay model. If k>0k > 0, the function grows; if k<0k < 0, it decays. With the initial condition y(0)=y0y(0) = y_0, we get A=y0A = y_0, so:

y=y0ekxy = y_0 e^{kx}

Worked Example: Logistic Equation

Problem: Solve dydx=y(1−y)\frac{dy}{dx} = y(1 - y) with y(0)=0.5y(0) = 0.5.

Separate variables using partial fractions:

1y(1−y) dy=dx⇒(1y+11−y)dy=dx\frac{1}{y(1-y)}\,dy = dx \quad \Rightarrow \quad \left(\frac{1}{y} + \frac{1}{1-y}\right)dy = dx

Integrate:

ln⁡∣y∣−ln⁡∣1−y∣=x+C⇒ln⁡∣y1−y∣=x+C\ln|y| - \ln|1-y| = x + C \quad \Rightarrow \quad \ln\left|\frac{y}{1-y}\right| = x + C

With y(0)=0.5y(0) = 0.5: ln⁡(1)=0+C\ln(1) = 0 + C, so C=0C = 0. Therefore:

y1−y=ex⇒y=ex1+ex=11+e−x\frac{y}{1-y} = e^x \quad \Rightarrow \quad y = \frac{e^x}{1 + e^x} = \frac{1}{1 + e^{-x}}

This is the logistic (sigmoid) function, which models population growth with a carrying capacity.

First-Order Linear ODEs

A first-order linear ODE has the standard form:

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

The solution uses an integrating factor μ(x)=e∫P(x) dx\mu(x) = e^{\int P(x)\,dx}:

y=1μ(x)∫μ(x) Q(x) dxy = \frac{1}{\mu(x)}\int \mu(x)\,Q(x)\,dx

Worked Example

Problem: Solve dydx+2y=6e−x\frac{dy}{dx} + 2y = 6e^{-x}.

Here P(x)=2P(x) = 2 and Q(x)=6e−xQ(x) = 6e^{-x}. The integrating factor is:

μ=e∫2 dx=e2x\mu = e^{\int 2\,dx} = e^{2x}

Multiply through by μ\mu:

e2xdydx+2e2xy=6exe^{2x}\frac{dy}{dx} + 2e^{2x}y = 6e^{x}

The left side is ddx(e2xy)\frac{d}{dx}(e^{2x}y). Integrate:

e2xy=∫6ex dx=6ex+Ce^{2x}y = \int 6e^{x}\,dx = 6e^{x} + C
y=6e−x+Ce−2xy = 6e^{-x} + Ce^{-2x}

Real-World Applications

  • Radioactive decay: dN/dt=−λNdN/dt = -\lambda N gives N=N0e−λtN = N_0 e^{-\lambda t}, with half-life t1/2=ln⁡2/λt_{1/2} = \ln 2/\lambda.
  • Newton's law of cooling: dT/dt=−k(T−Tenv)dT/dt = -k(T - T_{\text{env}}) models how an object cools towards ambient temperature.
  • RC circuits: Rdqdt+qC=V(t)R\frac{dq}{dt} + \frac{q}{C} = V(t) describes charge on a capacitor in a resistor-capacitor circuit.
  • Population dynamics: The logistic equation models growth with limited resources, producing the S-shaped sigmoid curve.

Key Takeaways

  1. A differential equation relates a function to its derivatives. Solving it means finding the function.
  2. The order is the highest derivative present. First-order ODEs are the most approachable starting point.
  3. Separation of variables works when you can isolate yy terms on one side and xx terms on the other.
  4. Integrating factors solve any first-order linear ODE systematically.
  5. Initial conditions turn a general solution (with constant CC) into a particular solution.

Try It Yourself

Practise computing derivatives and integrals needed for differential equations with our free Derivative Calculator and Integral Calculator. For evaluating exponential expressions like ekxe^{kx}, try our Exponent Calculator.

Related Articles