You are on page 1of 42

CHAPTER 2

First-Order Di↵erential Equations

1. Introduction: Motion of a Falling Body

Problem. An object falls through the air toward earth. Assuming that the
only forces acting on the object are gravity and air resistance, determine the
velocity of the object as a function of time.

With F the total force on the object, m the mass and v the velocity of the
dv
object, gives the acceleartion of the object. By Newton’s second law,
dt
dv
m = F.
dt
Here we will assume v is positive when it is directed downward. Also, near the
Earth’s surface, the force due to gravity is mg where g is the acceleration due to
gravity. Air resistance, which is proportional to velocity, is given by bv where
b is a positive constant depending on the density of the air and the shape of
the object. The negative sign is since the air resistance acts opposite to gravity.
Thus we have the first order DE
dv
m = mg bv.
dt
We solve this equation using separation of variables, treating dv and dt as dif-
ferentials. Assuming m 6= 0 and mg bv 6= 0, we can get
dv dt
=
mg bv m

17
18 2. FIRST-ORDER DIFFERENTIAL EQUATIONS

Integrating,
Z Z
dv dt
= + c.
mg bv m
We always add the constant at the integration step. Noting
Z Z
dv 1 b
= dv,
mg bv b mg bv
so the numerator of the integrand is the derivative of the denominator, we get
1 t bt
ln|mg bv| = + c =) ln|mg bv| = bc =)
b m m
bt bt
|mg bv| = e m e bc =) mg bv = ±e bce m =)
bt
mg bv = Ae m (A 6= 0).
Solving for v,
mg A bt
(⇤) v= e m,
b b
a general solution to the DE. For a specific solution, we solve the IVP
dv
m = mg bv, v(0) = v0,
dt
1. INTRODUCTION: MOTION OF A FALLING BODY 19

where v0 is the initial velocity. From (⇤),


✓ ◆
mg mg bt
A = v0b + mg =) v = + v0 e m.
b b
bt mg
Since b > 0, lim e m = 0 =) lim v = .
t!1 t!1 b
mg
The constant is referred to as the limiting or terminal velocity of the object.
b
This can be seen in the graph below.

The simplest 1st-order equations are of the form


dy
= f (x).
dx
For these, Z
y(x) = f (x) dx + C
are solutions.
We shall expect all students know the Standard Integral Forms and Formulas
on the handout provided.
20 2. FIRST-ORDER DIFFERENTIAL EQUATIONS

Example.
dy 5x + 6
(1) =
dx x2 + 4
Z
5x + 6
y= dx =
x2 + 4
Z Z
5x 6
dx + dx =
x2 + 4 x2 + 4
Z Z
5 2x 12 x=2u
dx + du =
2 x2 + 4 4u2 + 4
dx=2du
Z Z
5 2x 1
dx + 3 du =
2 x2 + 4 u2 + 1
5
ln(x2 + 4) + 3 arctan u + C =
2
5 ⇣x⌘
2
ln(x + 4) + 3 arctan +C
2 2
dy 1
(2) =p
dx 1 4x2
Z
1
y= p dx =
1 4x2
Z
1 1 u=2x
p du =
2 1 u2
du=2dx
1
arcsin u + C =
2
1
arcsin(2x) + C
2
1. INTRODUCTION: MOTION OF A FALLING BODY 21

dy
(3) = xe5x
dx Z
y= xe5x dx =
Z Z
u dv = uv v du (integration by parts)

u= dv =

du = v=

u=x dv = e5x dx

du = dx v = 15 e5x
Z
x 5x 1
e e5x dx =
5 5
x 5x 1 5x
e e +C =
5 25
e5x
(5x 1) + C
25
In choosing which function to use for u, one can use LIATE:
L = log
I = inverse trig
A = algebraic
T = trig
E = exponential
22 2. FIRST-ORDER DIFFERENTIAL EQUATIONS

dx 3t
(4) =e sin 5t
dt Z
3t
x= e sin 5t dt =
3t
u = sin 5t dv = e dt

du = 5 cos 5t dt v = 13 e 3t
Z
1 3t 5
e sin 5t + e 3t cos 5t dt =
3 3
3t
u = cos 5t dv = e dt

du = 5 sin 5t dt v = 13 e 3t
Z
1 3t 5 h 1 3t 5 3t
i
e sin 5t + e cos 5t e sin 5t dt =)
3 3 3 3
Z
34 3t 1 3th 5 i
e sin 5t dt = e sin 5t + cos 5t =)
9 3 3
Z
3t 3 3th 5 i
e sin 5t dt = e sin 5t + cos 5t + C
34 3
1. INTRODUCTION: MOTION OF A FALLING BODY 23

Tabular approach to integration by parts:


(4)
Z
3t
x= e sin 5t dt =
3t
sin 5t e
+
&
1 3t
5 cos 5t 3e

&
+ 1 3t
25 sin 5t 9e
Z
1 3t 5 3t 25 3t
e sin 5t e cos 5t e sin 5t dt
3 9 9
Then continue as above.
(3)
Z
y= xe5x dx =

x e5x
+
&
1 5x
1 5e

&
+ 1 5x
0 25 e
Z
1 5x 1 5x
xe e + 0 dx
5 25
Again, continue as above.
24 2. FIRST-ORDER DIFFERENTIAL EQUATIONS

dy 2x3 2x2 65x 107


(5) =
dx x2 5x 14
Z
2x3 2x2 65x 107
y= dx =
x2 5x 14

Z Z
3x + 5
(2x + 8) dx + dx =
(x 7)(x + 2)
————————————————————
3x + 5 A B
= +
(x 7)(x + 2) x 7 x + 2
3x + 5 = A(x + 2) + B(x 7)
26
A+B =3 A=
9
1
2A 7B = 5 B=
9
7A + 7B = 21
——————–
9A=26
————————————————————
Z Z
26 dx 1 dx
x2 + 8x + + =
9 x 7 9 x+2
26 1
x2 + 8x + ln|x 7| + ln|x + 2| + C
9 9
1. INTRODUCTION: MOTION OF A FALLING BODY 25

dy x3 5x2 + 10x 9
(6) =
dx (x 2)2(x2 3x + 1)
Z
x3 5x2 + 10x 9
y= dx =
(x 2)2(x2 3x + 1)
————————————————————
3
x 5x2 + 10x 9 A B Cx + D
= + +
(x 2)2(x2 3x + 1) x 2 (x 2)2 x2 3x + 1

x3 5x2 + 10x 9=
A(x 2)(x2 3x + 1) + B(x2 3x + 1) + (Cx + D)(x 2)2 =
Ax3 5Ax2 +7Ax 2A+Bx2 3Bx+B+Cx3 4Cx2 +Dx2 +4Cx 4Dx+4D
A+C =1 A= 1
5A + B 4C + D = 5 B=1
7A 3B + 4C 4D = 10 C=2
2A + B + 4D = 9 D= 3
Ax + B A B
What about x2 in the denominator? Can use either or + .
x2 x x2
Z————————————————————
Z Z
dx 1 2x 3
+ dx + dx =
x 2 (x 2)2 x2 3x + 1
ln|x 2|
Z
u=x-2 2
+ u du + ln x2 3x + 1 =
du=dx

2 1 x2 3x + 1 1
ln x 3x + 1 ln|x 2| + C = ln +C
x 2 x 2 x 2
26 2. FIRST-ORDER DIFFERENTIAL EQUATIONS

dy 5
(7) = 2
dx x + 6x + 10
Z
5
y= dx =
x2 + 6x + 10
Z Z
5 1
dx = 5 dx =
(x2 + 6x + 9) + 1 (x + 3)2 + 1
Z
u=x+3 1
5 du =
u2 + 1
du=dx
5 arctan u + C = 5 arctan(x + 3) + C
(8) The familiar (I hope) identities
1 sin2 ✓ = cos2 ✓, 1 + tan2 ✓ = sec2 ✓, sec2 ✓ 1 = tan2 ✓
are used in simplifying algebraic expressions in integrals by trigonometric
substitution. The three substitutions used:
p
2 x2, set x = a sin ✓
(I) pa
(II) pa2 + x2, set x = a tan ✓
(III) x2 a2, set x = a sec ✓
1. INTRODUCTION: MOTION OF A FALLING BODY 27

dy x2
=p
dx x2 16 Z
x2
y= p dx =
x2 16

x
√(x2 -16)

4 x = 4 sec ✓, dx = 4 sec ✓ tan ✓d✓


p p p
x2 16 = 16 sec ✓ 16 = 4 sec2 ✓ 1 = 4 tan ✓
2

Z Z
16 sec2 ✓
(4 sec ✓ tan ✓)d✓ = 16 sec3 ✓ d✓ =
4 tan ✓

sec ✓ sec2 ✓
+
&
sec ✓ tan ✓ tan ✓
✓ Z ◆
16 sec ✓ tan ✓ sec ✓ tan2 ✓ d✓ =
✓ Z ◆
16 sec ✓ tan ✓ sec ✓(sec2 ✓ 1) d✓ =
✓ Z ◆
16 sec ✓ tan ✓ (sec3 ✓ sec ✓) d✓ =
Z Z
16 sec ✓ tan ✓ 16 sec3 ✓ d✓ + 16 sec ✓ d✓ =)
Z
32 sec3 ✓ d✓ = 16 sec ✓ tan ✓ + 16 ln|sec ✓ + tan ✓| =)
28 2. FIRST-ORDER DIFFERENTIAL EQUATIONS

y = 8 sec ✓ tan ✓ + 8 ln|sec ✓ + tan ✓| =)

x
√(x2 -16)

4
p p
x x2 16 x x2 16
y =8· · + 8 ln + =)
4 4 4 4
p p
x x2 16 x x2 16
y= + 8 ln + +C
2 4 4
Maple. See integration.mw or integration.pdf.
2. SEPARABLE EQUATIONS 29

2. Separable Equations
Definition (1 — Separable Equation). A first-order di↵erential equation
dy
= f (x, y)
dx
is said to be separable if
f (x, y) = g(x) · p(y),
where g depends only on x and p depends only on y.
Example.
dy x 5 1
(1) = = (x 5) · , so this equation is separable. To solve,
dx y2 y2
Z Z
y 2 dy = (x 5) dx =) y 2 dy = (x 5) dx + K =)

y 3 x2 3
= 5x + K =) y 3 = x2 15x + 3K =)
|3 2 {z } 2
implicit solution
h3 i1/3 h3 i1/3
2 2
y= x 15x + 3K =) y = x 15x + C .
2 | 2 {z }
explicit solution

You can graph this solution on a calculator for various values of C. To check
that y is the solution,
dy 1 h 3 2 i 2/3
= x 15x + C (3x 15)
dx 3 2
x 5 x 5
= h⇣ ⌘1/3i2 = 2
.
3 2 y
2x 15x + 3K

dy
(2) = 1 + xy
dx
is not separable.
30 2. FIRST-ORDER DIFFERENTIAL EQUATIONS

dy y 1 1
(3) = = · (y 1)
dx x + 3 x + 3
dy
(a) y 1 = 0 =) = 0 =)
dx
y = 1 is a constant solution.
(b) For y 6= 1, we can divide by y 1, so
Z Z
dy dx dy dx
= =) = + K =)
y 1 x+3 y 1 x+3
ln|y 1| = ln|x + 3| + K (an implicit solution) =)
eln|y 1| = eln|x+3|+K = eln|x+3|eK =)
|y 1| = |x + 3| · K1 (K1 > 0) =)
y 1 = ±K1(x + 3) =)
y 1 = C(x + 3) (C 6= 0) =)
y = 1 + C(x + 3).
We can put (a) and (b) together here to get
y = 1 + C(x + 3) (C 2 R)
as a general solution. This latter step may not always be able to be done.
2. SEPARABLE EQUATIONS 31

dy 6x5 2x + 1 1
(4) = y
= (6x5 2x + 1) · . We have
dx cos y + e cos y + ey
(cos y + ey ) dy = (6x5 2x + 1) dx.
Then Z Z
(cos y + ey ) dy = (6x5 2x + 1) dx + K =)
y 6 2
| y + e = x{z x + x + K}
sin
implicit solution
We check using implicit di↵erentiation:
(cos y)y 0 + ey y 0 = 6x5 2x + 1 =)
y 0(cos y + ey ) = 6x5 2x + 1 =)
dy 0 6x5 2x + 1
=y =
dx cos y + ey

Indefinite Integral Convention for Di↵erential Equations


Z
The indefinite integral g(x) dx represernts any (single) antiderivative of g(x).
In other words, it means any function G(x) with the derivative
d
G(x) = g(x).
dx
32 2. FIRST-ORDER DIFFERENTIAL EQUATIONS

Why Separation of Variables works


Assume g(x) and h(y) are continuous functions, that
dy
= g(x) · h(y),
dx
and that h(y) 6= 0 on the interval where the solution is sought. Then
1 dy
= g(x).
h(y) dx
Let
1
r(y) = =)
h(y)
dy
(#) r(y) = g(x).
dx
Let Z
dR
R(y) = r(y) dy =) = r(y)
dy
and Z
dG
G(x) = g(x) dx =) = g(x).
dx
Then, from (#),
dR dy dG
· = =) (from the chain rule)
dy dx dx
dh i d
R y(x) = G(x) =)
dx dx
R(y) = G(x) + C =)
Z Z
r(y) dy = g(x) dx + C,

an implicit solution. If possible, we then get an explicit solution by solving for


y in terms of x.
2. SEPARABLE EQUATIONS 33

Example (An initial value problem (IVP)). In an IVP, besides the di↵er-
ential equation, we are given an initial condition that allows us to find a specific
solution rather than a general solution with a constant of integration.
dy
= 8x3e 2y , y(0) = 0
dx
Because of the initial condition, the only possible constant solution is y = 0,
but that is not a solution here. If it were, we would be done since there is only
a single solution to an IVP. We have
Z Z
e2y dy = 8x3 dx =) e2y dy = 8x3 dx + K =)
1 2y
e = 2x4 + K =) e2y = 4x4 + 2K =)
2
ln e2y = ln(4x4 + 2K) =) 2y = ln(4x4 + C) =)
1
y = ln(4x4 + C)
2
This is the general solution. Then
1
y(0) = ln C = 0 =)
2
ln C = 0 =)
C=1
Thus the solution to the IVP is
1 4
p
y = ln(4x + 1) = ln 4x4 + 1
2
34 2. FIRST-ORDER DIFFERENTIAL EQUATIONS

Example (Using definite integration to solve an IVP).


dy
= 8x3e 2y , y(0) = 0
dx
As before, we have
e2y dy = 8x3 dx.
We use Z y Z x
e2r dr = 8s3 ds.
0 0
Since x and y become the upper limits of integration here, we use r and s as
dummy variables for the integrals. The initial condition says
x = 0 =) y = 0.
The value of x from the initial condition becomes the lower limit of the “x”
integral and the value of y from the initial condition becomes the lower limit of
the “y” integral. Continuing,
1 2r r=y 4
s=x
e = 2s =)
2 r=0 s=0
1 2y 1
e = 2x4 =)
2 2
e2y = 4x4 + 1 =)
2y = ln(4x4 + 1) =)
1 4
p
y = ln(4x + 1) = ln 4x4 + 1
2
Maple. See separable.mw or separable.pdf
2. SEPARABLE EQUATIONS 35

Example. A raindrop is falling through the atmosphere. Aside from the


force of gravity, assume all other forces acting on the raindrop are negligible.
Suppose that the atmosphere is saturated with water vapor and that as a result
of condensation, the mass of the raindrop is increasing at a rate proportional to
its surface area. Assume the raindrop is always spherical and that its density
⇢ remains constant. Let its radius at time t = 0 be r0 and its velocity v0.
(a) Show that the radius of the drop increases linearly with time.
Let V = V (t) = the volume at time t, m = m(t) = the mass at time t.
[To find an equation involving r and t.]
We know
4
m = V ⇢ = ⇡r3⇢.
3
dm
We are given / SA = 4⇡r2 =)
dt
dm
= (4⇡r2), > 0.
dt
Then substituting for m,
d h4 3 i
⇡r ⇢ = 4 ⇡r2 =) (chain rule)
dt 3
dr
4⇡r2⇢ = 4 ⇡r2 =)
dt
dr
= .
dt ⇢

Letting k = > 0,

dr
= k.
dt
Then
r = kt + r0.
36 2. FIRST-ORDER DIFFERENTIAL EQUATIONS

(b) Express the velocity v = v(t) of the raindrop in terms of its radius r.
Let p = p(t) = the momentum of the drop.
By Newton’s 2nd law of motion,
dp
= Fsum
dt
where p = mv and Fsum = ma = mg. Then
dp d
= (mv) = mg =)
dt dt
h
d 4 3 i 4 3 4 d 4 3
⇡r ⇢v = ⇡r ⇢g =) ⇡⇢ (r3v) = ⇡r ⇢g =)
dt 3 3 3 dt 3
d 3
(r v) = r3g.
dt
Now, since r is increasing, r has an inverse, i.e., t is a function of r, so v = v(t)
is also a function of r. Then, from the chain rule,
d 3 dr
(r v) = r3g =) (from previous page)
dr dt
d d g 3
k (r3v) = r3g =) (r3v) = r =)
dr
Z Z ⇣ dr k
d 3 g 3⌘
(r v) dr = r dr + C =)
dr k
3 g r4
rv= · + C.
k 4
At t = 0 (with v0 = v(0)),
gr04 gr04
r03v0 = 3
+ C =) C = r0 v0 + .
4k 4k
Then
g 1⇣ 3 gr04 ⌘ g ⇣ r ⌘3⇣
0 gr0 ⌘
v= r + 3 r0 v0 + =) v = r+ v0 + .
4k r 4k 4k r 4k
3. LINEAR EQUATIONS 37

3. Linear Equations
Definition. A first-order DE is linear if it can be expressed in the form
dy
a1(x) + a0(x)y = b(x)
dx
where a1(x), a0(x), and b(x) are arbitrary functions of x.
Example.
dy
(1) x2 sin x + (cos x)y = sin x =)
dx
dy
sin x (cos x)y = x2 sin x, and this is linear.
dx
dy
(2) y + (sin x)y 3 = ex + 1
dx
is not linear
Two easy cases
dy
(1) a0(x) = 0 =) a1(x) = b(x) =)
dx
dy b(x)
= , a1(x) 6= 0 =)
dx a1(x)
Z
b(x)
y= dx + C.
a1(x)
38 2. FIRST-ORDER DIFFERENTIAL EQUATIONS

(2) a01(x) = a0(x). Then


dy
a1(x) + a01(x)y = b(x) =)
dx
dh i
a1(x)y = b(x) =)
dx Z
a1(x)y = b(x) dx + C =)
Z
1 h i
y= b(x) dx + C .
a1(x)

Suppose a1(x) 6= 0 for all x on some interval. Then


dy a0(x) b(x)
+ y= or
dx a1(x) a1(x)
dy
(⇤) + P (x)y = Q(x),
dx
the standard form of a first-order linear DE.
Is (⇤) separable?
(1) if either P (x) ⌘ 0 or Q(x) ⌘ 0.
(2) if both P (x) and Q(x) are constants.
(3) if P (x) and Q(x) are constant multiples of each other.
3. LINEAR EQUATIONS 39

Simplest case: P (x) ⌘ r (a constant), Q(x) = 0.


y 0 + ry = 0
Multiply through the equation by erx. We call erx an integrating factor. Note
that this factor will never be 0, so no extraneous solutions will be introduced.
erxy 0 + rerxy = 0 =)
d h rx i
e y = 0 =)
dx
erxy = C (we integrated here) =)
rx
y(x) = Ce
We check our solution:
d⇣ rx

Ce + rCe rx = rCe rx
+ rCe rx
=0
dx
Next case: y 0 + ry = Q(x), Q(x) continuous.
We again multiply through by the integrating factor erx.
erxy 0 + rerxy = erxQ(x) =)
d h rx i
e y = erxQ(x) =)
dx Z
erxy = erxQ(x) dx + C =)
"Z #
1
y(x) = erxQ(x) dx + C
erx
40 2. FIRST-ORDER DIFFERENTIAL EQUATIONS

Example.
dy
(1) y = e3x.
dx
Since r = 1, the integrating factor is e x:
e xy 0 e xy = e xe3x =)
dh x i
e y = e2x =)
dx Z
e xy = e2x dx + C =)
1
e xy = e2x + C =)
2
1
y(x) = e3x + Cex
2
dx 4
(2) + 4x = e t, x(0) = .
dt 3
Since r = 4, the integrating factor is e4t:
e4tx0 + 4e4tx = e4te t =)
d h 4t i
e x = e3t =)
dt Z
e4tx = e3t dt + C =)
1
e4tx = e3t + C =)
3
1
x(t) = e t + Ce 4t.
3
1 4
x(0) = + C = =) C = 1 =)
3 3
1 t 4t e 4t ⇣ 3t ⌘ e3t + 3
x(t) = e + e = e +3 =
3 3 3e4t
3. LINEAR EQUATIONS 41

dy
General case: + P (x)y = Q(x), Q(x) continuous.
dx
We need to find an integrating factor µ(x). We multiply the equation by µ(x).
dy
(⇤) µ(x) + µ(x)P (x) y = µ(x)Q(x)
dx | {z }
We want the left-hand side of (⇤) to to be the derivative of some product, i.e.,
we want
d
µ(x) = µ(x)P (x)
dx
or

(#) = µP (x).
dx
But this separable, so
Z Z
dµ dµ
= P (x) dx =) = P (x) dx + K =)
µ µ
Z
ln|µ| = P (x) dx + K =)
R R
P (x) dx+K p(x) dx K
|µ| = e =e e =)
R
P (x) dx
µ = Ce (C 6= 0)
R
P (x) dx
Let µ = e be the integrating factor.
This works because it is a solution of (#). (⇤) then becomes
dh i
(⇤) µ(x)y = µ(x)Q(x) =)
dx Z
µ(x)y = µ(x)Q(x) dx + C =)
"Z #
1
y(x) = µ(x)Q(x) dx + C
µ(x)
42 2. FIRST-ORDER DIFFERENTIAL EQUATIONS

Now suppose P (x) and Q(x) are continuous on (a, b) and a < x0 < b. Also,
suppose y(x0) = y0.
Let Z
W (x) = P (x) dx (a family of functions with W 0(x) = P (x))

and Z x
F (x) = P (s) ds = W (x) W (x0)
x0
for a < x < b. Then
F 0(x) = W 0(x) = P (x) and F (x0) = 0.
So choose Z Z x
P (x) dx = P (s) ds.
x0
Then Rx
µ(x) = e x0 P (s) ds and µ(x0) = e0 = 1.
Then, from (⇤),
Z Z x
dh x i
µ(s)y(s) ds = µ(s)Q(s) ds =)
x0 ds x
Z0 x
µ(x)y(x) µ(x0)y(x0) = µ(s)Q(s) ds =)
x0
"Z #
x
1
y(x) = µ(s)Q(s) ds + y0
µ(x) x0
is the solution.
We have shown:
3. LINEAR EQUATIONS 43

Theorem (1 — Existence and Uniqueness of Solution). Let P (x) and Q(x)


be continuous functions on an interval (a, b) and let x0 be any point in this
interval. Then the initial value problem
dy
+ P (x)y = Q(x), y(x0) = y0
dx
has a unique solution on the interval (a, b).
Example.
1 dy 2y
= x cos x, x > 0. We then have
x dx x2
2
y0 y = x2 cos x.
x
R 2 R dx 2 1
µ = e ( x ) dx = e 2 x = e 2 ln x = eln x = x 2 = 2
x

Then
1 0 2
y y = cos x =)
x2 x3
dh 2 i
x y = cos x =)
dx Z
x 2y = cos x dx + C =)

x 2y = sin x + C =)
y(x) = x2(sin x + C)
We check:
1 dy 2y
=
x dx x2
1⇥ 2

2x(sin x + C) + x cos x 2(sin x + C) =
x
2(sin x + C) + x cos x 2(sin x + C) = x cos x
44 2. FIRST-ORDER DIFFERENTIAL EQUATIONS

Problem (Page 52 # 24a). A rock contains two radioactive isotopes, RA1


and RA2, that belong to the same radioactive series; that is, RA1 decays into
RA2, which then decays into stable atoms. Assume that the rate at which
RA1 decays into RA2 is 50e 10t kg/sec. Because the rate of decay of RA2 is
proportional to the mass y(t) of RA2 present, the rate of change in RA2 is
dy
= rate of creation rate of decay,
dt
dy
= 50e 10t ky,
dt
where k > 0 is the decays constant. If k = 20/sec and initially y(0) = 40 kg,
find the mass y(t) of RA2 for t > 0. The IVP in standard form is then
dy
+ 20y = 50e 10t, y(0) = 40.
dt
R
20 dt
µ=e = e20t.
Then
e20ty 0 + 20e20ty = 50e10t =)
d h 20t ⇤
e y = 50e10t =)
dt Z
e20ty = 50 e10t dt + C =)
⇣1⌘
20t
e y = 50 e10t + C =)
10
y(t) = 5e 10t + Ce 20t.
y(0) = 5 + C = 40 =) C = 35.
Thus
10t 20t
y(t) = 5e + 35e .
3. LINEAR EQUATIONS 45

Example. (1 + t2)x0 + 4tx = (1 + t2) 2, x(0) = 5. Then


4t
x0 + x = (1 + t2 3
) .
1 + t2
R 4t R 2t
dt 2 dt 2 2 2
µ=e 1+t2 =e = e2 ln(1+t ) = eln(1+t ) = (1 + t2)2
1+t2

1
(1 + t2)2x0 + 4t(1 + t2)x = =)
1 + t2
dh 2 2
i 1
(1 + t ) x = 2
=)
dt Z 1 + t
1
(1 + t2)2x = dt + C =)
1 + t2
(1 + t2)2x = arctan t + C =)
arctan t + C
x(t) = .
(1 + t2)2
C
x(0) = = 5 =) C = 5.
1
Thus
arctan t + 5
x(t) = .
(1 + t2)2
46 2. FIRST-ORDER DIFFERENTIAL EQUATIONS

dx
Problem (Page 142 #33). + 2tx = 1, x(0) = 1
dt
R 2
2t dt
µ=e = et
2 2 2
et x0 + 2tet x = et =)
Z
d h t2 i 2 2 2
e x = et =) et x = et dt + C.
dt
Z
2
There is no elementary formula for et dt, so we instead integrate each side
from t0 = 0 to t.
Z Z t
t
d h s2 i 2
e x ds = es ds =)
0 ds 0
t
Z t
s2 2
e x(s) = es ds =)
0 0
Z t
2 2
et x(t) e0 · 1 = es ds =)
0
Z
h t 2 i
t2 s
x(t) = e e ds + 1 =)
0
Z t
2 2 2
x(t) = e t es ds + e t =)
0
Z t Z t
t2 s2 2 2
Dawson(t) = e e ds and erf(t) = es ds
0 ⇡ 0
t2
x(t) = Dawson(t) + e .
Maple. See first order linear.mw or first order linear.pdf
4. EXACT EQUATIONS 47

4. Exact Equations
Maple. See function 2 variable.mw or function 2 variable.pdf

Partial Derivatives
First-order partial derivatives: Consider a function F (x, y) defined on a region
R 2 R2. Let (a, b) be an interior point of R. The average rate of change as
you move horizontally from (a, b) to (a + h, b) is
F (a + h, b) F (a, b)
.
h

The instantaneous rate of change in the x-direction at (a, b) is


@F F (a + h, b) F (a, b)
(a, b) = lim ,
@x h!0 h
the partial derivative of F with respect to x.
48 2. FIRST-ORDER DIFFERENTIAL EQUATIONS

The average rate of change as you move vertically from (a, b) to (a, b + h) is
F (a, b + h) F (a, b)
.
h

The instantaneous rate of change in the y-direction at (a, b) is


@F F (a, b + h) F (a, b)
(a, b) = lim ,
@y h!0 h
the partial derivative of F with respect to y.
Example. Let F (x, y) = x2y 2.
@F F (x + h, y) F (x, y) (x + h)2y 2 x2y 2
(x, y) = lim = lim
@x h!0 h h!0 h
x2y 2 + 2xhy 2 + h2y 2 x2y 2 2xhy 2 + h2y 2
= lim = lim
h!0 h h!0 h
= lim (2xy 2 + hy 2) = 2xy 2.
h!0
Basically, hold y constant and take the derivative with respect to x. We do
@F
similarly for (x, y). Then, for example,
@y
@F
(3, 2) = 2 · 3 · 22 = 24.
@x
4. EXACT EQUATIONS 49

Notation.
@F @⇥ ⇤
(x, y) = Fx(x, y) = F (x, y)
@x
| {z } | {z } @x
| {z }
modern notation
traditional notation partial di↵erential operator
z }| { z }| {
@F z }| { @ ⇥ ⇤
(x, y) = Fy (x, y) = F (x, y)
@y @y
Example.
@ @ ⇣ ⌘
(xy)1/2 1
p
xy (xy)1/2 (xy)1/2
(xe ) = (xe )=e + xe (xy) 1/2(y) =
@x @x 2
⇣1⌘ p p
e xy (2 + xy).
2
Note. 1/2
x ! xy ! (xy)1/2 ! e(xy)
y k 1 z 1/2 k es k
z 2 ez
1/2
z 1/2 k
k
s es
@F ⇣ ⇡ ⌘
Example. F (x, y) = x ln(y cos x). Find ,1 .
@x 3
@F 1
(x, y) = ln(y cos x) + x ( y sin x) = ln(y cos x) x tan x
@x y cos x

Note.
x ! cos x ! y cos x ! ln(y cos x)
sin x sk y k 1 k
ys z
ln(ys)
k
z k
ln z
Thus
@F ⇣ ⇡ ⌘ 1 ⇡p ⇣ ⇡ ⌘
, 1 = ln 3= ln 2 + p .
@x 3 2 3 3
50 2. FIRST-ORDER DIFFERENTIAL EQUATIONS

2nd Order Partial Derivatives


@ @ @F @ 2F
Fxx = Fx = =
@x @x @x @x2
@ @ @F @ 2F
Fxy = Fx = =
@y @y @x @y@x
@ @ @F @ 2F
Fyx = Fy = =
@x @x @y @x@y
@ @ @F @ 2F
Fyy = Fy = =
@y @y @y @y 2
Note. This method also extends to more variables and higher derivatives.
Example. F (x, y) = 3x4y 5 + 8x2 5y + 15
Fx(x, y) = 12x3y 5 + 16x
Fy (x, y) = 15x4y 4 5
Fxx(x, y) = 36x2y 5 + 16
Fxy (x, y) = 60x3y 4
Fyx(x, y) = 60x3y 4
Fyy (x, y) = 60x4y 3
Note. Notice that Fxy = Fyx.
Theorem (8.1). If Fxy and Fyx are continuous at an interior point (a, b)
of their domain, then
Fxy (a, b) = Fyx(a, b).
Maple. See partderiv.mw or partderiv.pdf
4. EXACT EQUATIONS 51

Exact Di↵erential Equations


Suppose we coordinatize a map of the US so each point on the map has an (x, y)
coordinate pair. Then consider the Fahrenheit temperature function F (x, y)
defined at each point of the map for a given time on a given day.

We see that temperature changes continuously and smoothly across the US.
These curves F (x, y) = C, where C = 50, 60, 70, 80, 90 on the graph above,
are called level curves of the graph. For weather maps, these level curves are
called isotherms. Because the level curves are smooth, having tangent lines
(derivatives) at each point, they are actually implicit solutions of di↵erential
equations.
We find the slope of the tangent to a level curve by implicit di↵erentiation.
Assuming y is a function of x, we take the derivative of F (x, y) = C implicitly:
d d
F (x, y) = (C) =)
dx dx
@F @F dy
(⇤) + = 0 =)
@x @y dx
dy @F/@x
(⇤⇤) = , the slope at (x, y).
dx @F/@y
52 2. FIRST-ORDER DIFFERENTIAL EQUATIONS

Multiplying the left-hand side of (⇤) by dx yields the total di↵erential dF :


@F @F
dF := dx + dy or dF := Fx dx + Fy dy.
@x @y
Setting dF = 0 and solving allows us to obtain the equation for the slope
f (x, y) of the level curve F (x, y) = C. Since (⇤⇤) is a di↵erential equation, we
should be able to reverse the logic and easily solve some DE’s. Note that any
dy
first-order DE = f (x, y) can be rewritten in the (di↵erential) form
dx
(#) M (x, y) dx + N (x, y) dy = 0.
If the left-hand side is a total di↵erential
M (x, y) dx + N (x, y) dy = Fx dx + Fy dy = dF (x, y),
then its solutions are given (implicitly) by F (x, y) = C, where C is an arbitrary
constant.
Definition (2 — Exact Di↵erential Form).
The di↵erential form M (x, y) dx + N (x, y) dy is said to be exact in a rectangle
R if there is a function F (x, y) such that
@F @F
(x, y) = M (x, y) and (x, y) = N (x, y)
@x @y
for all (x, y) 2 R. That is, the total di↵erential of F (x, y) satifies
dF = M (x, y) dx + N (x, y) dy.
If M (x, y) dx + N (x, y) dy is an exact di↵erential form, then the equation
M (x, y) dx + N (x, y) dy = 0
is called an exact equation.
4. EXACT EQUATIONS 53

How can we judge whether a DE is exact?


Well, we know that if My (x, y) and Nx(x, y) exist and are continuous and if
(⇤) M (x, y) dx + N (x, y) dy = 0
is exact with
@F @F
(x, y) = M (x, y) and (x, y) = N (x, y),
@x @y
then the mixed second-order partial derivatives Fxy and Fyx are continuous and
My = Fxy = Fyx = Nx.
Then
My = Nx
is a necessary condition for (⇤) to be exact. As the following theorem states, it
is also a sufficient condition.
Theorem (2 — Test for Exactness). Suppose that both M (x, y) and
N (x, y) have continuous first-order partial derivatives in an open rectan-
gular region R. Then
M (x, y) dx + N (x, y) dy = 0 is exact in R
if and only if
My = Nx holds at every point (x, y) 2 R.
54 2. FIRST-ORDER DIFFERENTIAL EQUATIONS

Example.
y 3 dx + 3xy 2 dy = 0
is exact since
My = 3y 2 = Nx.
But if you divide thru by y 2 to get
y dx + 3x dy = 0,
this is not exact since
My = 1 6= 3 = Nx.
Even though both DE’s have the same solution, xy 3 = C or y = (Cx 1)1/3,
one is exact and the other is not, so exactness is related to the precise form in
which
M (x, y) dx + N (x, y) dy = 0
is written.
4. EXACT EQUATIONS 55

Method I for Solving Exact Equations


To solve an exact equation M (x, y) dx + N (x, y) dy = 0:
(1) Find a function F by integrating Fx = M with respect to x:
Z
(⇤) F (x, y) = M (x, y) dx + g(y).

(2) Find g(y) by taking the partial derivative of each side of (⇤) with respect to
y and setting the result equal to N (x, y). Solve for g 0(y). Then integrate g 0(y)
with respect to y to find g(y).
(3) Substitute g(y) into (⇤) to fully obtain F .
(4) Solutions of the DE are given implicitly by F (x, y) = C.
Example.
(2xy sec2 x) dx + (x2 + 2y) dy = 0.
| {z } | {z }
M =Fx N =Fy
? ?
My = 2x = Nx =) exact.
Thus M = Fx and N = Fy .
Z Z
F (x, y) = M dx + g(y) = (2xy sec2 x) dx + g(y) =)

F (x, y) = x2y tan x + g(y).


Then Fy = x2 + g 0(y) = x2
+ 2y} =)
| {z
N
g 0(y) = 2y =) g(y) = y 2.
Thus
F (x, y) = x2y tan x + y 2 = C
is an implicit solution.
56 2. FIRST-ORDER DIFFERENTIAL EQUATIONS

Method II for Solving Exact Equations


To solve an exact equation M (x, y) dx + N (x, y) dy = 0:
(1) Find a function F by integrating Fy = N with respect to y:
Z
(⇤⇤) F (x, y) = N (x, y) dy + h(x).

(2) Find h(x) by taking the partial derivative of each side of (⇤⇤) with respect
to x and setting the result equal to M (x, y). Solve for h0(x). Then integrate
h0(x) with respect to x to find h(x).
(3) Substitute h(x) into (⇤⇤) to fully obtain F .
(4) Solutions of the DE are given implicitly by F (x, y) = C.
Example.
(1 + exy + xexy) dx + (xex + 2) dy = 0.
| {z } | {z }
M =Fx N =Fy
? ?

My = ex + xex = Nx =) exact.
Thus M = Fx and N = Fy .
Z Z
F (x, y) = N dy + h(x) = (xex + 2) dy + h(x) =)
F (x, y) = xexy + 2y + h(x).
Then Fx = exy + xexy + h0(x) = 1| + exy{z+ xexy} =)
M
0
h (x) = 1 =) h(x) = x.
Thus
F (x, y) = xexy + 2y + x = C
is an implicit solution.
4. EXACT EQUATIONS 57

Example.
⇣1 ⌘ ⇣ ⌘
2 2
+ 2y x dx + 2yx cos y dy = 0, y(1) = ⇡.
x
My = 4xy = Nx =) exact.
Z ⇣ ⌘
2
F (x, y) = 2yx cos y dy + h(x) =)

F (x, y) = x2y 2 sin y + h(x).


1
Fx = 2xy 2 + h0(x) = + 2y 2x =)
x
1
h0(x) = =) h(x) = ln|x|.
x
Thus
F (x, y) = x2y 2 sin y + ln|x| = C
is an implicit general solution. From y(1) = ⇡,
⇡2 0 + 0 = C =) C = ⇡ 2
Then
F (x, y) = x2y 2 sin y + ln|x| = ⇡ 2
is the particular solution.
58 2. FIRST-ORDER DIFFERENTIAL EQUATIONS
⇣ ⌘ ⇣1 y⌘
2
Example. y sin x dx + dy = 0, y(⇡) = 1.
x x
1 y
My = 2y sin x 6= + = Nx =) not exact.
x2 x2
Try separable. x = 0 is not in domain of y, so multiply DE by x.
(y 1) dy = xy 2 sin x dx
Since y(⇡) = 1, y = 0 is not a constant solution.
Also, y = 1 is not a constant solution since it doesn’t satisfy the DE.
Z Z
y 1 y 1
dy = x sin x dx =) dy = x sin x dx + K =)
y2 y2
x sin x
+
&
1 cos x
&
+
0 sin x
Z ⇣
1 1⌘
dy = x cos x + sin x + K =)
y y2
1
ln|y| + = x cos x + sin x + K =)
y
From y(⇡) = 1,
0+1= ⇡( 1) + 0 + K =) K = 1 ⇡.
Then
1
ln|y| + = x cos x + sin x + 1 ⇡
y
is an implicit solution.

You might also like