Professional Documents
Culture Documents
MAT1264 Lecture Unit 1
MAT1264 Lecture Unit 1
Mpinganzima Lydie 1
dy d2 y dx dy
+ 5y = ex , + 6y = 0, and + = 2x + y.
dx dx2 dt dt
are ordinary differential equations.
The ordinary derivatives may be written by using either the Leibniz notation dy/dx, d2 y/dx2 ,
′′ ′′′
d3 y/dx3 , . . . or the prime notation y ′ , y , y , . . . By using the prime notation, the two first
equations above can be written as
′′
y ′ + 5y = ex , y − y ′ + 6y = 0.
Observe that the prime notation is used to denote only the first three derivatives. Other derivatives
are y (4) , y (5) , . . . , y (n) where y (n) = dn y/dxn .
In symbols we can express an nth-order ordinary differential equation in one dependent variable
by the general form,
′′
F (x, y, y ′ , y , . . . , y (n) ) = 0, (1)
′′
where F is a real-valued function of n + 2 variables: x, y, y ′ , y , . . . , y (n) .
Classification of ODE: Ordinary differential equations are classified by order and linearity.
The order of a differential equation is the order of the highest derivative in the equation. In the
first example above, the first and the third equations are of the first order and the second equation
is of the second order.
′′
An nth-order ordinary differential equation (1) is said to be linear if F is linear in y, y ′ , y , . . . , y (n) .
This means that an nth ODE is linear if (1) can be written as
dn y dn−1 y dy
an (x) n
+ a n−1 (x) n−1
+ . . . + a1 (x) + a0 (x)y = g(x).
dx dx dx
For a first and second order ODE, we have
dy d2 y dy
a1 (x) + a0 (x)y = g(x), a2 (x) 2
+ a1 (x) + a0 (x)y = g(x)
dx dx x
Observe that
′′
1. The dependent variable y and its derivatives y ′ , y , . . . , y (n) are of the first degree, that is, the
power of each term involving y is 1.
′′
2. The coefficients a0 , a1 , a2 , . . . , an of y, y ′ , y , . . . , y (n) depend at most on the dependent vari-
able x.
MAT1264 Lecture 1 prepared by Dr. Mpinganzima Lydie 2
(1 − y)y ′ + 2y = ex , nonlinear
d2 y
+ sin y = 0, nonlinear
dx2
′′
y − y ′ + 2y = x, linear
Definition. Any function y, defined on an interval I and possessing at least n derivatives that are
continuous on I, which when substituted into an nth-order ordinary differential equation reduces
the equation to an identity, is said to be a solution of the equation on the interval.
Example. The functions y = c1 cos 4x and y = c2 sin 4x, where c1 and c2 are arbitrary constants
or parameter, are both solutions of the linear differential equation
′′
y + 16y = 0.
′′
Solution. For y = c1 cos 4x, the first two derivatives are y ′ = −4c1 sin 4x and y = −16c1 cos 4x.
′′
Substituting y and y then gives
′′
y + 16y = −16c1 cos 4x + 16c1 cos 4x = 0
′′
Similarly, y = c2 sin 4x, we have y = −16c2 sin 4x, so that
′′
y + 16y = −16c2 sin 4x + 16c2 sin 4x = 0
Finally, it is straightforward to verify that the linear combination of solutions, or the two-parameter
family y = c1 cos 4x + c2 sin 4x, is also a solution of the differential equation.
Exercises
1. State the order of the given ODE, and whether it is linear or nonlinear. If it is linear, is it
homogeneous or nonhomogeneous?
dy ′′
(f) y + 4y ′ − 3y = 2y 2
(a) = 5y
dx d3 y dy
d2 y (g) 3
+ t + t2 y = t3
(b) +x=y dt dt
dx2 dx
dy (h) cos x + x sin t = 0
(c) y =x dt
dx ′′
′′′ (i) y (4) + ex y = x3 y ′
(d) y + xy ′ = x sin x
′′ 1
′′
(e) y + x sin xy ′ = y (j) x2 y + ex y ′ =
y
′′
2. Verify that y = cos x and y = sin x are solutions of the ODE y + y = 0. Are any of the
following functions solutions?
dy
p(y) = g(x),
dx
where p(y) = 1/h(y) and whose solution is
Z Z
p(y) dy = g(x) dx, i.e. H(y) = G(x) + C,
where H(y) and G(x) are antiderivatives of p(y) and g(x), respectively and C is the constant of
integration.
Example. Solve (1 + x) dy = y dx = 0.
MAT1264 Lecture 1 prepared by Dr. Mpinganzima Lydie 4
dy dx
Solution. This equation can be written as = . Integrating on both sides, we get
dx 1+x
dy dx
Z Z
= , so ln|y| = ln|1 + x| + ln C, that is, y = C(1 + x)
dx 1+x
Example. Solve the initial-value problem
dy
= x2 y 3 , y(1) = 3
dx
dy
Solution. Separating this ODE gives = x2 dx. Thus,
y3
dy −1 x3
Z Z
2
= x dx, so = + C.
y3 2y 2 3
−1 1 −7
Since y = 3 when x + 1, we have = + C and C = . Substituting this value into the above
18 3 18
solution and solving for y, we obtain
3
y(x) = √ .
7 − 6x3
1/3
7
This solution is valid for x < .
6
dy
+ P (x)y = f (x) (3)
dx
The solution is a sum of two solutions y = yc + yp , where yc is a solution to the associated
homogeneous equation
dy
+ P (x)y = 0
x
and yp is a particular solution of the nonhomogeneous equation (3).
The homogeneous equation is separable and solving for y gives
R
P (x) dx
yc = Ce−
The particular solution yp can be found using the method of variation of parameters described
below.
MAT1264 Lecture 1 prepared by Dr. Mpinganzima Lydie 5
Variation of parameters
The variation of parameter method is a method
R
used to find a particular solution yp . The idea is
to find u so that yp = uy1 where y1 = e − P (x) dx solves the corresponding homogeneous equation.
Substituting yp in (3) gives
dy1 du du dy1
u + y1 + P (x)uy1 = f (x) or y1 +u + P (x)y1 = f (x)
dx dx dx dx
This gives
du
y1 = f (x)
dx
dy1
since + P (x)uy1 = 0 as y1 is the homogeneous solution. We therefore obtain
dx
Z R
f (x)
Z
u= dx = e P (x) dx f (x) dx
y1
Hence R Z R
P (x) dx P (x) dx
yp = uy1 = e− e f (x) dx
and R R Z R
P (x) dx P (x) dx P (x) dx
y = Ce− + e− e f (x) dx
R
The function e P (x) dx is called an integrating factor
R of the given differential equations because,
if we P (x) dx , the left side becomes the derivative
R multiply both sides of the equation (3) by e
of e P (x) dx y(x)
dy
Example. Solve + xy = x3
dx R R 2
Solution. Here P (x) = x and f (x) = x3 . We have e− P (x) dx = e− x dx = e−x /2 The homoge-
neous solution is
2
yc = Ce−x /2
and a particular solution is Z
−x2 /2 2 /2
yp = e ex x3 dx
So
2 /2 2 /2 2 /2
yp = e−x (x2 ex − 2ex ) = x2 − 2
and
2 /2
y = Ce−x + x2 − 2.
MAT1264 Lecture 1 prepared by Dr. Mpinganzima Lydie 6
To find the time at which the number of bacterias has tripled, we solve
3P0 = P0 e0.4055t
LR series circuit
L
E
R
RC series circuit
R
E
C
MAT1264 Lecture 1 prepared by Dr. Mpinganzima Lydie 8
Exercises
1. Solve the following separable equations
dy y dy x2 dy
(a) = (c) = 2 (d) = x2 y 2
dx 2x dx y dx
dy 3y − 1 dx
(b) = (e) = ex sin t
dx x dt
4. An RL circuit has an electromagnetic force (E(t)) given (in volts) by 3 sin 2t, a resistance (R)
of 10 ohms, an inductance (L) of 0.5 henry, and an initial current (i) of 6 amperes. Find the
current in the circuit at any time t?