Ordinary Differential Equations for Engineers

§1 Introduction to Differential Equations

Differential equations, mathematical models, order, solutions, linearity, systems, and autonomous equations.

A differential equation, or DE, is an equation involving an unknown function and one or more of its derivatives. Instead of solving for a number, we are looking for a function whose derivatives satisfy the equation.

For example, let tt be the independent variable, let N(t)N(t) be the unknown function, and let rr be a constant. The prime means differentiation with respect to tt:

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

Now consider the differential equation

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

It says that the rate of change N(t)N'(t) is proportional to the current value N(t)N(t).

Differential equations as models

Differential equations are useful because many physical rules describe how something changes rather than giving its value directly.

Example: a falling object

Let v(t)v(t) be the downward velocity of an object at time tt. Let mm be the object's mass, gg the acceleration due to gravity, and γ\gamma the drag coefficient. Newton's second law says

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

Since acceleration is v(t)v'(t), the left side is mv(t)mv'(t). If downward is positive, gravity contributes mgmg, while drag acts upward with magnitude γv(t)\gamma v(t). Therefore,

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

The equation balances two effects: gravity speeds up the fall, while drag opposes the motion.

Example: population growth

Let N(t)N(t) be the size of a population at time tt. In an idealized environment with unlimited resources, assume that the population's rate of change is proportional to its current size. If rr is the proportionality constant, then

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

For a positive population, divide by N(t)N(t) and use the chain rule. Here, ln\ln is the natural logarithm:

N(t)N(t)=r,ddtlnN(t)=r.\frac{N'(t)}{N(t)}=r, \qquad \frac{d}{dt}\ln N(t)=r.

Integrating with respect to tt introduces a constant of integration, which we call CC:

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

Exponentiating both sides,

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

If we write k=eCk=e^C, then

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

The constant kk is the initial population because

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

Different values of kk give different solutions. For a population model, k>0k>0. The sign of rr determines what happens over time:

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

The unlimited-resource assumption is only an idealization. It is useful over limited time periods, but real populations cannot grow exponentially forever.

Ordinary and partial differential equations

An ordinary differential equation, or ODE, uses derivatives with respect to one independent variable. These are all ODEs:

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

A partial differential equation, or PDE, involves partial derivatives of a function that depends on more than one independent variable. A partial derivative uses the symbol \partial and measures change with respect to one variable while the others are held fixed.

For example, let u(x,t)u(x,t) represent temperature at position xx and time tt. The one-dimensional heat equation can be written as

ut=2ux2.\frac{\partial u}{\partial t} = \frac{\partial^2u}{\partial x^2}.

The unknown function u(x,t)u(x,t) depends on two independent variables, xx and tt.

The order of an ODE

The order of an ODE is the number of times the unknown function is differentiated in the highest derivative that appears.

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

The exponent on yy does not determine the order. For example, the y2y^2 term in the last equation makes the equation nonlinear, but it does not make it second order. The fourth derivative y(4)y^{(4)} determines the order.

The independent variable is often omitted when it is clear from context. For example,

y(4)+y+y2=0y^{(4)}+y''+y^2=0

is shorthand for an equation involving y(t)y(t), y(t)y''(t), and y(4)(t)y^{(4)}(t).

For any positive integer kk, the notation

y(k)(t)=dkydtk(t)y^{(k)}(t)=\frac{d^ky}{dt^k}(t)

means the kkth derivative of yy with respect to tt.

A general form for an ODE

Let FF be a function that combines the independent variable, the unknown function, and its derivatives up to order nn. An nnth-order ODE can be written implicitly as

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

The function FF returns a real number. The symbol R\mathbb R means the set of real numbers. In symbols,

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

There are n+2n+2 inputs because they are

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

Example: building an ODE from FF

Suppose

F(x,y,z)=x2+2xy+z3.F(x,y,z)=x^2+2xy+z^3.

Substituting x=tx=t, y=y(t)y=y(t), and z=y(t)z=y'(t) gives

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

Therefore,

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

is an implicit first-order ODE. It is first order because yy' is the highest derivative present, even though yy' is cubed.

What counts as a solution?

Let I=(a,b)I=(a,b) be the open interval of values strictly between aa and bb. The notation y:IRy:I\to\mathbb R says that yy takes an input from II and returns a real number. The symbol \in means “is an element of,” so tIt\in I means that tt belongs to the interval II.

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

on II is a function y:IRy:I\to\mathbb R that has all the derivatives needed by the equation and makes the equation true for every tIt\in I.

Example: checking a proposed solution

Consider

y+y=0.y''+y=0.

To check whether y(t)=costy(t)=\cos t is a solution, differentiate it:

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

Now substitute into the ODE:

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

The equation is true for every real tt, so y(t)=costy(t)=\cos t is a solution on R\mathbb R.

Linear and nonlinear ODEs

An nnth-order ODE is linear when yy and its derivatives appear only to the first power, are not multiplied together, and are not placed inside nonlinear functions. Its coefficients may depend on the independent variable tt.

Let a0(t),a1(t),,an(t)a_0(t),a_1(t),\ldots,a_n(t) be coefficient functions, and let h(t)h(t) be the right-hand side. A general nnth-order linear ODE has the form

a0(t)y(n)(t)+a1(t)y(n1)(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),

The coefficients and the right-hand side may all depend on tt without making the equation nonlinear.

Example: a linear ODE

ty(t)+cos(t)y(t)+t3y(t)=sintty''(t)+\cos(t)y'(t)+t^3y(t)=\sin t

is a second-order linear ODE. Matching it to the general form gives

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

Example: a nonlinear ODE

y(t)+(y(t))2=sinty'(t)+\bigl(y(t)\bigr)^2=\sin t

is nonlinear because y(t)y(t) is squared. The equation is still first order because yy' is its highest derivative.

General solutions

A general solution is a family containing all the solutions of an ODE under consideration. The members of the family are distinguished by one or more arbitrary constants.

For example, the general real-valued solution of

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

is

Since R\mathbb R is the set of real numbers, we write the arbitrary constant as

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

This says that kk may be any real number.

We can verify this directly:

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

Every real value of kk gives a solution:

  • k>0k>0 gives a positive exponential curve;
  • k=0k=0 gives the zero solution;
  • k<0k<0 gives a negative exponential curve.

Without an additional condition, such as a known value of yy at one time, the ODE therefore has infinitely many solutions.

Scalar equations and systems

A scalar ODE has one unknown scalar-valued function. A system of ODEs is a collection of differential equations that must be satisfied together, usually involving several unknown functions.

For example, let x(t)x(t) and y(t)y(t) be two unknown functions. Then

{x(t)=x(t)y(t)+cost,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}

is a system for the two unknown functions x(t)x(t) and y(t)y(t). The equations are coupled because each one depends on the other unknown function.

Autonomous and non-autonomous ODEs

An ODE is autonomous when the independent variable does not appear explicitly in the equation. For example,

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

are autonomous when rr, gg, γ\gamma, and mm are constants. Their solutions still depend on time; autonomous only means that time does not appear explicitly in the equation itself.

An ODE is non-autonomous when the independent variable does appear explicitly. For example,

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

is non-autonomous because tt appears in t2t^2 and cost\cos t.

Back to Ordinary Differential Equations for Engineers