Lecture #3
Lecture #3
Lecture #3
1 Motivation
2 Basic Ideas and Terminology
3 Solutions of Differential Equations
4 Initial-Value Problem
5 Separable Differential Equations
6 Some Simple Population Models
7 First-Order Linear Differential Equations
8 Modeling Problems Using First-order Linear Differential Equations
9 Change of Variables
10 Exact Differential Equations
11 Numerical Solution to First-order Differential Equations
Definition
A differential equation that can be written in the form
dy
a(x) + b(x)y = r (x) (1)
dx
where a(x), b(x), and r (x) are functions defined on an interval (a, b),
is called a first-order linear differential equation.
d
[G(x, y )] = F (x)
dx
for an appropriate function G(x, y ). Then by an integration w.r.t. x
gives the general solution to the differential equation.
dy 1
+ y = ex , x > 0. (3)
dx x
Solution.
Multiply (3) by x, we have
dy
x + y = xex .
dx
But the left-hand side, by the product rule for differentiation, is written
as
dy d
x +y = (xy ).
dx dx
d
(xy ) = xex .
dx
Integrating both sides of this equation w.r.t. x, withZthe note that here
integration by parts is used for the right-hand side xex dx:
u = x du = dx
=⇒
dv = ex dx v = ex ,
Z Z
x x
=⇒ xe dx = xe − ex dx = xex − ex + C,
we obtain
xy = xex − ex + C.
ex C 1
y (x) = ex − + = [ex (x − 1) + C],
x x x
where C is an arbitrary constant.
d dy dI
(Iy ) = I + y. (5)
dx dx dx
Comparing the left-hand side of Equation (4) and the right-hand side of
Equation (5) yields
dI
= p(x)I. (6)
dx
As the last differential equation is separable, we get
Z R
log |I| = p(x) dx + C, or I(x) = C1 e p(x) dx ,
d h R p(x) dx i R
e y = q(x)e p(x) dx
dx
R
Z R
p(x) dx p(x) dx
⇐⇒ e y (x) = q(x)e dx + C
R
Z R
− p(x) dx p(x) dx
⇐⇒ y (x) = e q(x)e dx + C .
Remark
It is not necessary to memorize the formula said above. In a concrete
problem we first evaluate the integrating factor, and then use the
resulting equation.
Solution
First we write the given differential equation in the standard form, by
dividing both sides by x (as x > 0)
dy 2 cos x
+ y= .
dx x x
An integrating factor is
2
R
dx
I(x) = e x = e2 log x = x 2 .
d 2
(x y ) = x cos x.
dx
Integrating the last equation gives
x 2 y = x sin x + cos x + C,
or
1
y (x) = (x sin x + cos x + C),
x2
where C is an arbitrary constant.
• Electric Circuits
Definition
dq
i(t) = . (5)
dt
According to Kirchoff’s law, the sum of the voltage drops at any instant
must be zero. This means we have
ER + EC + EL − E(t) = 0.
di R 1
+ i = E(t). (7)
dt L L
This is the first-order differential equation for the current in the circuit at
any time t.
then reduces to
1 E
i+ q= .
RC R
dq 1 E
+ q= . (8)
dt RC R
This case can be solved for the charge q(t) on the plates of the
capacitor.
We can easily get the following differential equation for determining the
charge on the capacitor
d 2 q R dq 1 1
2
+ + q = E(t).
dt L dt LC L
Consequently,
E0
i(t) = (a cos ωt + ω sin ωt) + Ce−at .
L(a2+ ω2)
E0 A
C(t) = − ,
L(a2 + ω 2 )
which gives
E0 A
a cos ωt + ω sin ωt − ae−at .
i(t) = 2 2
L(a + ω )
where
E0 aE0
e−at .
iS (t) = a cos ωt + ω sin ωt , iT (t) = −
L(a2 2
+ω ) L(a2 + ω 2 )
Solution. In this case, we first solve equation (8) for q(t) and then
determine the current in the circuit by differentiating the result.
We have
dq
+ 20q = 40,
dt
which has the general solution
q(t) = 2 + C −20t ,
dq
i(t) = = 40e−20t .
dt
Finally,
i(0.25) = 40e−5 ≈ 0.27A.