Vous êtes sur la page 1sur 18

Linear Algebra and Differential Equations

Lecture 3
First Order Linear Equations

June 15, 2016

Linear Algebra and Differential EquationsLecture 3First Order Linear


June 15,
Equations
2016

1 / 18

General Observations
The most general form of a first order linear equation is
x 0 = p(t)x + q(t)
If p(t) and q(t) are continuous functions, our theorem guarantees that a
solution to the equation exits and it is unique since
f (t, x) = p(t)x + q(t)
is continuous and

f
= p(t)
x

is also continuous.

Linear Algebra and Differential EquationsLecture 3First Order Linear


June 15,
Equations
2016

2 / 18

Solution Method 1 : Integrating factor


First rearrange the DE in the form
x 0 p(t)x = q(t)
Now multiply the DE by a function m(t), the integrating factor, with the
property that
dm(t)
= p(t)m(t)
dt
This is a separable equation
Z
Z
R
dm
= p(t) dt m(t) = e p(t) dt
m
The differential equation the form
m(t)

dx
p(t)m(t)x = m(t)q(t)
dt

Linear Algebra and Differential EquationsLecture 3First Order Linear


June 15,
Equations
2016

3 / 18

Using the properties of m(t) the DE becomes


m(t)

dm
dx
+
x = m(t)q(t)
dt
dt

The left hand side is an exact derivative.


d
(m(t)x) = m(t)q(t)
dt
Integrating and dividing by m(t) gives
Z
1
x(t) =
m(t)q(t) dt
m(t)
So the final form of the solution is
x(t) = e

p(t) dt

p(t) dt

q(t) dt

Linear Algebra and Differential EquationsLecture 3First Order Linear


June 15,
Equations
2016

4 / 18

Example
Find the general solution to the DE
x
x0 = + t3
t
The integrating factor is
m(t) = e

1/t dt

=t

Multiplying the DE by m(t) = t


tx 0 + x = (tx)0 = t 4
Integrating and dividing by t gives the general solution
1
C
x(t) = t 4 +
5
t
Linear Algebra and Differential EquationsLecture 3First Order Linear
June 15,
Equations
2016

5 / 18

Solution Method 2 : Variation of Parameters


Given the equation
x 0 = p(t)x + q(t)
Let y be a solution of the corresponding homogeneous equation
y 0 = p(t)y

y (t) = e

p(t) dt

Now assume that x(t) has the form


x(t) = u(t)y (t)
Substituting this in the DE
(uy )0 = u 0 y + uy 0 == u 0 y + u(py ) = puy + q(t)
yu 0 = q
Linear Algebra and Differential EquationsLecture 3First Order Linear
June 15,
Equations
2016

6 / 18

Rearranging and integrating gives


Z
u(t) =

q(t)
dt
y (t)

and so the solution of the original equation is


Z
Z
R
R
q(t)
p(t) dt
x(t) = y (t)u(t) = y (t)
dt = e
e p(t) dt q(t) dt
y (t)
Note Since the antiderivative involves an arbitrary constant the solution
will have the form
Z
q(t)
x(t) = y (t)
dt + Cy (t) = xp (t) + Cy (t)
y (t)
in other words we can add any constant times the solution of the
homogeneous equation to any particular xp and it will still be a solution.
Linear Algebra and Differential EquationsLecture 3First Order Linear
June 15,
Equations
2016

7 / 18

Mixture Problems
Problems involving a mixture of a solute and solvent in a container with
an inflow and outflow of solution naturally lead to first order linear
equations. Let the rate of inflow of solution be qin , the concentration of
solute in the inflow be cin , and qout be the rate of outflow of the solution.

If x(t) is the amount of solute and V (t) is the volume of solution in the
tank then the rate of change of x will be given by the DE
x 0 (t) = qin cin qout

x
V (t)

Linear Algebra and Differential EquationsLecture 3First Order Linear


June 15,
Equations
2016

8 / 18

An Example
A large tank, with capacity 50 m3 , initially has 10 m3 of a salt solution
with initial concentration of 0.75 kg/m3 . A solution with concentration of
0.5 kg/m3 is pumped into the tank a a rate of 6 m3 /min. The well mixed
solution in the tank is pumped out at a rate of 4 m3 /min. What is the salt
concentration when the tank is full?
The volume is increasing at a rate of 2 m3 /min so
V (t) = 10 + 2t
The DE for the amount of salt x(t) is
x 0 = (0.5)(6) 4
or
x0 =

x
10 + 2t

4x
+3
10 + 2t

Linear Algebra and Differential EquationsLecture 3First Order Linear


June 15,
Equations
2016

9 / 18

The associated homogeneous DE is


y0 =
with solution
y (t) =

2
y
5+t

1
(5 + t)2

Let

u(t)
(5 + t)2
Substituting into the DE and simplifying
x(t) =

u 0 (t)
=3
(5 + t)2
whence
u(t) = (5 + t)3 + C
and
x(t) = (5 + t) +

C
(5 + t)2

Linear Algebra and Differential EquationsLecture 3First Order June


Linear
15,Equations
2016

10 / 18

The concentration is given by


c(t) =

x(t)
1
C
= +
V (t)
2 2(5 + t)3

Initially the concentration is 0.75 kg/m3


0.75 = 0.5 +

C
2(53 )

C = 62.5

The tank is full when V (t) = 50 m3 that is when t = 20 min.


c(20) = 0.5 +

62.5
= 0.502 kg/m3
3
2(25 )

Linear Algebra and Differential EquationsLecture 3First Order June


Linear
15,Equations
2016

11 / 18

Integration by parts
Solution of first order linear DEs often requires integration by parts. The
formula, which is just the antiderivative of the product rule, is
Z
Z
0
f (t)g (t) dt = f (t)g (t) g (t)f 0 (t) dt
For example
Z

t 2 cos(bt) dt

Let
f (t) = t 2
Z

g 0 (t) = cos(bt)

t 2 cos(bt) dt = t 2

f 0 (t) = 2t

sin(bt)

Z
2t

g (x) =

sin(bt)
b

sin(bt)
b


dt

Linear Algebra and Differential EquationsLecture 3First Order June


Linear
15,Equations
2016

12 / 18

We need to use integration by parts again to evaluate the second integral.


Let
f (t) = t

g 0 (t) = sin(bt)

f 0 (t) = 1

g (t) =

cos(bt)
b


 Z 

cos(bt)
cos(bt)
t sin(bt) dt = t

dt
b
b


sin(bt)
cos(bt)
+
= t
b
b2

Putting all together we have




Z
2
cos(bt) sin(bt)
2
2 sin(bt)
t cos(bt) dt = t

t
+
b
b
b
b2

Linear Algebra and Differential EquationsLecture 3First Order June


Linear
15,Equations
2016

13 / 18

Another example
Suppose we two substances A and B that change into one another
reversibly
A B
B A
The amounts of each substance are a and b and the reaction rates of the
two reactions are k1 and k2 . If m moles of A are added per minute find
a(t).
Assume that initially
a(0) = a0

b(0) = b0

then the amounts of a and b must satisfy


a(t) + b(t) = a0 + b0 + mt

Linear Algebra and Differential EquationsLecture 3First Order June


Linear
15,Equations
2016

14 / 18

The rate of change of a is given by the DE


da
= k1 a + k2 b + m = k2 (a0 + b0 ) + mk2 t (k1 + k2 )a
dt
To streamline the algebra define
k = k1 + k2

M = m + k2 (a0 + b0 )

Then the DE has the form


da
= M + mk2 t ka
dt
This is a first order linear equation with integrating factor
m(t) = e kt
The solution is
a(t) = e
=

kt

Z
(M + mk2 t)e

kt


dt

M
mk2 mk2
2 +
t + Ce kt
k
k
k

Linear Algebra and Differential EquationsLecture 3First Order June


Linear
15,Equations
2016

15 / 18

Heat Transfer
Another source of linear first order equations is heat transfer. Newtons
law of cooling states that the rate of change of the temperature of a body
is proportional to the difference between the temperature of the body and
the temperature of its surroundings, Ts
dT
= k(T Ts )
dt
with k a positive constant. Thus if T > Ts the temperature will decrease
and if T < Ts it will increase.
If Ts is a constant the equation is separable with solution
T = Ts + (T0 Ts )e kt
where T (0) = T0
Linear Algebra and Differential EquationsLecture 3First Order June
Linear
15,Equations
2016

16 / 18

An Example
A home has its air conditioning fail. The outside temperature varies as a
function of t.
Ts (t) = 10 + 5 cos(t)
If the heat transfer coefficient k = 2o C/day and the temperature when the
air conditioner failed was 12o C, find the temperature of the house as a
function of time.
The DE is
T 0 = 2(T (10 + 5 cos(t)))
We could use either the integrating factor or variation of parameters
method to solve it but the solution involves two integrations by parts and
some algebra. Instead we will use the property that the solution will
consist of a particula integral and an arbitrary constant times the
homogeneous solution.
Linear Algebra and Differential EquationsLecture 3First Order June
Linear
15,Equations
2016

17 / 18

The solution of the homogeneous equation is


y = e 2t
Now we guess a solution in the form
T (t) = a + b cos(t) + c sin(t)
Substituting into the DE
b sin t + c cos t + 2(a + b cos t + c sin t) = 2(10 + 5 cos t)
This has to be true for all t. This leads to the three equations
a = 10

2b + c 10 = 0

2c b = 0

with solution
a = 10

b=4

c=2

Then
T (t) = 10 + 4 cos t + 2 sin t + Ce 2t
and the initial condition implies C = 2.
Linear Algebra and Differential EquationsLecture 3First Order June
Linear
15,Equations
2016

18 / 18

Vous aimerez peut-être aussi