Lecture #3

Download as pdf or txt
Download as pdf or txt
You are on page 1of 32

Outline

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

MATH2030 Differential Equations (AY 2023-24) 72 / 177


First-Order Linear Differential Equations

We derive a technique for determining the general solution to any


first-order linear differential equation. This is the most important
technique in the chapter.

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.

MATH2030 Differential Equations (AY 2023-24) 73 / 177


Assume that a(x) 6= 0 on (a, b). We divide both side of (1) by a(x) to
obtain the standard form
dy
+ p(x)y = q(x), (2)
dx
where p(x) = b(x)/a(x) and q(x) = r (x)/a(x).

The idea of the solution technique is to transform the differential


equation into the form

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.

MATH2030 Differential Equations (AY 2023-24) 74 / 177


Example
Solve 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

MATH2030 Differential Equations (AY 2023-24) 75 / 177


So Equation (3) can be rewritten as

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.

MATH2030 Differential Equations (AY 2023-24) 76 / 177


Dividing by x (as x > 0) gives the general solution to (3)

ex C 1
y (x) = ex − + = [ex (x − 1) + C],
x x x
where C is an arbitrary constant.

MATH2030 Differential Equations (AY 2023-24) 77 / 177


Discussion
In the example above, we multiplied the given differential equation by
the function I(x) = x. It reduced the left-hand side of the resulting
d
differential equation to the integrable form (xy ).
dx
This motivated us to find a nonzero function I(x) such that after
multiplying Equation (2) by this function, the left-hand side of the
resulting equation
dy
I + p(x)Iy = Iq(x), (4)
dx
can have the form
d
[I(x)y ],
dx
here we assume that both functions p(x) and q(x) are continuous on
(a, b).

MATH2030 Differential Equations (AY 2023-24) 78 / 177


Note that by the product rule,

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 ,

where C1 is an arbitrary constant, which can be taken a value 1, since


we require only one solution to Equation (6).

MATH2030 Differential Equations (AY 2023-24) 79 / 177


Then Equation (2) can be solved, by integrating, as follows

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 .

MATH2030 Differential Equations (AY 2023-24) 80 / 177


Definition
The function R
p(x) dx
I(x) = e

is called an integrating factor for the differential equation (2)

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.

MATH2030 Differential Equations (AY 2023-24) 81 / 177


Example
Solve
dy
x + 2y = cos x, x > 0. (7)
dx

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 .

MATH2030 Differential Equations (AY 2023-24) 82 / 177


Now multiplying Equation (7) by I, we get

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.


MATH2030 Differential Equations (AY 2023-24) 83 / 177


Outline
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

MATH2030 Differential Equations (AY 2023-24) 84 / 177


Modeling Problems Using First-order Linear
Differential Equations

There are many examples of applied problems whose mathematical


formulation leads to a first-order linear differential equation.

We analyze one in detail.

• Electric Circuits

The most basic electric circuit is obtained by connecting the ends of a


wire to the terminals of a battery or generator.

MATH2030 Differential Equations (AY 2023-24) 85 / 177


This causes a flow of charge q(t) measured in coulombs (C), though
the wire thereby producing a current i(t) measured in amperes (A),
defined to be the rate of change of charge. Thus

Definition
dq
i(t) = . (5)
dt

In practice, a circuit contains several components that oppose the flow


of charge.

As current passes through these components, work has to be done,


and the loss of energy is described by the resulting voltage drop
across each component.

MATH2030 Differential Equations (AY 2023-24) 86 / 177


For the circuits that we consider below, the behavior of the current in
the circuit is governed by the following law.

Kirchoff’s (Current and Voltage) Law


1 (Current) The sum of the current flowing into any junction point is
zero.
2 (Voltage) The sum of the voltage drops around a closed circuit is
zero.

Gustav Robert Kirchoff (1824-1887), a German physicist noted for a


research in spectrum analysis, optic, and electricity.

MATH2030 Differential Equations (AY 2023-24) 87 / 177


In order to apply this law, we need to know the relationship between
the current passing through each component in the circuit and the
resulting voltage drop.

The components are the following (consult an introductory physics text


for further details).

Resistors: According to Ohm’s law, the voltage drop ER across a


resistor is proportional to the current i passing through the
resistor:
ER = i R,

where the constant of proportionality R is called the resistance of


the resistor. The units of resistance are ohms (Ω).

MATH2030 Differential Equations (AY 2023-24) 88 / 177


Capacitors: A capacitors can be thought of as a component that
stores charge and thereby opposes teh passage of current. If q(t)
denotes the charge on the capacitor at time t, then the voltage
drop EC across a capacitor is proportional to the electric charge q
on the capacitor:
1
EC = q,
C
where the constant C is called the capacitance of the capacitor.
The units of capacitance are farads (F ).

MATH2030 Differential Equations (AY 2023-24) 89 / 177


Inductors: By Faraday’s and Lenz’s Laws, the voltage drop EL
across an inductor is proportional to the rate at which the current
is changing:
di
EL = L ,
dt
where the constant L is called the inductance. The units of
inductance are henrys (H).

EMF : The final component in our circuit is a source of voltage that


produces an electromotive force (EMF), driving the charge
through the circuit.

As current passes through the voltage source, there is a voltage


gain, which we denote by E(t) volts (that is, a voltage drop of
−E(t) volts).

MATH2030 Differential Equations (AY 2023-24) 90 / 177


A circuit containing all of these components is shown in the figure
below

Such a circuit is called an RLC circuit.

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.

MATH2030 Differential Equations (AY 2023-24) 91 / 177


Or equivalently,
di q
L + Ri + = E(t), (6)
dt C
which is a basic differential equation for an RLC circuit.

There are 3 cases which are important in application, 2 of which (RL


circuit and RC circuit) are formulated by first-order linear differential
equations.

MATH2030 Differential Equations (AY 2023-24) 92 / 177


Case 1. An RL circuit. In the case when no capacitor is present, we
have what is referred to as an RL circuit.

The differential equation (6) then reduces to

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.

Case 2. An RC circuit. In the case when no inductor is present, we


have what is referred to as an RC circuit. The differential equation (6)

then reduces to
1 E
i+ q= .
RC R

MATH2030 Differential Equations (AY 2023-24) 93 / 177


dq
In this equation, we have 2 unknowns, q(t) and i(t). Since i(t) = ,
dt
we obtain the following differential equation

dq 1 E
+ q= . (8)
dt RC R

This case can be solved for the charge q(t) on the plates of the
capacitor.

The current in the circuit can then be obtained from


dq
i(t) =
dt
by differentiation.

MATH2030 Differential Equations (AY 2023-24) 94 / 177


Case 3. An RLC circuit.
In the general case, we must consider all 3 components to be
presented in the circuit.

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

This is the second-order equation which will be studied later.

MATH2030 Differential Equations (AY 2023-24) 95 / 177


For the remainder of this section, we restrict our attention to RL and
RC circuits.

Since these are both first-order linear differential equations, we can


solve them using the techniques in the previous section, once the
applied EMF, E(t) has been specified.

The two most important forms for E(t) are

E(t) = E0 and E(t) = E0 cos ωt,

where E0 and ω are constants.

MATH2030 Differential Equations (AY 2023-24) 96 / 177


The first of these corresponds to a source of EMF such as a battery
and the resulting current is called a direct current (DC).

The second form of EMF oscillates between ±E0 and is called an


alternating current (AC).

MATH2030 Differential Equations (AY 2023-24) 97 / 177


Example
Determine the current in an RL circuit if the applied EMF is
E(t) = E0 cos ωt, where E0 and ω are constants, and the initial current
is 0.

Solution. From equation (7) we have


di R E0
+ i= cos ωt,
dt L L
which we write as
di E0
+ ai = cos ωt,
dt L
where a = R/L.
An integrating factor is I(t) = eat , which leads the equation to
d  E0 at
eat i = e cos ωt.
dt L
MATH2030 Differential Equations (AY 2023-24) 98 / 177
Integrating this equation using the standard integral
Z
1
eat cos ωt dt = 2 eat (a cos ωt + ω sin ωt) + C,
a + ω2
yields
E0
eat i = eat (a cos ωt + ω sin ωt) + C,
L(a2 + ω 2 )
where C is an arbitrary constant.

Consequently,

E0
i(t) = (a cos ωt + ω sin ωt) + Ce−at .
L(a2+ ω2)

MATH2030 Differential Equations (AY 2023-24) 99 / 177


Imposing the initial condition i(0) = 0, we obtain

E0 A
C(t) = − ,
L(a2 + ω 2 )

which gives

E0 A
a cos ωt + ω sin ωt − ae−at .

i(t) = 2 2
L(a + ω )

This solution can be written in the form

i(t) = iS (t) + iT (t),

where
E0 aE0
e−at .

iS (t) = a cos ωt + ω sin ωt , iT (t) = −
L(a2 2
+ω ) L(a2 + ω 2 )

MATH2030 Differential Equations (AY 2023-24) 100 / 177


The term iT (t) decays exponentially with time and is referred to as the
transient part of the solution.

As t → ∞, the solution approaches the steady-state solution iS (t).

MATH2030 Differential Equations (AY 2023-24) 101 / 177


Example
Consider the RC circuit in which R = 0.5Ω, C = 0.1 F, and E0 = 20 V.
Given that the capacitor has zero initial charge, determine the current
in the circuit after 0.25 seconds.

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 ,

where C is an arbitrary constant.

MATH2030 Differential Equations (AY 2023-24) 102 / 177


Imposing the initial condition q(0) = 0 yields C = −2, so that

q(t) = 2(1 − e−20t ).

Differentiating this expression for q gives the current in the circuit

dq
i(t) = = 40e−20t .
dt

Finally,
i(0.25) = 40e−5 ≈ 0.27A.

MATH2030 Differential Equations (AY 2023-24) 103 / 177

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy