First-Order Di erential Equationsfacstaff.cbu.edu/wschrein/media/M231 Notes/M231C2.pdf18 2....
Transcript of First-Order Di erential Equationsfacstaff.cbu.edu/wschrein/media/M231 Notes/M231C2.pdf18 2....
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 theonly forces acting on the object are gravity and air resistance, determine thevelocity 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
object,dv
dtgives the acceleartion of the object. By Newton’s second law,
mdv
dt= F.
Here we will assume v is positive when it is directed downward. Also, near theEarth’s surface, the force due to gravity is mg where g is the acceleration due togravity. Air resistance, which is proportional to velocity, is given by �bv whereb is a positive constant depending on the density of the air and the shape ofthe object. The negative sign is since the air resistance acts opposite to gravity.Thus we have the first order DE
mdv
dt= mg � bv.
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
mg � bv=
dt
m
17
18 2. FIRST-ORDER DIFFERENTIAL EQUATIONS
Integrating, Zdv
mg � bv=
Zdt
m+ c.
We always add the constant at the integration step. NotingZ
dv
mg � bv= �1
b
Z �b
mg � bvdv,
so the numerator of the integrand is the derivative of the denominator, we get
� 1
bln|mg � bv| =
t
m+ c =) ln|mg � bv| = �bt
m� bc =)
|mg � bv| = e�btme�bc =) mg � bv = ±e�bce�
btm =)
mg � bv = Ae�btm (A 6= 0).
Solving for v,
(⇤) v =mg
b� A
be�
btm ,
a general solution to the DE. For a specific solution, we solve the IVP
mdv
dt= mg � bv, v(0) = v0,
1. INTRODUCTION: MOTION OF A FALLING BODY 19
where v0 is the initial velocity. From (⇤),
A = �v0b + mg =) v =mg
b+
✓v0 �
mg
b
◆e�
btm .
Since b > 0, limt!1
e�btm = 0 =) lim
t!1v =
mg
b.
The constantmg
bis referred to as the limiting or terminal velocity of the object.
This can be seen in the graph below.
The simplest 1st-order equations are of the form
dy
dx= f(x).
For these,
y(x) =
Zf(x) dx + C
are solutions.
We shall expect all students know the Standard Integral Forms and Formulason the handout provided.
20 2. FIRST-ORDER DIFFERENTIAL EQUATIONS
Example.
(1)dy
dx=
5x + 6
x2 + 4
y =
Z5x + 6
x2 + 4dx =
Z5x
x2 + 4dx +
Z6
x2 + 4dx =
5
2
Z2x
x2 + 4dx +
Z12
4u2 + 4du =
x=2u
dx=2du
5
2
Z2x
x2 + 4dx + 3
Z1
u2 + 1du =
5
2ln(x2 + 4) + 3 arctanu + C =
5
2ln(x2 + 4) + 3 arctan
⇣x
2
⌘+ C
(2)dy
dx=
1p1� 4x2
y =
Z1p
1� 4x2dx =
1
2
Z1p
1� u2du =
u=2x
du=2dx
1
2arcsinu + C =
1
2arcsin(2x) + C
1. INTRODUCTION: MOTION OF A FALLING BODY 21
(3)dy
dx= xe5x
y =
Zxe5x dx =
Zu dv = uv �
Zv du (integration by parts)
u = dv =
du = v =
u = x dv = e5x dx
du = dx v = 15e
5x
x
5e5x � 1
5
Ze5x dx =
x
5e5x � 1
25e5x + C =
e5x
25(5x� 1) + C
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
(4)dx
dt= e�3t sin 5t
x =
Ze�3t sin 5t dt =
u = sin 5t dv = e�3t dt
du = 5 cos 5t dt v = �13e�3t
�1
3e�3t sin 5t +
5
3
Ze�3t cos 5t dt =
u = cos 5t dv = e�3t dt
du = �5 sin 5t dt v = �13e�3t
�1
3e�3t sin 5t +
5
3
h� 1
3e�3t cos 5t� 5
3
Ze�3t sin 5t dt
i=)
34
9
Ze�3t sin 5t dt = �1
3e�3t
hsin 5t +
5
3cos 5t
i=)
Ze�3t sin 5t dt = � 3
34e�3t
hsin 5t +
5
3cos 5t
i+ C
1. INTRODUCTION: MOTION OF A FALLING BODY 23
Tabular approach to integration by parts:
(4)
x =
Ze�3t sin 5t dt =
sin 5t e�3t
+&
5 cos 5t �13e�3t
�&
�25 sin 5t+ 1
9e�3t
�1
3e�3t sin 5t� 5
9e�3t cos 5t� 25
9
Ze�3t sin 5t dt
Then continue as above.
(3)
y =
Zxe5x dx =
x e5x
+&
1 15e
5x
�&
0+ 1
25e5x
1
5xe5x � 1
25e5x +
Z0 dx
Again, continue as above.
24 2. FIRST-ORDER DIFFERENTIAL EQUATIONS
(5)dy
dx=
2x3 � 2x2 � 65x� 107
x2 � 5x� 14
y =
Z2x3 � 2x2 � 65x� 107
x2 � 5x� 14dx =
Z(2x + 8) dx +
Z3x + 5
(x� 7)(x + 2)dx =
————————————————————3x + 5
(x� 7)(x + 2)=
A
x� 7+
B
x + 2
3x + 5 = A(x + 2) + B(x� 7)
A + B = 3 A =26
92A� 7B = 5 B =
1
97A + 7B = 21——————–9A=26
————————————————————
x2 + 8x +26
9
Zdx
x� 7+
1
9
Zdx
x + 2=
x2 + 8x +26
9ln|x� 7| +
1
9ln|x + 2| + C
1. INTRODUCTION: MOTION OF A FALLING BODY 25
(6)dy
dx=
x3 � 5x2 + 10x� 9
(x� 2)2(x2 � 3x + 1)
y =
Zx3 � 5x2 + 10x� 9
(x� 2)2(x2 � 3x + 1)dx =
————————————————————x3 � 5x2 + 10x� 9
(x� 2)2(x2 � 3x + 1)=
A
x� 2+
B
(x� 2)2+
Cx + D
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 = 17A� 3B + 4C � 4D = 10 C = 2�2A + B + 4D = �9 D = �3
What about x2 in the denominator? Can use eitherAx + B
x2or
A
x+
B
x2.
————————————————————
�Z
dx
x� 2+
Z1
(x� 2)2dx +
Z2x� 3
x2 � 3x + 1dx =
� ln|x� 2|
u=x-2
du=dx
+
Zu�2 du + ln
��x2 � 3x + 1�� =
ln��x2 � 3x + 1
��� ln|x� 2|� 1
x� 2+ C = ln
���x2 � 3x + 1
x� 2
����1
x� 2+ C
26 2. FIRST-ORDER DIFFERENTIAL EQUATIONS
(7)dy
dx=
5
x2 + 6x + 10
y =
Z5
x2 + 6x + 10dx =
Z5
(x2 + 6x + 9) + 1dx = 5
Z1
(x + 3)2 + 1dx =
u=x+3
du=dx
5
Z1
u2 + 1du =
5 arctanu + 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:
(I)p
a2 � x2, set x = a sin ✓(II)
pa2 + x2, set x = a tan ✓
(III)p
x2 � a2, set x = a sec ✓
1. INTRODUCTION: MOTION OF A FALLING BODY 27
dy
dx=
x2
px2 � 16
y =
Zx2
px2 � 16
dx =
√(x2 -16)x
4 x = 4 sec ✓, dx = 4 sec ✓ tan ✓d✓p
x2 � 16 =p
16 sec2 ✓ � 16 = 4p
sec2 ✓ � 1 = 4 tan ✓Z
16 sec2 ✓
4 tan ✓(4 sec ✓ tan ✓)d✓ = 16
Zsec3 ✓ d✓ =
sec ✓ sec2 ✓+&
sec ✓ tan ✓� tan ✓
16
✓sec ✓ tan ✓ �
Zsec ✓ tan2 ✓ d✓
◆=
16
✓sec ✓ tan ✓ �
Zsec ✓(sec2 ✓ � 1) d✓
◆=
16
✓sec ✓ tan ✓ �
Z(sec3 ✓ � sec ✓) d✓
◆=
16 sec ✓ tan ✓ � 16
Zsec3 ✓ d✓ + 16
Zsec ✓ d✓ =)
32
Zsec3 ✓ d✓ = 16 sec ✓ tan ✓ + 16 ln|sec ✓ + tan ✓| =)
28 2. FIRST-ORDER DIFFERENTIAL EQUATIONS
y = 8 sec ✓ tan ✓ + 8 ln|sec ✓ + tan ✓| =)
√(x2 -16)x
4
y = 8 · x
4·p
x2 � 16
4+ 8 ln
����x
4+
px2 � 16
4
���� =)
y =xp
x2 � 16
2+ 8 ln
����x
4+
px2 � 16
4
���� + C
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
dx= f(x, y)
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.
(1)dy
dx=
x� 5
y2= (x� 5) · 1
y2, so this equation is separable. To solve,
y2 dy = (x� 5) dx =)Z
y2 dy =
Z(x� 5) dx + K =)
y3
3=
x2
2� 5x + K
| {z }implicit solution
=) y3 =3
2x2 � 15x + 3K =)
y =h3
2x2 � 15x + 3K
i1/3=) y =
h3
2x2 � 15x + C
i1/3
| {z }explicit solution
.
You can graph this solution on a calculator for various values of C. To checkthat y is the solution,
dy
dx=
1
3
h3
2x2 � 15x + C
i�2/3(3x� 15)
=x� 5
h⇣32x
2 � 15x + 3K⌘1/3i2
=x� 5
y2.
(2)dy
dx= 1 + xy
is not separable.
30 2. FIRST-ORDER DIFFERENTIAL EQUATIONS
(3)dy
dx=
y � 1
x + 3=
1
x + 3· (y � 1)
(a) y � 1 = 0 =) dy
dx= 0 =)
y = 1 is a constant solution.
(b) For y 6= 1, we can divide by y � 1, so
dy
y � 1=
dx
x + 3=)
Zdy
y � 1=
Zdx
x + 3+ K =)
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
(4)dy
dx=
6x5 � 2x + 1
cos y + ey= (6x5 � 2x + 1) · 1
cos y + ey. We have
(cos y + ey) dy = (6x5 � 2x + 1) dx.
Then Z(cos y + ey) dy =
Z(6x5 � 2x + 1) dx + K =)
sin y + ey = x6 � x2 + x + K| {z }implicit solution
We check using implicit di↵erentiation:
(cos y)y0 + eyy0 = 6x5 � 2x + 1 =)y0(cos y + ey) = 6x5 � 2x + 1 =)
dy
dx= y0 =
6x5 � 2x + 1
cos y + ey
Indefinite Integral Convention for Di↵erential Equations
The indefinite integral
Zg(x) dx represernts any (single) antiderivative of g(x).
In other words, it means any function G(x) with the derivative
d
dxG(x) = g(x).
32 2. FIRST-ORDER DIFFERENTIAL EQUATIONS
Why Separation of Variables works
Assume g(x) and h(y) are continuous functions, that
dy
dx= g(x) · h(y),
and that h(y) 6= 0 on the interval where the solution is sought. Then
1
h(y)
dy
dx= g(x).
Let
r(y) =1
h(y)=)
(#) r(y)dy
dx= g(x).
Let
R(y) =
Zr(y) dy =) dR
dy= r(y)
and
G(x) =
Zg(x) dx =) dG
dx= g(x).
Then, from (#),
dR
dy· dy
dx=
dG
dx=) (from the chain rule)
d
dx
hR
�y(x)
�i=
d
dxG(x) =)
R(y) = G(x) + C =)Z
r(y) dy =
Zg(x) dx + C,
an implicit solution. If possible, we then get an explicit solution by solving fory 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 specificsolution rather than a general solution with a constant of integration.
dy
dx= 8x3e�2y, y(0) = 0
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 onlya single solution to an IVP. We have
e2y dy = 8x3 dx =)Z
e2y dy =
Z8x3 dx + K =)
1
2e2y = 2x4 + K =) e2y = 4x4 + 2K =)
ln e2y = ln(4x4 + 2K) =) 2y = ln(4x4 + C) =)
y =1
2ln(4x4 + C)
This is the general solution. Then
y(0) =1
2ln C = 0 =)
ln C = 0 =)C = 1
Thus the solution to the IVP is
y =1
2ln(4x4 + 1) = ln
p4x4 + 1
34 2. FIRST-ORDER DIFFERENTIAL EQUATIONS
Example (Using definite integration to solve an IVP).
dy
dx= 8x3e�2y, y(0) = 0
As before, we havee2y dy = 8x3 dx.
We use Z y
0e2r dr =
Z x
08s3 ds.
Since x and y become the upper limits of integration here, we use r and s asdummy 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 ofthe “y” integral. Continuing,
1
2e2r
���r=y
r=0= 2s4
���s=x
s=0=)
1
2e2y � 1
2= 2x4 =)
e2y = 4x4 + 1 =)2y = ln(4x4 + 1) =)
y =1
2ln(4x4 + 1) = ln
p4x4 + 1
Maple. See separable.mw or separable.pdf
2. SEPARABLE EQUATIONS 35
Example. A raindrop is falling through the atmosphere. Aside from theforce 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 resultof condensation, the mass of the raindrop is increasing at a rate proportional toits 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
m = V ⇢ =4
3⇡r3⇢.
We are givendm
dt/ SA = 4⇡r2 =)
dm
dt= �(4⇡r2), � > 0.
Then substituting for m,
d
dt
h4
3⇡r3⇢
i= 4�⇡r2 =) (chain rule)
4⇡r2⇢dr
dt= 4�⇡r2 =)
dr
dt=
�
⇢.
Letting k =�
⇢> 0,
dr
dt= k.
Thenr = 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
dt= Fsum
where p = mv and Fsum = ma = �mg. Then
dp
dt=
d
dt(mv) = �mg =)
d
dt
h4
3⇡r3⇢v
i= �4
3⇡r3⇢g =) 4
3⇡⇢
d
dt(r3v) = �4
3⇡r3⇢g =)
d
dt(r3v) = �r3g.
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
dr(r3v)
dr
dt= �r3g =) (from previous page)
kd
dr(r3v) = �r3g =) d
dr(r3v) = �g
kr3 =)
Zd
dr(r3v) dr =
Z ⇣� g
kr3
⌘dr + C =)
r3v = �g
k· r4
4+ C.
At t = 0 (with v0 = v(0)),
r30v0 = �gr4
0
4k+ C =) C = r3
0v0 +gr4
0
4k.
Then
v = � g
4kr +
1
r3
⇣r30v0 +
gr40
4k
⌘=) v = � g
4kr +
⇣r0
r
⌘3⇣v0 +
gr0
4k
⌘.
3. LINEAR EQUATIONS 37
3. Linear Equations
Definition. A first-order DE is linear if it can be expressed in the form
a1(x)dy
dx+ a0(x)y = b(x)
where a1(x), a0(x), and b(x) are arbitrary functions of x.Example.
(1) x2 sin x + (cos x)y = sin xdy
dx=)
sin xdy
dx� (cos x)y = x2 sin x, and this is linear.
(2) ydy
dx+ (sin x)y3 = ex + 1
is not linear
Two easy cases
(1) a0(x) = 0 =) a1(x)dy
dx= b(x) =)
dy
dx=
b(x)
a1(x), a1(x) 6= 0 =)
y =
Zb(x)
a1(x)dx + C.
38 2. FIRST-ORDER DIFFERENTIAL EQUATIONS
(2) a01(x) = a0(x). Then
a1(x)dy
dx+ a01(x)y = b(x) =)
d
dx
ha1(x)y
i= b(x) =)
a1(x)y =
Zb(x) dx + C =)
y =1
a1(x)
h Zb(x) dx + C
i.
Suppose a1(x) 6= 0 for all x on some interval. Then
dy
dx+
a0(x)
a1(x)y =
b(x)
a1(x)or
(⇤) dy
dx+ P (x)y = Q(x),
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.
y0 + ry = 0
Multiply through the equation by erx. We call erx an integrating factor. Notethat this factor will never be 0, so no extraneous solutions will be introduced.
erxy0 + rerxy = 0 =)d
dx
herxy
i= 0 =)
erxy = C (we integrated here) =)y(x) = Ce�rx
We check our solution:d
dx
⇣Ce�rx
⌘+ rCe�rx = �rCe�rx + rCe�rx = 0
Next case: y0 + ry = Q(x), Q(x) continuous.
We again multiply through by the integrating factor erx.
erxy0 + rerxy = erxQ(x) =)d
dx
herxy
i= erxQ(x) =)
erxy =
ZerxQ(x) dx + C =)
y(x) =1
erx
"ZerxQ(x) dx + C
#
40 2. FIRST-ORDER DIFFERENTIAL EQUATIONS
Example.
(1)dy
dx� y = e3x.
Since r = �1, the integrating factor is e�x:
e�xy0 � e�xy = e�xe3x =)d
dx
he�xy
i= e2x =)
e�xy =
Ze2x dx + C =)
e�xy =1
2e2x + C =)
y(x) =1
2e3x + Cex
(2)dx
dt+ 4x = e�t, x(0) =
4
3.
Since r = 4, the integrating factor is e4t:
e4tx0 + 4e4tx = e4te�t =)d
dt
he4tx
i= e3t =)
e4tx =
Ze3t dt + C =)
e4tx =1
3e3t + C =)
x(t) =1
3e�t + Ce�4t.
x(0) =1
3+ C =
4
3=) C = 1 =)
x(t) =1
3e�t + e�4t =
e�4t
3
⇣e3t + 3
⌘=
e3t + 3
3e4t
3. LINEAR EQUATIONS 41
General case:dy
dx+ P (x)y = Q(x), Q(x) continuous.
We need to find an integrating factor µ(x). We multiply the equation by µ(x).
(⇤) µ(x)dy
dx+ µ(x)P (x)| {z } y = µ(x)Q(x)
We want the left-hand side of (⇤) to to be the derivative of some product, i.e.,we want
d
dxµ(x) = µ(x)P (x)
or
(#)dµ
dx= µP (x).
But this separable, so
dµ
µ= P (x) dx =)
Zdµ
µ=
ZP (x) dx + K =)
ln|µ| =
ZP (x) dx + K =)
|µ| = eR
P (x) dx+K = eR
p(x) dxeK =)µ = Ce
RP (x) dx (C 6= 0)
Let µ = eR
P (x) dx be the integrating factor.
This works because it is a solution of (#). (⇤) then becomes
(⇤) d
dx
hµ(x)y
i= µ(x)Q(x) =)
µ(x)y =
Zµ(x)Q(x) dx + C =)
y(x) =1
µ(x)
"Zµ(x)Q(x) dx + C
#
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
W (x) =
ZP (x) dx (a family of functions with W 0(x) = P (x))
and
F (x) =
Z x
x0
P (s) ds = W (x)�W (x0)
for a < x < b. Then
F 0(x) = W 0(x) = P (x) and F (x0) = 0.
So choose ZP (x) dx =
Z x
x0
P (s) ds.
Thenµ(x) = e
R xx0
P (s) ds and µ(x0) = e0 = 1.
Then, from (⇤),Z x
x0
d
ds
hµ(s)y(s)
ids =
Z x
x0
µ(s)Q(s) ds =)
µ(x)y(x)� µ(x0)y(x0) =
Z x
x0
µ(s)Q(s) ds =)
y(x) =1
µ(x)
"Z x
x0
µ(s)Q(s) ds + y0
#
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 thisinterval. Then the initial value problem
dy
dx+ P (x)y = Q(x), y(x0) = y0
has a unique solution on the interval (a, b).Example.
1
x
dy
dx� 2y
x2= x cos x, x > 0. We then have
y0 � 2
xy = x2 cos x.
µ = eR
(� 2x) dx = e�2
R dxx = e�2 lnx = elnx�2
= x�2 =1
x2
Then1
x2y0 � 2
x3y = cos x =)
d
dx
hx�2y
i= cos x =)
x�2y =
Zcos x dx + C =)
x�2y = sin x + C =)y(x) = x2(sin x + C)
We check:1
x
dy
dx� 2y
x2=
1
x
⇥2x(sin x + C) + x2 cos x
⇤� 2(sin x + C) =
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 intoRA2, which then decays into stable atoms. Assume that the rate at whichRA1 decays into RA2 is 50e�10t kg/sec. Because the rate of decay of RA2 isproportional to the mass y(t) of RA2 present, the rate of change in RA2 is
dy
dt= rate of creation� rate of decay,
dy
dt= 50e�10t � ky,
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
dt+ 20y = 50e�10t, y(0) = 40.
µ = eR
20 dt = e20t.
Then
e20ty0 + 20e20ty = 50e10t =)d
dt
he20ty
⇤= 50e10t =)
e20ty = 50
Ze10t dt + C =)
e20ty = 50⇣ 1
10
⌘e10t + C =)
y(t) = 5e�10t + Ce�20t.
y(0) = 5 + C = 40 =) C = 35.
Thusy(t) = 5e�10t + 35e�20t.
3. LINEAR EQUATIONS 45
Example. (1 + t2)x0 + 4tx = (1 + t2)�2, x(0) = 5. Then
x0 +4t
1 + t2x = (1 + t2)�3.
µ = eR 4t
1+t2dt
= e2R 2t
1+t2dt
= e2 ln(1+t2) = eln(1+t2)2 = (1 + t2)2
(1 + t2)2x0 + 4t(1 + t2)x =1
1 + t2=)
d
dt
h(1 + t2)2x
i=
1
1 + t2=)
(1 + t2)2x =
Z1
1 + t2dt + C =)
(1 + t2)2x = arctan t + C =)
x(t) =arctan t + C
(1 + t2)2.
x(0) =C
1= 5 =) C = 5.
Thus
x(t) =arctan t + 5
(1 + t2)2.
46 2. FIRST-ORDER DIFFERENTIAL EQUATIONS
Problem (Page 142 #33).dx
dt+ 2tx = 1, x(0) = 1
µ = eR
2t dt = et2
et2x0 + 2tet2x = et2 =)d
dt
het2x
i= et2 =) et2x =
Zet2 dt + C.
There is no elementary formula for
Zet2 dt, so we instead integrate each side
from t0 = 0 to t.Z t
0
d
ds
hes2
xids =
Z t
0es2
ds =)
es2x(s)
���t
0=
Z t
0es2
ds =)
et2x(t)� e0 · 1 =
Z t
0es2
ds =)
x(t) = e�t2h Z t
0es2
ds + 1i
=)
x(t) = e�t2Z t
0es2
ds + e�t2 =)
Dawson(t) = e�t2Z t
0es2
ds and erf(t) =2
⇡
Z t
0es2
ds
x(t) = Dawson(t) + e�t2.
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 regionR 2 R2. Let (a, b) be an interior point of R. The average rate of change asyou 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
@x(a, b) = lim
h!0
F (a + h, b)� F (a, b)
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
@y(a, b) = lim
h!0
F (a, b + h)� F (a, b)
h,
the partial derivative of F with respect to y.
Example. Let F (x, y) = x2y2.
@F
@x(x, y) = lim
h!0
F (x + h, y)� F (x, y)
h= lim
h!0
(x + h)2y2 � x2y2
h
= limh!0
x2y2 + 2xhy2 + h2y2 � x2y2
h= lim
h!0
2xhy2 + h2y2
h= lim
h!0(2xy2 + hy2) = 2xy2.
Basically, hold y constant and take the derivative with respect to x. We do
similarly for@F
@y(x, y). Then, for example,
@F
@x(3, 2) = 2 · 3 · 22 = 24.
4. EXACT EQUATIONS 49
Notation.@F
@x(x, y)
| {z }traditional notation
= Fx(x, y)| {z }modern notation
=@
@x
⇥F (x, y)
⇤
| {z }partial di↵erential operator
z }| {@F
@y(x, y) =
z }| {Fy(x, y) =
z }| {@
@y
⇥F (x, y)
⇤
Example.
@
@x(xep
xy) =@
@x(xe(xy)1/2) = e(xy)1/2 + xe(xy)1/2
⇣1
2
⌘(xy)�1/2(y) =
⇣1
2
⌘ep
xy(2 +p
xy).
Note.x �!
yxykz
�!12z�1/2
(xy)1/2
k
z1/2
ks
�!es
e(xy)1/2
k
ez1/2
kes
Example. F (x, y) = x ln(y cos x). Find@F
@x
⇣⇡
3, 1
⌘.
@F
@x(x, y) = ln(y cos x) + x
1
y cos x(�y sin x) = ln(y cos x)� x tan x
Note.x �!� sin x
cos xks
�!y
y cos xkyskz
�!1z
ln(y cos x)k
ln(ys)k
ln z
Thus@F
@x
⇣⇡
3, 1
⌘= ln
1
2� ⇡
3
p3 = �
⇣ln 2 +
⇡p3
⌘.
50 2. FIRST-ORDER DIFFERENTIAL EQUATIONS
2nd Order Partial Derivatives
Fxx =@
@xFx =
@
@x
@F
@x=
@2F
@x2
Fxy =@
@yFx =
@
@y
@F
@x=
@2F
@y@x
Fyx =@
@xFy =
@
@x
@F
@y=
@2F
@x@y
Fyy =@
@yFy =
@
@y
@F
@y=
@2F
@y2
Note. This method also extends to more variables and higher derivatives.
Example. F (x, y) = 3x4y5 + 8x2 � 5y + 15
Fx(x, y) = 12x3y5 + 16x
Fy(x, y) = 15x4y4 � 5
Fxx(x, y) = 36x2y5 + 16
Fxy(x, y) = 60x3y4
Fyx(x, y) = 60x3y4
Fyy(x, y) = 60x4y3
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 arecalled isotherms. Because the level curves are smooth, having tangent lines(derivatives) at each point, they are actually implicit solutions of di↵erentialequations.
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
dxF (x, y) =
d
dx(C) =)
(⇤) @F
@x+
@F
@y
dy
dx= 0 =)
(⇤⇤) dy
dx= �@F/@x
@F/@y, the slope at (x, y).
52 2. FIRST-ORDER DIFFERENTIAL EQUATIONS
Multiplying the left-hand side of (⇤) by dx yields the total di↵erential dF :
dF :=@F
@xdx +
@F
@ydy or dF := Fx dx + Fy dy.
Setting dF = 0 and solving allows us to obtain the equation for the slopef(x, y) of the level curve F (x, y) = C. Since (⇤⇤) is a di↵erential equation, weshould be able to reverse the logic and easily solve some DE’s. Note that any
first-order DEdy
dx= f(x, y) can be rewritten in the (di↵erential) form
(#) 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 arbitraryconstant.
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 rectangleR if there is a function F (x, y) such that
@F
@x(x, y) = M(x, y) and
@F
@y(x, y) = N(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
@x(x, y) = M(x, y) and
@F
@y(x, y) = N(x, y),
then the mixed second-order partial derivatives Fxy and Fyx are continuous and
My = Fxy = Fyx = Nx.
ThenMy = Nx
is a necessary condition for (⇤) to be exact. As the following theorem states, itis also a su�cient condition.
Theorem (2 — Test for Exactness). Suppose that both M(x, y) andN(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.y3 dx + 3xy2 dy = 0
is exact sinceMy = 3y2 = Nx.
But if you divide thru by y2 to get
y dx + 3x dy = 0,
this is not exact sinceMy = 1 6= 3 = Nx.
Even though both DE’s have the same solution, xy3 = C or y = (Cx�1)1/3,one is exact and the other is not, so exactness is related to the precise form inwhich
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:
(⇤) F (x, y) =
ZM(x, y) dx + g(y).
(2) Find g(y) by taking the partial derivative of each side of (⇤) with respect toy and setting the result equal to N(x, y). Solve for g0(y). Then integrate g0(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)| {z }
M=?Fx
dx + (x2 + 2y)| {z }N=
?Fy
dy = 0.
My = 2x = Nx =) exact.
Thus M = Fx and N = Fy.
F (x, y) =
ZM dx + g(y) =
Z(2xy � sec2 x) dx + g(y) =)
F (x, y) = x2y � tan x + g(y).
Then Fy = x2 + g0(y) = x2 + 2y| {z }N
=)
g0(y) = 2y =) g(y) = y2.
ThusF (x, y) = x2y � tan x + y2 = 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:
(⇤⇤) F (x, y) =
ZN(x, y) dy + h(x).
(2) Find h(x) by taking the partial derivative of each side of (⇤⇤) with respectto x and setting the result equal to M(x, y). Solve for h0(x). Then integrateh0(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)| {z }M=
?Fx
dx + (xex + 2)| {z }N=
?Fy
dy = 0.
My = ex + xex = Nx =) exact.
Thus M = Fx and N = Fy.
F (x, y) =
ZN dy + h(x) =
Z(xex + 2) dy + h(x) =)
F (x, y) = xexy + 2y + h(x).
Then Fx = exy + xexy + h0(x) = 1 + exy + xexy| {z }M
=)
h0(x) = 1 =) h(x) = x.
ThusF (x, y) = xexy + 2y + x = C
is an implicit solution.
4. EXACT EQUATIONS 57
Example.⇣1
x+ 2y2x
⌘dx +
⇣2yx2 � cos y
⌘dy = 0, y(1) = ⇡.
My = 4xy = Nx =) exact.
F (x, y) =
Z ⇣2yx2 � cos y
⌘dy + h(x) =)
F (x, y) = x2y2 � sin y + h(x).
Fx = 2xy2 + h0(x) =1
x+ 2y2x =)
h0(x) =1
x=) h(x) = ln|x|.
ThusF (x, y) = x2y2 � sin y + ln|x| = C
is an implicit general solution. From y(1) = ⇡,
⇡2 � 0 + 0 = C =) C = ⇡2
ThenF (x, y) = x2y2 � sin y + ln|x| = ⇡2
is the particular solution.
58 2. FIRST-ORDER DIFFERENTIAL EQUATIONS
Example.⇣y2 sin x
⌘dx +
⇣1
x� y
x
⌘dy = 0, y(⇡) = 1.
My = 2y sin x 6= � 1
x2+
y
x2= Nx =) not exact.
Try separable. x = 0 is not in domain of y, so multiply DE by x.
(y � 1) dy = xy2 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.
y � 1
y2dy = x sin x dx =)
Zy � 1
y2dy =
Zx sin x dx + K =)
x sin x+&
1 � cos x�&
0+ � sin x
Z ⇣1
y� 1
y2
⌘dy = �x cos x + sin x + K =)
ln|y| +1
y= �x cos x + sin x + K =)
From y(⇡) = 1,
0 + 1 = �⇡(�1) + 0 + K =) K = 1� ⇡.
Then
ln|y| +1
y= �x cos x + sin x + 1� ⇡
is an implicit solution.