evan's notes
cal 3discreteodeenv systems
中文

On this page

  • Differential equations
  • Differential equations as models
  • A falling object
  • Population growth
  • Ordinary and partial differential equations
  • The order of an ODE
  • A general form for an ODE
  • Building an ODE from FFF
  • What counts as a solution?
  • Checking a proposed solution
  • Linear and nonlinear ODEs
  • A linear example
  • A nonlinear example
  • General solutions
  • Scalar equations and systems
  • Autonomous and non-autonomous ODEs

Ordinary Differential Equations

§1 Introduction to Differential Equations

Evan Luo · Sep 2, 2026

Ordinary Differential Equations

§1 Introduction to Differential Equations

Evan LuoSep 2, 2026

9 min read

Differential equations

In ordinary algebra, the unknown in an equation is typically a number. In a differential equation (DE), the unknown is an entire function, and the equation relates that function to one or more of its derivatives.

To see what this looks like, let:

  • ttt be the independent variable;
  • N(t)N(t)N(t) be the unknown function;
  • rrr be a constant.

The prime notation denotes differentiation with respect to ttt:

N′(t)=dNdt.N'(t)=\frac{dN}{dt}. N′(t)=dtdN​.

The relationship

N′(t)=rN(t)N'(t)=rN(t) N′(t)=rN(t)

is a differential equation stating that the rate of change N′(t)N'(t)N′(t) is directly proportional to the current value N(t)N(t)N(t).

Differential equations as models

Differential equations arise naturally across science and engineering because physical laws often govern how quantities change from moment to moment rather than dictating their values directly.

A falling object

Consider an object of mass mmm falling under gravity. Let v(t)v(t)v(t) be its downward velocity at time ttt, choosing downward as the positive direction. Let:

  • ggg be the acceleration due to gravity;
  • γ\gammaγ, read “gamma,” be the drag coefficient.

Newton's second law states that

mass×acceleration=sum of forces.\text{mass}\times\text{acceleration} = \text{sum of forces}. mass×acceleration=sum of forces.

Because acceleration is the derivative of velocity, the acceleration is v′(t)v'(t)v′(t), giving mv′(t)mv'(t)mv′(t) on the left side.

Two forces act on the object:

  • Gravity pulls downward, adding +mg+mg+mg.
  • Air resistance (drag) opposes downward motion, contributing −γv(t)-\gamma v(t)−γv(t).

Equating mass times acceleration to the sum of forces gives

mv′(t)=mg−γv(t).mv'(t)=mg-\gamma v(t). mv′(t)=mg−γv(t).

This differential equation balances the downward pull of gravity against the opposing drag.

Population growth

Now consider an idealized population of size N(t)N(t)N(t) at time ttt living in an environment with unlimited resources. If the rate of change of the population is proportional to its current size, and rrr is the proportionality constant, then

N′(t)=rN(t).N'(t)=rN(t). N′(t)=rN(t).

First record the constant solution N(t)=0N(t)=0N(t)=0. Dividing by NNN would lose it. To find the positive population solutions, divide both sides by N(t)N(t)N(t):

N′(t)N(t)=r.\frac{N'(t)}{N(t)}=r. N(t)N′(t)​=r.

By the chain rule, the left side is the derivative of the natural logarithm ln⁡\lnln:

ddtln⁡N(t)=N′(t)N(t).\frac{d}{dt}\ln N(t)=\frac{N'(t)}{N(t)}. dtd​lnN(t)=N(t)N′(t)​.

The equation can therefore be rewritten as

ddtln⁡N(t)=r.\frac{d}{dt}\ln N(t)=r. dtd​lnN(t)=r.

Integrating both sides with respect to ttt introduces a constant of integration, CCC:

ln⁡N(t)=rt+C.\ln N(t)=rt+C. lnN(t)=rt+C.

Exponentiating both sides isolates N(t)N(t)N(t):

N(t)=ert+C=eCert.N(t)=e^{rt+C}=e^Ce^{rt}. N(t)=ert+C=eCert.

Because CCC is arbitrary, eCe^CeC can be any positive constant. Setting k=eCk=e^Ck=eC gives the solution family

N(t)=kert,k>0.N(t)=ke^{rt},\qquad k>0. N(t)=kert,k>0.

Evaluating at t=0t=0t=0 reveals the physical meaning of kkk:

N(0)=ke0=k.N(0)=ke^0=k. N(0)=ke0=k.

Thus, kkk represents the initial population, often written N0=N(0)N_0=N(0)N0​=N(0). Without a specified starting value, we have a family of positive curves; together with N(t)=0N(t)=0N(t)=0, these give all the nonnegative population solutions. The sign of rrr determines the long-term behavior:

  • r>0r>0r>0: exponential growth;
  • r=0r=0r=0: a constant population;
  • r<0r<0r<0: exponential decay.

Because real environments cannot provide unlimited resources indefinitely, this model is an idealization that typically applies only over limited periods.

Ordinary and partial differential equations

An ordinary differential equation (ODE) involves derivatives with respect to a single independent variable. Each of the following is an ODE:

N′(t)=rN(t),N'(t)=rN(t), N′(t)=rN(t), y′′(x)+y(x)=0,y''(x)+y(x)=0, y′′(x)+y(x)=0, mv′(t)=mg−γv(t).mv'(t)=mg-\gamma v(t). mv′(t)=mg−γv(t).

The independent variable need not be time; in y′′(x)+y(x)=0y''(x)+y(x)=0y′′(x)+y(x)=0, the unknown yyy depends on spatial position xxx.

A partial differential equation (PDE) involves partial derivatives of an unknown function that depends on two or more independent variables. The partial derivative symbol ∂\partial∂ denotes differentiation with respect to one variable while holding the others fixed.

For example, if u(x,t)u(x,t)u(x,t) describes temperature at position xxx and time ttt, the one-dimensional heat equation is written as

∂u∂t=∂2u∂x2.\frac{\partial u}{\partial t} = \frac{\partial^2u}{\partial x^2}. ∂t∂u​=∂x2∂2u​.

Because u(x,t)u(x,t)u(x,t) depends on both xxx and ttt, this is a PDE.

The order of an ODE

The order of an ODE is the order of the highest derivative appearing in the equation.

For any positive integer jjj, the notation

y(j)(t)=djydtj(t)y^{(j)}(t)=\frac{d^jy}{dt^j}(t) y(j)(t)=dtjdjy​(t)

represents the jjjth derivative of yyy with respect to ttt. For instance, y(2)(t)=y′′(t)y^{(2)}(t)=y''(t)y(2)(t)=y′′(t) is the second derivative.

ODEHighest derivativeOrder
N′(t)=rN(t)N'(t)=rN(t)N′(t)=rN(t)N′(t)N'(t)N′(t)first
v′(t)=g−γmv(t)v'(t)=g-\dfrac{\gamma}{m}v(t)v′(t)=g−mγ​v(t)v′(t)v'(t)v′(t)first
y′′(t)+y(t)=cos⁡ty''(t)+y(t)=\cos ty′′(t)+y(t)=costy′′(t)y''(t)y′′(t)second
y(4)+y′′+cos⁡t+y2=0y^{(4)}+y''+\cos t+y^2=0y(4)+y′′+cost+y2=0y(4)y^{(4)}y(4)fourth

The order refers strictly to the highest derivative, not to algebraic powers. In

y(4)+y′′+cos⁡t+y2=0,y^{(4)}+y''+\cos t+y^2=0, y(4)+y′′+cost+y2=0,

the term y2y^2y2 squares the function, but the highest derivative present is y(4)y^{(4)}y(4), making the ODE fourth order.

When the independent variable is understood from context, it is often omitted for brevity. For instance, y′′+y=0y''+y=0y′′+y=0 stands for y′′(t)+y(t)=0y''(t)+y(t)=0y′′(t)+y(t)=0.

A general form for an ODE

Any nnnth-order ODE can be collected into a single expression by using a function FFF that accepts the independent variable, the unknown function, and all derivatives up to order nnn:

F(t,y(t),y′(t),…,y(n)(t))=0.F\bigl(t,y(t),y'(t),\ldots,y^{(n)}(t)\bigr)=0. F(t,y(t),y′(t),…,y(n)(t))=0.

Writing the equation this way expresses it implicitly, meaning it has not necessarily been solved explicitly for the highest derivative y(n)(t)y^{(n)}(t)y(n)(t).

The function FFF takes n+2n+2n+2 arguments:

t, y(t), y′(t),…,y(n)(t).t,\ y(t),\ y'(t),\ldots,y^{(n)}(t). t, y(t), y′(t),…,y(n)(t).

If FFF accepts all real combinations of these inputs, we write

F:Rn+2→R,F:\mathbb R^{n+2}\to\mathbb R, F:Rn+2→R,

where R\mathbb RR denotes the set of real numbers.

Building an ODE from FFF

Consider the multi-variable expression

F(s,u,p)=s2+2su+p3,F(s,u,p)=s^2+2su+p^3, F(s,u,p)=s2+2su+p3,

where sss, uuu, and ppp serve as placeholders. Assigning these inputs to the variables of an ODE,

s=t,u=y(t),p=y′(t),s=t, \qquad u=y(t), \qquad p=y'(t), s=t,u=y(t),p=y′(t),

produces

F(t,y(t),y′(t))=t2+2t y(t)+(y′(t))3.F\bigl(t,y(t),y'(t)\bigr) =t^2+2t\,y(t)+\bigl(y'(t)\bigr)^3. F(t,y(t),y′(t))=t2+2ty(t)+(y′(t))3.

Setting F=0F=0F=0 yields

t2+2t y(t)+(y′(t))3=0.t^2+2t\,y(t)+\bigl(y'(t)\bigr)^3=0. t2+2ty(t)+(y′(t))3=0.

Because the highest derivative appearing is y′y'y′ (even though it is raised to the third power), this is an implicit first-order ODE.

What counts as a solution?

Let I=(a,b)I=(a,b)I=(a,b) be an open interval of real numbers strictly between aaa and bbb. The notation y:I→Ry:I\to\mathbb Ry:I→R indicates that yyy is a real-valued function defined on III.

A function y:I→Ry:I\to\mathbb Ry:I→R is a solution of

F(t,y(t),y′(t),…,y(n)(t))=0F\bigl(t,y(t),y'(t),\ldots,y^{(n)}(t)\bigr)=0 F(t,y(t),y′(t),…,y(n)(t))=0

on the interval III if:

  1. yyy possesses all derivatives up to order nnn on III; and
  2. substituting y(t)y(t)y(t) and its derivatives satisfies the equation for every t∈It\in It∈I (where ∈\in∈ means “is an element of”).

Checking a proposed solution

To verify whether a candidate function solves an ODE, follow three steps: differentiate, substitute, and simplify.

Consider the equation

y′′(t)+y(t)=0.y''(t)+y(t)=0. y′′(t)+y(t)=0.

To test whether y(t)=cos⁡ty(t)=\cos ty(t)=cost is a solution, compute its first two derivatives:

y′(t)=−sin⁡t,y′′(t)=−cos⁡t.y'(t)=-\sin t, \qquad y''(t)=-\cos t. y′(t)=−sint,y′′(t)=−cost.

Substitute y(t)y(t)y(t) and y′′(t)y''(t)y′′(t) into the left side of the differential equation:

y′′(t)+y(t)=−cos⁡t+cos⁡t=0.y''(t)+y(t) =-\cos t+\cos t =0. y′′(t)+y(t)=−cost+cost=0.

The equation holds for every real number ttt, confirming that y(t)=cos⁡ty(t)=\cos ty(t)=cost is a solution on R\mathbb RR.

Linear and nonlinear ODEs

An ODE is linear if the unknown function and its derivatives:

  • appear only to the first power;
  • are never multiplied together; and
  • are never composed inside nonlinear functions (such as sine, exponential, or square root).

The coefficients in front of the unknown function and its derivatives may vary with the independent variable. An nnnth-order linear ODE with coefficient functions a0(t),…,an(t)a_0(t),\ldots,a_n(t)a0​(t),…,an​(t) and source term h(t)h(t)h(t) has the general form

a0(t)y(n)(t)+a1(t)y(n−1)(t)+⋯+an(t)y(t)=h(t).a_0(t)y^{(n)}(t) +a_1(t)y^{(n-1)}(t) +\cdots +a_n(t)y(t) =h(t). a0​(t)y(n)(t)+a1​(t)y(n−1)(t)+⋯+an​(t)y(t)=h(t).

A linear example

The second-order equation

ty′′(t)+cos⁡(t)y′(t)+t3y(t)=sin⁡tty''(t)+\cos(t)y'(t)+t^3y(t)=\sin t ty′′(t)+cos(t)y′(t)+t3y(t)=sint

is linear because y′′y''y′′, y′y'y′, and yyy appear purely to the first power and are multiplied only by functions of ttt. Matching it to the general form:

n=2,a0(t)=t,a1(t)=cos⁡t,a2(t)=t3,h(t)=sin⁡t.n=2, \qquad a_0(t)=t, \qquad a_1(t)=\cos t, \qquad a_2(t)=t^3, \qquad h(t)=\sin t. n=2,a0​(t)=t,a1​(t)=cost,a2​(t)=t3,h(t)=sint.

A nonlinear example

The first-order equation

y′(t)+(y(t))2=sin⁡ty'(t)+\bigl(y(t)\bigr)^2=\sin t y′(t)+(y(t))2=sint

is nonlinear because the unknown function y(t)y(t)y(t) is squared.

General solutions

A general solution is a formula representing the entire collection of solutions to an ODE, parameterized by one or more arbitrary constants.

For example, the general real-valued solution to

y′(t)=2y(t)y'(t)=2y(t) y′(t)=2y(t)

is

y(t)=ke2t,k∈R.y(t)=ke^{2t},\qquad k\in\mathbb R. y(t)=ke2t,k∈R.

We can verify this family by differentiating:

y′(t)=2ke2t=2y(t).y'(t)=2ke^{2t}=2y(t). y′(t)=2ke2t=2y(t).

Every choice of k∈Rk\in\mathbb Rk∈R yields a distinct valid solution curve:

  • k>0k>0k>0 gives an exponentially growing positive curve;
  • k=0k=0k=0 gives the constant zero solution;
  • k<0k<0k<0 gives a negative exponential curve whose magnitude grows.

Without an auxiliary condition specifying the value of yyy at a particular time, this ODE has infinitely many solutions.

Scalar equations and systems

A scalar ODE contains a single unknown function that outputs one real number for each input.

A system of ODEs contains multiple differential equations involving several unknown functions that must be satisfied simultaneously. When each equation contains terms involving the other unknown functions, the system is coupled. For example,

{x′(t)=x(t)y(t)+cos⁡t,y′(t)=x(t)+(y(t))2\begin{cases} x'(t)=x(t)y(t)+\cos t,\\ y'(t)=x(t)+\bigl(y(t)\bigr)^2 \end{cases} {x′(t)=x(t)y(t)+cost,y′(t)=x(t)+(y(t))2​

is a coupled system for the two unknown functions x(t)x(t)x(t) and y(t)y(t)y(t).

Autonomous and non-autonomous ODEs

An ODE is autonomous if the independent variable does not appear explicitly in the equation itself. For example, assuming rrr, ggg, γ\gammaγ, and mmm are constants, the equations

N′=rN,v′=g−γmv,y′′+y=0N'=rN, \qquad v'=g-\frac{\gamma}{m}v, \qquad y''+y=0 N′=rN,v′=g−mγ​v,y′′+y=0

are all autonomous. While their solutions depend on time, time ttt does not appear explicitly in the equations.

An ODE is non-autonomous if the independent variable appears explicitly. For instance,

t2y′(t)+cos⁡(t)y(t)=0t^2y'(t)+\cos(t)y(t)=0 t2y′(t)+cos(t)y(t)=0

is non-autonomous because ttt enters directly through t2t^2t2 and cos⁡t\cos tcost.

Source: https://notes.ohevan.com/notes/ode/01-introduction-to-odes

© 2026 Evan Luo. All rights reserved.

Back to Ordinary Differential Equations

0 reads

·Last edited 3 days ago
  • newsletter

  • about me

  • sponsor

© 2026 Evan Luo. All rights reserved.