Unit 9, lesson 115

Differential Equations and Initial-Value Problems

What a differential equation and its solutions are, how to check a proposed solution, and why a starting value and an interval are part of the answer.

  • Theory part 229
  • Practice part 230
  • Equations and Solutions

A cup of tea cools faster when it is much hotter than the room. That sentence is a statement about a rate of change, not about the temperature itself, and turning it into a formula for the temperature means solving a differential equation. Most laws of physics, biology and finance arrive in this form, as rules for how a quantity changes.

Key terms

Ordinary differential equation

Definition An ordinary differential equation is an equation

F(x,y,y′,y′′,…,y(n))=0F\left(x, y, y', y'', \ldots, y^{(n)}\right) = 0

that relates an unknown function y=y(x)y = y(x) of a single real variable xx to some of its derivatives. Equations involving partial derivatives of a function of several variables are partial differential equations and are not considered here.

In plain words The unknown is a whole function, and the equation tells you how that function and its derivatives are tied together at every point.

Example The equations y′=3yy' = 3y, y′′+y=0y'' + y = 0 and

dPdt=0.02P(1−P500)\frac{dP}{dt} = 0.02P\left(1 - \frac{P}{500}\right)

are ordinary differential equations. In the last one the independent variable is tt and the unknown function is P(t)P(t).

Order

Definition The order of a differential equation is the order of the highest derivative of the unknown function that appears in it.

In plain words Look for the most primes, or the largest number on top in dnydxn\frac{d^n y}{dx^n}.

Example The equation y′′+x3y′=sin⁡xy'' + x^3 y' = \sin x has order 22. The equation (y′)4=y+x(y')^4 = y + x has order 11, because the power of a derivative does not count, only how many times yy was differentiated.

Explicit and implicit solutions

Definition An explicit solution of an equation of order nn on an interval II is a function y=φ(x)y = \varphi(x) that is nn times differentiable on II and turns the equation into an identity for every xx in II. A relation G(x,y)=0G(x, y) = 0 is an implicit solution on II if it defines at least one function y=φ(x)y = \varphi(x) on II that is an explicit solution there.

In plain words An explicit solution is a formula y=…y = \ldots. An implicit one is an equation connecting xx and yy whose pieces you could, at least in principle, solve for yy.

Example The relation x2+y2=25x^2 + y^2 = 25 is an implicit solution of y′=−xyy' = -\frac{x}{y} on (−5,5)(-5, 5). Differentiating gives 2x+2yy′=02x + 2yy' = 0, so y′=−xyy' = -\frac{x}{y} wherever y≠0y \neq 0. The explicit solution it contains on the upper half is φ(x)=25−x2\varphi(x) = \sqrt{25 - x^2} on (−5,5)(-5, 5). The endpoints are excluded because φ\varphi is not differentiable there.

General and particular solutions

Definition A general solution of an equation of order nn is a family of solutions depending on nn arbitrary constants, such that every solution of the equation (on the region under study) is obtained by some choice of the constants. A particular solution is one specific solution, with no arbitrary constants. A solution that is not obtained from a given family for any choice of the constants is called a singular solution of that family.

In plain words The general solution is the whole collection of answers. A particular solution is one member you pick out, usually by a starting value.

Example Every solution of y′=2xy' = 2x on R\mathbb{R} has the form y=x2+Cy = x^2 + C, because two antiderivatives differ by a constant. So this is the general solution, and y=x2−4y = x^2 - 4 is a particular solution. A warning comes from y′=−y2y' = -y^2. The family y=1x+Cy = \frac{1}{x + C} solves it, yet the constant function y=0y = 0 also solves it and is not of that form for any CC.

Verifying a solution

Definition To verify that φ\varphi solves an equation on an interval II, check that φ\varphi is defined and differentiable enough times on II, compute its derivatives, substitute them into the equation and confirm that both sides agree for every xx in II.

In plain words You never need to solve an equation to check an answer. Plug it in and simplify.

Example Check that y=Ce−x+x−1y = Ce^{-x} + x - 1 solves y′+y=xy' + y = x on R\mathbb{R} for every constant CC. Here y′=−Ce−x+1y' = -Ce^{-x} + 1, so

y′+y=−Ce−x+1+Ce−x+x−1=x.y' + y = -Ce^{-x} + 1 + Ce^{-x} + x - 1 = x.

Initial-value problem

Definition A first order initial-value problem is

y′=f(x,y),y(x0)=y0.y' = f(x, y), \qquad y(x_0) = y_0.

A solution is a differentiable function yy on an open interval II containing x0x_0 with y(x0)=y0y(x_0) = y_0 and y′(x)=f(x,y(x))y'(x) = f(x, y(x)) for every xx in II. For an equation of order nn the initial conditions prescribe y(x0),y′(x0),…,y(n−1)(x0)y(x_0), y'(x_0), \ldots, y^{(n-1)}(x_0).

In plain words The equation says how the quantity changes, and the initial condition says where it starts. Together they usually pin down one function.

Example Solve y′+y=xy' + y = x, y(0)=3y(0) = 3. From the general solution above, y(0)=C−1=3y(0) = C - 1 = 3, so C=4C = 4 and y=4e−x+x−1y = 4e^{-x} + x - 1.

Interval of existence

Definition The interval of existence of a solution of an initial-value problem is the largest open interval containing x0x_0 on which a solution is defined and satisfies the equation. A formula may make sense on a bigger set, but the solution lives only on the interval that contains x0x_0.

In plain words A solution cannot jump across a point where it blows up or stops being differentiable. It stays on the piece of the line where it started.

Example The problem y′=y2y' = y^2, y(0)=1y(0) = 1 has the solution y=11−xy = \frac{1}{1 - x}. Check this with y′=1(1−x)2=y2y' = \frac{1}{(1 - x)^2} = y^2. The formula is defined for all x≠1x \neq 1, but the interval of existence is (−∞,1)(-\infty, 1), because the graph goes to infinity at x=1x = 1. The equation itself looks harmless everywhere, so blowing up is something the solution does, not the equation.

Equivalent integral equation

Definition Let ff be continuous on an open set containing (x0,y0)(x_0, y_0). A continuous function yy on an interval II containing x0x_0, whose graph stays in that set, solves the initial-value problem y′=f(x,y)y' = f(x, y), y(x0)=y0y(x_0) = y_0 on II if and only if

y(x)=y0+∫x0xf(t,y(t))dtfor every x in I.y(x) = y_0 + \int_{x_0}^{x} f\left(t, y(t)\right)dt \qquad \text{for every } x \text{ in } I.

This follows from the fundamental theorem of calculus in both directions.

In plain words The derivative form and the integral form say the same thing. The integral form has the starting value built in, which is why existence proofs and many numerical methods start from it.

Example For y′=2xyy' = 2xy, y(0)=1y(0) = 1, the candidate y=ex2y = e^{x^2} satisfies

1+∫0x2tet2 dt=1+(ex2−1)=ex2,1 + \int_0^x 2t e^{t^2}\,dt = 1 + \left(e^{x^2} - 1\right) = e^{x^2},

so it solves the problem on R\mathbb{R}.

Check yourself

  1. Give the order of y′′′−4y′=exy''' - 4y' = e^x and of (dydx)2=x\left(\frac{dy}{dx}\right)^2 = x.
Show the answer

The first has order 33 and the second has order 11. Only the highest derivative counts, not its power.

  1. Show that y=sin⁡(2x)y = \sin(2x) solves y′′+4y=0y'' + 4y = 0.
Show the answer

The second derivative is y′′=−4sin⁡(2x)y'' = -4\sin(2x), so

y′′+4y=−4sin⁡(2x)+4sin⁡(2x)=0y'' + 4y = -4\sin(2x) + 4\sin(2x) = 0

for every xx.

  1. Solve y′=y2y' = y^2, y(0)=−1y(0) = -1 using the family y=1C−xy = \frac{1}{C - x}, and give the interval of existence.
Show the answer

The condition y(0)=1C=−1y(0) = \frac{1}{C} = -1 gives C=−1C = -1, so y=−11+xy = -\frac{1}{1 + x}. It blows up at x=−1x = -1, and the interval containing 00 is (−1,∞)(-1, \infty).

How this lesson connects

It also uses functions and initial conditions.