Differential Equation
Differential Equation
National Seminar on
“Real-World Applications
of Mathematics and Statistics”
Professor
Department of Mathematics
Birla Institute of Technology, Mesra
Ranchi-835215, India
spadhi@[Link]; ses_2312@[Link]
Introduction
Introduction
I In many cases it is of interest to model the evolution of some
system over time.
I There are two distinct cases.
I One can think of time as a continuous variable, or one can think
of time as a discrete variable.
I The first case often leads to differential equations.
I If we consider a time period T and observe (or measure) the
system at times t = kT , k ∈ N0 , the result is a sequence
x0 , x1 , x2 , . . . .
I In some cases these values are obtained from a function f ,
which is defined for all t ≥ 0.
I In this case xk = f (kT ) and this method of obtaining the values
is called periodic sampling.
I One models the system using a difference equation, or what is
sometimes called a recurrence relation.
Introduction
Introduction
I Difference equations arises in many fields of science, for
example:
I In control engineering, the radar tracking devices receive
discrete pulses from the target which is being tracked.
I In electrical networks, the electrical signals are measured
in discrete time pulses
I Difference equations also arises in theory of probability,
statistical problems and many other fields.
I In fact, difference equations are essential for systems with
discrete or digital data.
Beginning Example
Example
Consider a plane that has lying in it k nonparallel lines. Into
how many separate compartments will the plane be divided if
not more than two lines intersect in the same point?
Beginning Example
Example
Consider a plane that has lying in it k nonparallel lines. Into
how many separate compartments will the plane be divided if
not more than two lines intersect in the same point?
Beginning Example
Example
Consider a plane that has lying in it k nonparallel lines. Into
how many separate compartments will the plane be divided if
not more than two lines intersect in the same point?
Beginning Example
Example
Consider a plane that has lying in it k nonparallel lines. Into
how many separate compartments will the plane be divided if
not more than two lines intersect in the same point?
When k = 2, the second line, cut the previous one line at one
point and divide the previous two compartments into two
compartments and thus making total four compartments.
Difference Equations Dr. Seshadev Padhi, BIT, Mesra
Difference Equations
Beginning Example
Example
Consider a plane that has lying in it k nonparallel lines. Into
how many separate compartments will the plane be divided if
not more than two lines intersect in the same point?
When k = 3, the third line, cut the previous two lines at two
points and divide the previous three compartments into two
compartments and thus making total seven compartments.
Difference Equations Dr. Seshadev Padhi, BIT, Mesra
Difference Equations
Beginning Example
Example
Consider a plane that has lying in it k nonparallel lines. Into
how many separate compartments will the plane be divided if
not more than two lines intersect in the same point?
When k = 4, the fourth line, cut the previous three lines at three
points and divide the previous four compartments into two
compartments and thus making total eleven compartments.
Difference Equations Dr. Seshadev Padhi, BIT, Mesra
Difference Equations
Beginning Example
Example
Consider a plane that has lying in it k nonparallel lines. Into
how many separate compartments will the plane be divided if
not more than two lines intersect in the same point?
Nk+1 = Nk + (k + 1).
Difference Equation
Difference Equation
An ordinary difference equation is a relation, of the form
Difference Equation
Remark
1. The expression given by the equation (1) is an nth -order
difference equation if and only if the term yk appears in the
function F on the right-hand side.
2. Shifts in the labeling of the indices do not changed the
order of a difference equation. For example, for r integer,
D(k + 1) = (1 − p)D(k ) + D0 .
Also,
D0
lim D(k) = .
k→∞ p
p(n+1)
1 − A
FIGURE 1.9. Asymptotically stable equilibrium price.
1 − A 1.3 Equilibrium Points 17
p(n+1)
p0 p(n)
p0
p0
p(n) p(n)
FIGURE 1.9. Asymptotically stable equilibrium price. FIGURE 1.10. Stable equilibrium price. FIGURE 1.11. Unstable equilibrium price.
p(n+1)
(i) In case (a), prices alternate above and below
Anbut converge
explicit to the
solution of equi-
(1.3.7) with p(0) = p0 is given by
librium price p*. In economics lingo, the price p∗ is considered “stable”;
in mathematics, we refer to it as “asymptotically stable” (Figure
B 1.9). B
p(n) = p0 − An + (Exercises 1.3, Problem 9). (1.3.9)
1−A 1−A
(ii) In case (b), prices oscillate between two values only. If p(0) = p0 , then
Difference Equations p(1) = −p0 +B and p(2) = p0 . Hence the equilibrium point p∗ is stable
Dr. Seshadev Padhi, BIT, Mesra
Difference Equations
dy
= f (y, t). (8)
dt
where f (y, t) is a given function of y and t, which cannot
be integrated in closed form in terms of the elementary
functions.
I We now proceed to construct the a numerical scheme to
determine the numerical solution.
yk+1 − yk
= f (yk , (∆t)k).
∆t
I If y0 is specified, then yk for k = 1, 2, 3, . . . , can be
determined.
I This elementary method is called forward-Euler scheme.
d 2y dy
+ 3x + 3y = 0, (9)
dx 2 dx
where the coefficients, Ck , are to be found.
X ∞ X ∞
d 2y k−2
= k(k − 1)Ck x = k(k − 1)Ck x k−2 (11)
dx 2
k=0 k=2
and
∞
X ∞
X
y= Ck x k = Ck−2 x k−2 (12)
k=0 k=2
How This
manyexample
pairsis of
a special
rabbitscase will
of thethere
Fibonacci
be sequence,
after one given
yearby if starting
FIGURE 2.1.
Difference Equations Dr. Seshadev Padhi, BIT, Mesra
rabbits at the end of n months, then the recurrence relation that represents
Difference Equations
this model is given by the second-order linear difference equation
Fibonacci Sequence - The
F (n + 2) Famous
= F (n Example
+ 1) + F (n), F (0) = 1, F (1) = 2, 0 ≤ n ≤ 10.
This example is a special case of the Fibonacci sequence, given by
F (n + 2) = F (n + 1) + F (n), F (0) = 0, F (1) = 1, n ≥ 0.
Example (Fibonacci Sequence - Rabbit Problem)(2.3.13)
TableThe first 14 terms are given by 1, 2, 3, 5, 8, 13, 21, 34, 55, 89, 144, 233,
below shows the number of pairs of rabbits at the end of
and 377, as already noted in the rabbit problem.
each month.
The first pair has offspring at the end of the first month, and
thus we have two pairs.
At the end of the second month only the first pair has offspring,
and thus we have three pairs.
At the end ofMonth
the0 third month, the Month 1
first and second Month2
pairs will
have offspring, and hence we FIGURE
have [Link] pairs. Continuing this
Some Examples
Example
Some Examples
Some Examples
yk+1 − yk−1 = 0
Proof.
If the values, y0 , y1 , . . . , yn−1 are given, then the difference
equation with k = 0 uniquely specifies, yn . Once yn is known,
the difference equation with k = 1 gives yn+1 . Proceeding in
this way, all yk , for k ≥ n, can be determined.
Operators ∆ and E
Operators ∆ and E
I In the theory of difference equations, more frequently, we
use the operators ∆ and E to denote the differences:
I The operator ∆ (called as (first) difference operator) is
defined as follows:
∆yk = yk+1 − yk .
I The second difference operator is defined as ∆2 = ∆ · ∆,
∆2 yk = ∆(∆(yk )) = ∆(yk +1 − yk ) = yk+2 − 2yk+1 + yk .
I In general,
n(n − 1)
∆n yk =yk+n − nyk+n−1 + yk+n−2 + . . .
2!
n(n − 1) . . . (n − i + 1)
+ (−1)i yk+n−i + . . . + (−1)n yk
i!
Difference Equations Dr. Seshadev Padhi, BIT, Mesra
Difference Equations
Operators ∆ and E
Operators ∆ and E
E p = yk+p .
I From the definition of ∆ and E, we have
∆yk = (E − 1)yk
and that
∆ ≡ E − 1 or E ≡ ∆ + 1.
I Hence, we have
n
X
n n n
yk +n = E yk = (1 + ∆) yk = ∆i yk .
i
i=0
Definition
Let the functions a0 (k), a1 (k ), . . . , an (k ), and Rk be defined
over a set of integers, k1 ≤ k ≤ k2 , where k1 and k2 can be
either finite or unbounded in magnitude. An equation of the
form
Definition
The (15) is called homogeneous if Rk is identically zero for all k
i.e.
yk+n + a1 (k)yk+n−1 + . . . + an (k)yk = 0; (16)
otherwise, it is called an inhomogeneous equation.
Definition
If the functions a0 (k), a1 (k ), . . . an (k) are constant then the (15)
is said to Linear difference equations with constant coefficients.
Definition
A set of k linearly independent solutions of (16) is called a
fundamental set of solutions.
Definition
The Casoratian C(k ) of the solutions f1 (k ), f2 (k), ..., fn (k) is dined
as
f (k ) f (k) . . . f (k )
1 2 n
f1 (k + 1) f2 (k + 1) ... fn (k + 1)
C(k) = .. ..
. .
f1 (k + n − 1) f2 (k + n − 1) . . . fn (k + n − 1)
Thoerem
Let the functions, a1 (k), a2 (k ), . . . , an (k ) be defined for all k; let an (k) be
nonzero for all k; then there exist n linearly independent solutions
y1 (k), y2 (k ), . . . , yn (k ) of (16).
Thoerem
An nth -order linear difference equation has n and only n linearly
independent solutions.
Thoerem
The general solution of equation (16) is given by
yk = c1 y1 (k ) + c2 y2 (k ) + . . . + ck yn (k ),
f (E)yk = 0, (19)
where
f (E) = E n + a1 E n−1 + . . . + an−1 E + an . (20)
Definition
The characteristic equation associated with equation (17) or (19) is
Thoerem
Let ri be any solution to the characteristic equation of (21); then
yk = rik (22)
Thoerem
Assume the n roots of the characteristic equations are distinct;
(i)
then a fundamental set of solution is yk = rik , i = 1, 2, . . . , n
and that the general solution to the homogeneous equation
(18) is
(1) (2) (n)
yk = c1 yk + c2 yk + . . . + cn yk , (23)
where the n constants ci are arbitrary.
Thoerem
Let the roots of the characteristic equation (21) of the
homogeneous difference equation (18) be ri with multiplicity mi ,
i = 1, 2, . . . , l, where m1 + m2 + . . . + ml = n. Then, the general
solution of (21) is:
(1) (1) (1)
yk =r1k (A1 + A2 k + . . . + Am1 k m1 −l )
(2) (2) (2)
+ r2k (A1 + A2 k + . . . + Am2 k m2 −l )
+ ...
(l) (l) (l)
+ rmk l (A1 + A2 k + . . . + Aml k ml −l ). (24)
Thoerem
If the linear difference equation (18) has real coefficients, then
any complex roots of the characteristic equation (21) must
occur in complex conjugates pairs. Moreover, the
corresponding fundamental solutions can be written in either of
the two equivalent forms:
(1) (2)∗
yk = yk = r1k
or
(1) (2)
ȳk = R k cos(kθ), ȳk = R k sin(kθ),
where the complex conjugate pair of roots are
p
r1 = r2∗ = a + ib = Reiθ ; R = a2 + b2 , tan θ = b/a.
yk = c1 r1k + c2 r2k .
yk = (c1 + c2 k )r k .
Three Cases
Case 3: The characteristic roots are complex conjugates,
√
say r1,2 = a ± ib = Re ±iθ , where R = a2 + b 2
b
and θ = tan−1 a . Then the general solution is
k k
yk = c1 Reiθ + c2 Re−iθ
= R k [c1 (cos k θ + i sin kθ) + c2 (cos kθ − i sin kθ)]
= R k [(c1 + c2 ) cos k θ + (ic1 − ic2 ) sin k θ]
= R k [A1 cos kθ + A2 sin kθ]
Example
Find the general solution of
Solution
The characteristic equation for the given problem is:
r 2 + 5r + 6 = 0,
yk = c1 (−3)k + c2 (−2)k .
Example
Find the general solution of
yk+2 − 2yk+1 + yk = 0.
Solution
The characteristic equation for the given problem is:
r 2 − 2r + 1 = 0 or (r − 1)2 = 0,
Example
Find the general solution of
Solution
The characteristic equation for the given problem is:
r 2 − 2r + 2 = 0,
r 2 − r − 1 = 0.
√
1+ 5
Hence the characteristic roots are r1 = α = 2 and
√
1− 5
r2 = β = 2 .
The general solution of (1) is
√ !n √ !n
1+ 5 1− 5
F (k ) = a1 + a2 , k ≥ 1. (2)
2 2
1 1
a1 = √ , a2 = − √ .
5 5
Consequently,
√ !k √ !k
1 1+ 5 1− 5 1
F (k) = √ − = √ (αk −β k ). (3)
5 2 2 5
F (k+1)
It is interesting to note that lim F (k) = α ≈ 1.618. This
k→∞
number is called the golden mean/ratio, which supposedly
represents the ratio of the sides of a rectangle that is most
pleasing to the eye.
Difference Equations Dr. Seshadev Padhi, BIT, Mesra
Difference Equations
yk +n + a1 yk+n−1 + . . . + an yk = Rk , an 6= 0, (25)
Definition
A family of a term Rk is the set of all functions of which Rk and
E m Rk , for m = 1, 2, 3, . . . , are linear combinations.
Definition
A finite family is a family that contains only a finite number of
functions.
Finally, note that for the case Rk is a product, the family consists of
all possible products of distinct members of the individual term
families. For example, the term Rk = k l ak has the finite family
{ak , kak , k 2 ak , . . . , k l ak }.
Likewise, the term Rk = k l cos(ck ) has the finite family
{cos(ck ), k cos(ck ), . . . , k l cos(ck ), sin(ck), k sin(ck), . . . , k l sin(ck )}.
Some Examples
Example (A)
The second-order difference equation
where c1 and c2 are arbitrary constants. The right-hand side of the difference
equation is 2 + 4k . Note that, the 2 has the family that consists of only one
member {1}, while 4k has the family {1, k}. Therefore, the combined family is
{1, k}. Since, neither member of the combined family occurs in the
homogeneous solution, we write the particular solution as the following linear
combination:
(P)
yk = A + Bk ,
where constants A and B are to be determined.
Some Examples
Example (A)
Substituting the above into the given difference, we obtain
2A − 3B = 2, 2B = 4.
Therefore,
A = 4, B − 2,
and the particular solution is
(P)
yk = 4 + 2k.
yk = c1 3k + c2 2k + 4 + 2k.
Some Examples
Example (B)
Consider the difference equation
yk +2 − 6yk+1 + 8yk = 2 + 3k 2 − 5 · 3k .
Some Examples
Example (B)
No member of this family occur in the homogeneous solution.
Therefore, the particular solution takes the form
(P)
yk = A + Bk + Ck 2 + D3k ,
3A − 4B − 2C = 2; 3B − 8C = 0; 3C = 3; D = 5.
Difference Equations Dr. Seshadev Padhi, BIT, Mesra
Difference Equations
Some Examples
Example (B)
Solving the above equations, we obtain
A = 44/9; B = 8/3; C = 1; D = 5,
(P) 44 8
yk = + k + k 2 + 5 · 3k ,
9 3
and the general solution to the given difference is
44 8
yk = c1 2k + c2 4k + + k + k 2 + 5 · 3k .
9 3
Some Examples
Example (C)
The equation
yk+2 − 4yk+1 + 3yk = k4k
has the homogeneous solution
ykH = c1 + c2 3k ,
Some Examples
Example (C)
doing this gives
and
(P) 16 k 1 k
yk =− 4 + k4
9 3
16 k
and the general solution is yl = c1 + c2 3k − 9 4 + 31 k4k .
Some Examples
Example (D)
Consider the third-order difference equation
r 3 − 7r 2 + 16r − 12 = (r − 2)2 (r − 3) = 0,
Some Examples
Example (D)
The family of Rk = k 2k is {2k , k2k } and both members of this
family occur in the homogeneous solution; therefore, we must
multiply the family by k 2 to obtain a new family that does not
contain any function that appear in the homogeneous solution.
The new family is {k 2 2k , k 3 2k }. Thus, the particular solution is
(P)
yk = (Ak 2 + Bk 3 )2k ,
Some Examples
Example (D)
Therefore, the particular solution is
(P) 1
yk =− (3 + k )k 2 2k ,
24
and the general solution is
1
yk = (c1 + c2 k)2k + c3 3k − (3 + k )k 2 2k .
24
Some Examples
Example (E)
Consider the second order difference equation
k kπ
y(k + 2) + 4y(k) = 8(2 ) cos .
2
r 2 + 4 = 0.
Some Examples
Example (E)
Notice that the family of Rk = 8(2k ) cos cos k2π is
{(2k ) cos kπ
2 , (2k ) sin kπ }, both of the members belongs to
2
the homogeneous solution. So, we assume
(P) kπ
yk = 2k ak cos + bk sin (kπ2) .
2
(P)
Substituting yk into given difference equation gives
k +2 kπ kπ
2 a(k + 2) cos + π + b(k + 2) sin +π
2 2
kπ kπ kπ
+ (4)2k ak cos + bk sin = 8(2k ) cos .
2 2 2
Some Examples
Example (E)
Replacing cos ((k π)/2 + π) by − cos ((k π)/2), and
sin ((kπ)/2 + π) by − sin ((k π)/2) and then comparing the
coefficients of the cosine terms leads us to a = −1. Then by
comparing the coefficients of the sine terms, we realize that
b = 0.
(P)
By substituting these values back into yk , we have that
(P) k kπ
yk = −2 k cos ,
2
y (k + 1) = µy (k ), µ > 0. (26)
y (k) = µk y0
x(k+1)
x(k)
x0 x*
x(k+1)
x(k)
x0 x*
1.7.2 2-Cycles
Difference Equations Dr. Seshadev Padhi, BIT, Mesra
Difference Equations
Thoerem
Let
l
X i −1
nX n
X
y(x) = ci,j+1 x j eri x + cj erj x (31)
i=1 j=0 j=(n1 +...+nl )+1
r n + a1 r n−1 + . . . + an = 0 (32)
and
i
X i −1
nX n
X
ci1 + km rik +
yk = γi , m cj rik , (34)
i=1 m=1 j=(n1 +...+nl )+1
d 2y dy
−3 + 2y = 0 (35)
dx 2 dx
has the general solution
y (x) = c1 ex + c2 e2x , (36)
where c1 and c2 are arbitrary constants. The difference equation associated with this differential
equation is
yk+2 − 3yk+1 + 2yk = 0. (37)
Its general solution is
yk = A + B2k , (38)
r2
since the characteristic equation − 3r + 2 = 0 has roots r1 = 1 and r2 = 2; A and B are arbitrary
constants. We now show how the result given by equation (38) can be obtained from equation (36).
Let us calculate D k y(x);it is
dk
D k y(x) = (c1 ex + c2 e2x ) = c1 ex + c2 2k e2x . (39)
dx k
Therefore,
yk = D k y (x) = c1 + c2 2k , (40)
x=0
which is the same as equation (38) except for the labeling of the arbitrary constants.
d 2y dy
−2 +y =0 (41)
dx 2 dx
has the general solution
dk
Dk y(x) = (c1 ex + c2 xex )
dx k
= c1 ex + c2 (xex + kex ), (44)
where the expression in parentheses on the right-hand side of equation (44) was obtained
by using the Leibnitz rule for the kth derivative of a product.
Therefore,
yk ≡ D k y(x) = c1 + c2 k , (45)
x=0
which is easily shown to be the general solution of equation (43).
Problem
Consider a set of k spheres so placed that each sphere intersects all the other
spheres. Let ck be the number of compartments into which space is divided. Show
that
ck+1 = ck + k 2 − k + 2.
Problem
Consider a collection of k boxes and k labels, with one label marked for each box.
Show that the number of ways, Nk , they can be mixed such that no box has its own
label is
Nk = (k − 1)Nk−1 + (k − 1)Nk−2 .
Problem
Let the single, self-interacting population model (logistic equation) be harvested;
i.e., a certain constant number of the population is removed at the end of the
interval tk = (∆t)k . What is the new population equation?
Problem
A vacuum pump removes one third of the remaining air in a cylinder
with each stroke. Form an equation to represent this situation. After
how many strokes is just 1/1000000 of the initial air remaining?
Problem
A population is increasing at a rate of 25 per thousand per year. Define
a difference equation which describes this situation. Solve it and find
the population in 20 years’ time, assuming the population is now 500
million. How long will it take the population to reach 750 million?
Problem
Form and solve the difference equation defined by the sequence in
which the nth term is formed by adding the previous two terms and
then doubling the result, and in which the first two terms are both one.
Problem
In a new colony of geese there are 10 pairs of birds, none of which produce
eggs in their first year. In each subsequent year, pairs of birds which are in their
second or later year have, on average, 4 eggs (2 male and 2 female). Assuming
no deaths, show that the recurrence relation which describes the geese
population is
un+1 = un + 2un−1 , u1 = 10 and u2 = 10,
where un represents the geese population (in pairs) at the beginning of the nth
year.
Problem
The growth in number of neutrons in a nuclear reaction is modelled by the
recurrence relation
un+1 = 6un − 8un−1 ,
with initial values u1 = 2, u2 = 5, where un is the number at the beginning of the
time interval n (n = 1, 2, . . . ). Find the solution for un and hence, or otherwise,
determine the value of n for which the number of neutrons reaches 10000.