You are on page 1of 41

14 DIFFERENCE EQUATIONS AND THEIR

A PPLICATIONS
aaaaa

14.1 INTRODUCTION
Differential equations deal with continuous system, while the difference equations are meant
for discrete process. Generally, a difference equation is obtained in an attempt to solve an
ordinary differential equation by finite difference method. Thus, a difference equation is a
relation between the differences of unknown function at one or more general values of the
independent variable.

yn = yn + 1 yn ,
2 yn + yn + yn = n2 ,
2 yn = yn + 2 2yn + 1 + yn
e.g. where

On simplification, it reduces to
yn+ 2 yn+1 + yn = n2
It may be further expressed as
(E2 E + 1)yn = n2 , since we define E yn = yn+1 for n > 0
Order of a difference equation is the difference between the largest and the smallest argument
occurring in the difference equation divided by the unit of increment.
e.g. The equation yn+ 2 2yn+1 + 2yn = 2n is of order 2,

The largest argument The smallest argument ( n + 2 ) n


as = = =2
Unit of increment 1
Solution of a difference equation is the expression for the unknown function (say, yn) which
satisfies the given difference equation. The general solution of a difference equation contains
as many arbitrary constants as the order of the difference equation. Such an expression on
substitution in the equation makes the right hand and left hand members identically equal.
However, particular solutions are obtained by assigning particular values to the arbitrary
constants in the general solution.
For example, if c1 and c2 are the arbitrary constants of period 1, yn = c1 3n + c2 (1)n is the
general solution of the equation yn+ 2 2yn+1 3yn = 0 and yn = 2(3)n + 5(1)n is a particular
solution with c1 = 2 and c2 = 5.

921
922 Engineering Mathematics through Applications

14.2 FORMATION OF DIFFERENCE EQUATIONS


A difference equation is generally formed by eliminating arbitrary constants from a relation
giving the order of the equation. A few examples have been illustrated in order to make the
concept understandable.

Example 1: Form the difference equation from the relation yn = c1 3n + c2 (1 )n .

Solution: Take n as (n + 1) and (n + 2) in the relation yn = c1 3n + c2(1)n , we have


yn +1 = c1 3n+ 1 + c2 ( 1)n+ 1 = 3 c1 3n c2( 1)n

yn + 2 = c1 3n + 2 + c2 ( 1)n + 2 = 9 c1 3n + c2 ( 1)n
On eliminating c1 and c2 from above two relations, we get the desired difference equation
of order 2 as

yn 1 1 yn+ 2(1 3) yn+1(1 9) + yn(3 + 9) = 0


yn +1 3 1 = 0 or
yn + 2 9 1 yn+ 2 2yn+ 1 3yn = 0

n n 1
Example 2: If yn = c1 2 + c2 3 + , find the corresponding difference equation.
2

1 y 1 = c 2n + c 3n
Solution: Given, yn = c12 + c2 3 + , n 1
n n
or 2 (1)
2 2
1
yn+1 = c12n+1 + c2 3n+1 + , y 1 = c 2.2n + c 3.3n
Implying or n +1 1 2 (2)
2 2
1 1
and yn+2 = c12n+ 2 + c2 3n+ 2 + , or yn+ 2 = c1 4.2n + c2 9.3n (3)
2 2
Elimination of c1 and c2 from (1), (2), (3) results in

1
yn 1 1
2
1
yn +1 2 3 =0 ...(4)
2
1
yn + 2 4 9
2

y 1 2.9 4.3 y 1 1.9 4.1 + y 1 1.3 2.1 = 0


Implying n ( ) n +1 ( ) n+ 2 ( )
2 2 2

6 yn 5 yn +1 + yn + 2 = 0
1 1 1
or
2 2 2
Hence yn+ 2 5yn+ 1 + 6yn = 1 is the desired difference equation.
Difference Equations and their Applications 923

Example 3: From the relation yn = A2n + B3n , form difference equation not containing
arbitrary constants A and B.

Solution: Given yn = A2n + B3n (1)


Replace n by (n + 1) and (n + 2) in the above relation,
yn + 1 = A2n + 1 + B3n + 1 or yn + 1 = 2 A2n + 3B3n (2)
yn + 2 = A2n + 2 + B3n + 2 or yn + 2 = 4A2n + 9B3n (3)
In order to eliminate A and B, multiply (1) by 3 and subtract from (2), we get
yn+1 3yn = A2n or A2n = 3yn yn +1 (4)
Further, multiply (1) by 2 and subtract from (2), we get
yn +1 2yn = B3n or B3n = 2yn + yn +1 (5)
Substitute the values of A2n and B3n into given relation (3), we get
yn + 2 5yn +1 + 6yn = 0 , the desired difference equation of order 2

Example 4: Form the difference equation by eliminating the arbitrary constants a and b
+ b sinn
from the relations (i) yn = a cosn and (ii) yn = an2 + bn. [NIT Kurukshetra, 2009]

Solution: (i) Given yn = a cos n + b sin n (1)


so that yn + 1 = a cos (n + 1) + b sin (n + 1) (2)
And yn+ 2 = a cos(n + 2) + b sin (n + 2) (3)

yn+ 2 + yn = a {cos (n + 2 ) + cos n} + b {sin (n + 2 ) + sin n}


= 2 cos {a cos (n + 1) + b sin (n + 1) }
= 2 cos ( yn +1 )
yn + 2 2 cos yn +1 + yn = 0
(ii) yn = an2 + bn (1)

{ 2
}
yn = a (n + 1) n2 + b = a ( 2n + 1) + b (2)

1 2
2 yn = 2a or a= yn (3)
2
( 2n + 1)
Thus (2) gives, b = yn 2 yn (4)
2
Using (3) and (4) in (1), we get
n2 2 ( 2n + 1) 2
yn = yn + n yn yn
2 2
i.e. 2yn = {n2 n ( 2n + 1)} 2 yn + 2n yn
924 Engineering Mathematics through Applications

i.e. n ( n + 1) 2yn 2n yn + 2yn = 0

Example 5: Form the difference equation from the relation given as


log(1 + z)
= y0 + y1 z + y2z2 + + ynzn .
( 1 z)

Solution: On rewriting the given relation as


log(1 + z) = (1 z)(y0 + y1 z + y2 z2 + + yn zn )

z2 z3 z4
z 2 + 3 4 + = (1 z)(y0 + y1 z + y2 z + + yn z )
2 n
implying

z2 z3 z4
z 2 + 3 4 + = [y0 + (y1 y0 )z + (y2 y1)z + (y3 y2 )z + ]
2 3

On equating the coefficient of zn + 1 on both sides

(y1 y0 ) = y0 = 1,
1
(y2 y1 ) = y1 = ,
2
1
(y3 y2 ) = y2 = , for n = 0, 1, 2, 3,
3
1
(y4 y3 ) = y3 = ,
4
etc.
We get
(1)n (1)n
yn+1 yn = i.e. yn = as the desired difference equation.
n+1 n+1

ASSIGNMENT 1

1. Write down the difference equation 3 yn + 2 yn + yn + yn = 0 in the subscript notations.


2. Form the difference equation generated by
(i) yx = ax + b2x (ii) yx = (A + Bx)3x
(iii) y = A2n + n3n 1 (iv) y = an2 bn
a
(v) y = +b [NIT Kurukshetra, 2005]
x

1
3. Show that yn = n(n 1) is a solution of the difference equation yn +1 yn = n
2
Difference Equations and their Applications 925

14.3 HOMOGENEOUS LINEAR DIFFERENCE EQUATIONS WITH CONSTANT


COEFFICIENTS
A difference equation is said to be linear if the variables involved in it (say, yn +1 , yn + 2 etc.)
occur to the first degree only and are not multiplied together.
Hence, a linear difference equation is of the form
a0 yn + r + a1yn +r 1 + + ar yn = f (n) .(1)
where a0, a1 , a2 , are constants and f(n) is a function of n or a constant, is called a linear
difference equation with constant coefficients. Further, if f(n) = 0, the equation is said to be
homogenous. Hence, equation (1), in homogenous form, may be written as:
(Er + a1Er 1 + + ar )yn = 0 (2)
where E is the shift operator such that E yn = yn + r
r

In geneal, the properties of linear difference equations with constant coefficients are analogous to
those of linear differential equations with constant coefficients.
If a0 Er + a1Er 1 + + ar = (E), then (E) = 0 is called the auxiliary equation or characteristic
function of equation (2).
If y1(n), y2 (n), , yr (n) are r independent solutions of the equation (2), then its general
solution will be
un = c1 y1(n) + c2 y2 (n) + + cr yr (n) (3)
where c1 , c2 , , cr are the r arbitrary constants.
If vn is a particular solution of (1), then the complete solution is yn = un + vn (4)
where un is called as Complementary function and vn is particular integral.

Rules for Finding Complementary Function


In order to obtain standard solution of linear difference equation, first put them into symbolic
form:
yn +1 yn
(E)yn = 0 or (E )yn = 0 n+1 n = 0

y y
nn = 0 nn = c or yn = cn (5)

where c is an arbitrary constant.

Case 1
If the roots are real and distinct, then equation (1) is equivalent to
(E 1 )(E 2 )(E 3 ) (E r )yn = 0 (6)
then (6) will be satisfied by the solutions of
(E 1)yn = 0,
(E 2 )yn = 0,
(E 3 )yn = 0,



(E r )yn = 0
926 Engineering Mathematics through Applications

and yn = c11n , c2 2n , , cr rn where c1 , c2 , , cr are arbitrary constants. The general solution


is
y = (c11n + c2 2n + + crrn ) (7)

Case 2
If two of its roots are equal (say 1 = 2 ) then, (E 1 )(E 2 )(E 3 ) (E r )yn = 0 will be
satisfied by the solution of
(E 1 )(E 2 )yn = 0 or (E 1)2 yn = 0 (8)
Let yn = 1nzn , where zn is a new dependent variable, then the equation (8) takes the form
1n + 2 zn + 2 211n + 1zn + 1 + 12 1n zn = 0
or zn + 2 2zn +1 + zn = 0 i.e. 2 zn = 0 (9)
implying zn = (c1 + c2n) on integration; hence the solution will be

yn = (c1 + c2n)1n + c3 n3 + + cr nr (10)


Further, if all 1, 2, , r are equal, then the general solution will be
yn = (c1 + c2n + c3n2 + + crnr 1 )n (11)

Case 3
If two of the roots are imaginary (occurring in conjugates, say, 1 = + i and 2 = i )
then the general solution corresponding to above roots becomes
yn = c1( + i)n + c2 ( i)n

= rn [c1 (cos n + i sin n) + c2 (cos n i sin n)]

= r cos , = r sin = rn [(c1 + c2 )cos n + i(c1 c2 )sin n]

where r = 2 + 2 and = tan1 / .


Therefore, the general solution is
yn = rn [A cos n + B sin n] + c3 3n + + cr nr (12)
where A and B are arbitrary constants.

Example 6: Solve the difference equation Un+3 2Un+2 5U n+1 + 6Un = 0

Solution: The given equation in symbolic form is written as


(E3 2E2 5E + 6 )Un = 0
Corresponding auxiliary equation becomes
E3 2E2 5E + 6 = 0
or (E 1)(E + 2)(E 3) = 0 i.e. E = 1, 2, 3 .

Hence the solution is Un = c1(1)n + c2 (2)n + c3 (3)n .


Difference Equations and their Applications 927

Example 7: Solve yn+1 2cos yn + yn-1 = 0

Solution: Symbolic form of the given equation is


(E2 2 cos E + 1) yn1 = 0
Corresponding auxiliary equation is
E2 2 cos E + 1 = 0 (Quadratic in E)

2 cos 4 cos2 4
Thus E= = cos i sin
4
Hence the solution yn 1 = (1)n 1[c1 cos(n 1) + c2 sin(n 1)]
or yn = (1)n[c1 cos n + c2 sin n]

Example 8: Solve 9 y(n + 2 ) + 9 y(n + 1 ) + 2 y(n) = 0 .

Solution: The given equation, in symbolic form is written as


(9E2 + 9E + 2)y(n) = 0
Thus its auxiliary equation becomes
1 2
9E2 + 9E + 2 = 0 or E = ,
3 3
whence its complete solution is
y(n) = c1(1/3)n + c2(2/3)n .

Example 9: Solve the difference equation ym+3 + 16 ym-1 = 0 .

Solution: The given difference equation ym + 3 + 16 ym 1 = 0


can be rewritten as E4 ym 1 + 16 ym 1 = 0
which implies (E) ym 1 = 0 i.e. (E4 + 16) ym 1 = 0 (1)

Its auxiliary equation is (E4 + 16) = 0


1
or E4 = 16 = 1(2)4 i.e. E = 2(1) 4
Thus by De-Moivres theorem,
(2n + 1) (2n + 1)
E = 2 cos + i sin , n = 0, 1, 2, 3.
4 4
or, precisely,

for n = 0, 1 = cos + i sin ;
4 4

3 3
for n = 1, 2 = cos + i sin ;
4 4
928 Engineering Mathematics through Applications

5 5
for n = 2, 3 = cos + i sin = cos i sin ;
4 4 4 4
7 7 3 3
for n = 3, 4 = cos + i sin = cos i sin
4 4 4 4
Thus,
ym = 2m c11m + c22m + c33m + c4 4m

c (cos + i sin )m + c (cos 3 + i sin 3 )m


m
1 2
=2 4 4 4 4
m 3 3 m
+c3 ( cos i sin ) + c4 ( cos i sin )
4 4 4 4
m m 3m 3m
= 2m (c1 c3 )cos + (c1 ic3 )sin + (c2 c4 )cos + (c2 ic4 )sin
4 4 4 4
m m 3m 3m
= 2m (C1 cos + C2 sin ) + (C3 cos + C4 sin )
4 4 4 4
is the desired solution.

Example 10: Solve the difference equation un+3 - 2un+2 - 5un+1 + 6un = 0 .
Given that u0 = 1, u1 = 2, u2 = 3.

Solution: The given equation in symbolic form is


(E3 2E2 5E + 6 ) un = 0 (1)
and its auxiliary equation becomes
E3 2E2 5E + 6 = 0
(E 1)(E 3)(E + 2) = 0 or E = 1, 3, 2 (2)
whence, complementary function, un = c1 + c2 3n + c3 ( 2)n (3)
Now using given conditions, from (3), we get
For n = 0, u0 = c1 + c2 + c3 i.e. c1 + c2 + c3 = 1 (4)
n = 1, u1 = c1 + 3c2 2c3 i.e. c1 + 3c2 2c3 = 2 (5)
n = 2, u2 = c1 + 9c2 + 4c3 i.e. c1 + 9c2 + 4c3 = 3 (6)
On solving (4), (5), (6) for c1, c2, c3 we get
5 3 2
c1 =
, c2 = , c3 = (7)
6 10 15
5 3 n 2
Therefore, un = + 3 (2) is the required solution of the given equation.
n
6 10 15

Example 11: A series of values of yn satisfies the relation yn+2 + ayn+1 + byn = 0 .

n
Given that y0 = 0, y1 = 1, y2 = y3 = 2 ; show that yn = 2n/2sin 4 .
[NIT Kurukshetra, 2008, 2006, 2002]
Difference Equations and their Applications 929

Solution: From the given equation


For n = 0, y2 + ay1 + by0 = 0
2 + a.1 + 0 = 0 a = 2 (on using values of y0 , y1, y2 )
For n = 1, y3 + ay2 + by1 = 0
i.e. 2 + a.2 + b.1 = 0 b = 2 (on using the value a = 2)
With values a = 2 and b = 2, the given equation becomes,
yn + 2 2yn +1 + 2yn = 0

i.e. (E2 2E + 2 ) yn = 0
Now f(E) = 0 E = (1 + i), (1 i) are the complex conjugate roots.

1 = (1 + i) = r cis, where r = 2, =
4

2 = (1 i) = r cis, r = 2, =
4
n n
( 2)
n
yn = rn Acos n + B sin n = A cos + B sin
4 4

( 2 ) [ A cos + B sin ] A = 0
0
n = 0, y0 = 0 =

y1 = 1 = ( 2 ) 0 + B sin
when 1
n = 1, B = 1
4
n
Hence yn = 2n/2 sin .
4

Example 12: The integers 0, 1, 1, 2, 3, 5, 8, 13, 21, , n are said to form a Fibonacci sequence*.
Form the Fibonacci difference equation and solve it.
Solution: Given,
y0 = 0, y3 = 2, y6 = 8

y1 = 1, y4 = 3, y7 = 13

y2 = 1, y5 = 5,
i.e.
y3 = (y2 + y1) = (1 + 1) = 2
y4 = (y3 + y2) = (2 + 1) = 3
y5 = (y4 + y3) = (3 + 2) = 5


In this sequence, each number beyond the second is the sum of its two previous numbers.
Thus, if yn be the nth number, then
930 Engineering Mathematics through Applications

yn = ( yn 1 + yn 2 ) or yn+ 2 yn+1 yn = 0 for n > 0.


The equation in symbolic form is
(E2 E 1) yn = 0 f (E)yn = 0

On putting f(E) = 0, we have 1 = 1 + 5 , 2 = 1 5


2 2
n n
1+ 5 1 5
Hence yn = c1 + c2 2 , for n > 0
2
1+ 5 1 5
when n = 1, yn = 0 i.e. c1 + c2 2 = 0
2
2 2
1+ 5 1 5
when n = 2, yn = 1 i.e. c1 + c2 =1
2 2
Solving the above two equations for c1 and c2, we get
5 5 5+ 5
c1 = and c2 = 10
10
n n
5 5 1 + 5 5 + 5 1 5
yn = +
10 2 10 2

Example 13: A plant is such that each of its seeds when one year old produces 8-fold and
produces 18-fold when two years or more. A seed is planted and as soon as a new seed is
produced it is planted. Taking yn to be the number of seeds produced at the end of the
nth year, show that yn+1 = 8yn + 18 (y1 + y2 + + yn 1 ) . [NIT Kurukshetra, 2007]
Hence show that yn+2 9yn+1 10yn = 0 and solve it.
Solution: See the table of propagation of seed to plant:
0th year 1st year 2nd year 3rd year 4th year so on
8y1 8y2 8y3

+18y0 +18(y0 + y1) +18(y0 + y1 + y2
y0 8y0
y1 y2 y3 y4
Clearly as,
y2 = 8y1 + 18y0
y3 = 8y2 + 18(y0 + y1)

y4 = 8y3 + 18(y0 + y1 + y2 )
(1)

yn +1 = 8yn + 18(y0 + y1 + + yn 1 ) (2)
But, if we assume that the 1st seed is finished in the development to the tree and has
further no propagation then, y0 is left out of consideration.
Difference Equations and their Applications 931

Whence,
yn+1 = 8yn + 18(y1 + y2 + + yn1) (3)
yn+ 2 = 8yn+ 1 + 18(y1 + y2 + + yn ) (4)
Subtracting (3) from (4), we get
( yn + 2 yn +1 ) = 8yn +1 + 10yn
or yn+ 2 9yn+1 10yn = 0 (5)
The symbolic form of the above equation becomes

(E2 9E 10 ) yn = 0
Resulting in auxiliary equation as
E2 9E 10 = 0 implying E = 1, 10.

yn = c1(1)n + c2 (10)n .

Miscellaneous Problems

Example 14: A sequence of numbers is such that the nth number of the sequence is the
sum of twice the (n 1)th and three times the (n 2)th numbers, where n 2. The first
number is zero and the second is unity. Find the nth number of the sequence.

Solution: Here given, when


n = 0,
n = 1,
yn = 0;
yn = 1 }, (1)

and yn = 2yn 1 + 3yn 2 i.e. yn 2yn 1 3yn 2 = 0 (2)

(E2 2E 3 ) yn 2 = 0 or (E2 2E 3 ) yn = 0 (3)

2 4 + 12
Its auxiliary equation is E2 2E 3 = 0 i.e. E= = 3, 1
2
Thus, yn = c1(3)n + c2(1)n (4)
Using (1),

c1 + c2 = 0
3c1 c2 = 1 } c1 =
1
4
, c2 =
1
4
(5)

1 n 1
yn = (3) (1)n (6)
4 4
From (6), when n = 2, y2 = 2
n = 3, y3 = 7
n = 4, y4 = 20 and so on
932 Engineering Mathematics through Applications

Clearly, y4 = 2y3 + 3y2 = 2 7 + 3 2 = 14 + 6 = 20 and so on i.e. the general value yn satisfies


the given conditions for all n 2.

Example 15: Show that n straight lines, no two of which are parallel and no three of

which meet in a point, divide a plane into


2
(n + n + 2 ) parts. Yet yn denote the number
1 2

of sub-regions formed by n straight lines. [NIT Kurukshetra, 2008]

Solution: When the (n + 1)th line is drawn, it will intersect each of the previous n lines at n
points and hence generate (n + 1) more sub-regions in addition to the previous sub-regions,
mean
yn+1 = yn + (n + 1)
The difference equation satisfied by yn is
yn +1 yn = n + 1 i.e. yn = n[1] + 1

n[2]
yn = 1 n[1] + 1 (1) = + n[1] + c
2
1
=n (n 1) + n + c (1)
2
Clearly, when n = 1, yn = 2
Using this in (1), 2 = 1 + c or c = 1

yn =
2
(n + n + 2 )
1 2
(2)

Example 16: Show that the difference equation Im+1 2 + 0 Im + Im 1 = 0 , has the solution,
r
r
sinh ( n m )
1
1 1 r0
2
Im = I0 ,
sinh ( n 1 ) if Im = I0 and In = 0 , being equal to 2 sinh 2 r .

1
1 r0 2
Solution: Given = 2 sinh 1
2 r
1
1 r 2 r0 2
sinh = 0 or r = 4 sin h (1)
2 2 r 2
The given equation is written as
r
E2Im 1 2 + 0 EIm 1 + Im 1 = 0
r

2 r0
or E 2 + r E + 1 Im1 = 0

Auxiliary equation becomes
Difference Equations and their Applications 933

r
E2 2 + 0 E + 1 = 0 (a quadratic in E) (3)
r
2 2
2 + r0 2 + r0 4 2 + r0 4 + r0 + 4 r0 4
r r r r
r
E= =
2 2

E=
(
2 1 + 2 sinh2 0 0 + 4
2
r r
r r )
2
2 ( cosh ) 2 sinh .2 cosh
= 2 2 , using (1)
2
E = cosh sinh = e , e (4)
Therefore,
Im = c1(e )m + c2 (e )m = c1em + c2 em (5)

If m = 1, Im = I1 = I0 = c1e + c2 e (6)

n n
m = n, Im = In = 0 = c1e + c2 e (7)
n
Multiply (6) by e and (7) by e throughout and take the difference of the two
I0 en = c2 {en .e en e }
= c2 {e(n 1) e(n 1) }
en
or c2 = I0 (8)
e (n 1)
e(n1)
Putting this value in (7),
en
c1 = c2 e2n = I0
e(n 1)
e(n 1)
Im =
I0
e(n1) e(n1)
{en em + en em } (9)

e( n m) e( n m) sinh (n m)
= I0 (n 1) (n 1) = I0
e e sinh (n 1)
Alternately: from (5),
Im = c1(cosh m + sinh m) + c2(cosh m sinh m) (5)'
Using the given conditions,
if m = 1, Im = I1 = I0 = c1(cosh + sinh ) + c2 (cosh sinh ) (6)'
if m = n, Im = In = c1(cosh n + sinh n) + c2 (cosh n sinh n) (7)'
For finding the values of constants, c1 and c2 from (6)' and (7)', we multiply (6)' by (coshn
+ sinhn) throughout and (7)' by (cosh + sinh) throughout and then subtract the later
from the former, we get
I0 (cosh n + sinh n ) = 2c2 (cosh sinh n cosh n sinh )
934 Engineering Mathematics through Applications

I0 ( cosh n + sinh n )
precisly, c2 = (8)'
2 sinh (n 1)
Further putting (8)' into (7)',

0 = c1 (cosh n + sinh n ) + I0
(cosh n + sinh n )
2 sinh (n 1) (cosh n sinh n )
On taking (cosh n sinh n) common from both sides, we get

c1 = I0
(cosh n sinh n )
2 sinh (n 1) (9)'
Thus, on substituting the values of c1 and c2 in (5), we get
I0 ( cosh n sinh n )( cosh m + sinh m )
Im =
2 sinh (n 1)
I0 (cosh n + sinh n )(cosh m sinh m )
+
2 sinh(n 1)

2 sinh (n 1) (
2 cosh m sinh n cosh n sinh m )
I0
=

I0
= .sinh(n m)
sinh (n 1)

cos n
Example 17: If In = d , where n is an integer and 0 < < , form the
0
cos cos
difference equation satisfied by In. Solve this difference equation and find In, given that
I0 = 0 and I1 = .


Solution: Given In = cos n
d
0
cos cos
cos(n + 2)
In+ 2 = d
0
cos cos
cos(n + 2) + cos n
and In + 2 + In = d
0
cos cos
2 cos(n + 1) cos
= d
0
cos cos
2 cos(n + 1) {(cos cos ) + cos }
= d
0
cos cos
cos(n + 1)
= 2 cos(n + 1) d + 2 cos d
0 0
cos cos

{ }

sin (n + 1)
=2 + 2 cos In +1
n+1 0
Difference Equations and their Applications 935

Hence the required difference equation is


In + 2 2 cos In +1 + In = 0 (E 2 cos E + 1)In = 0
2
or
Auxiliary Equation,
E 2 cos . E + 1 = 0
2

2 cos 4 cos2 4
or E = = cos i sin
2
The solution of the difference equation is
In = A cos n + B sin n


Now using I0 = 0, A = 0; I1 = , B =
sin
sin n .
Hence In =
sin

2 1
Example 18: If tan = (4 a )
2
and |a|< 2 , prove that the nth order determinant
a

a 1 0 0 0 0
1 a 1 0 00
0 1 a 0 00
An = 0 0 1 a 00 sin (n + 1)
is
sin

0 0 0 0 0a

Solution: On expanding An across the top row, we get.


An = a An1 1. An 2 i.e. (E2 aE + 1)An 2 = 0

(E2 aE + 1)An = 0 (1)


( ) a2
2

+ 1 An = 0 or (E cos ) + sin2 An = 0
1 2
E a (2)
2 4
1
1 (4 a2 ) 2

(4 a2 ) 2
sin 2
{since given tan = i.e. =
a cos a
2

}
1
(4 a2 ) 2
a2 a
implies sin = = 1 and cos =
2 4 2

(2) further can be written as (E ei )(E ei ) An = 0


936 Engineering Mathematics through Applications

Therefore the general solution is An = Cein + Dein , where C and D are complex constants.
This solution may be written in equivalent form An = cos n + sin n with and as real
constants.
Hence, for n = 1, cos + sin = A1 = 2 cos (4)
n = 2, cos 2 + sin 2 = A2 = (2 cos 2 + 1) (5)

since from given An , A1 = a = a = 2 cos



A2 =
a 1
= a2 1 = 4 cos2 1 = (2 cos 2 + 1)
1 a
On solving (4) & (5) for and , we get
1
= = (6)
sin cos sin

so that An =
( sin .cos n + cos .sin n) = sin (n + 1)
sin sin

ASSIGNMENT 2
1. Solve
(i) f (x + 3) 3 f (x + 1) 2 f (x) = 0
(ii) 9y(n + 2) 6y(n + 1) + y(n) = 0 with y(0) = 1 and y(1) = 1
(iii) yn+ 3 + 5yn+ 2 + 8yn+1 + 4yn = 0 with y(0) = 0, y(1) = 1, y(2) = 2
(iv) (2 3 + 2 ) yn = 0
(v) 2un + 2un + un = 0 [NIT Kurukshetra, 2003]
2. A plant is such that each of its seeds when one year old produce 21-fold and produce 44-
fold when two years old or more. A seed is planted and as soon as a new seed is
produced, it is planted taking un to be the number of seed produced at the end of the nth
year, show that
un+ 1 = 21 un + 44 (u1 + u2 + + un 1 )
Hence show that un + 2 22un +1 23un = 0 and find un
3. n circles are drawn in a plane so that each circle intersects all the others and no three
meet in a point. Prove that the plane is divided into (n2 n + 2) parts.
[Hint: When n circles are drawn, let yn be the number of sub-regions into which the
entire plane is divided. When the (n + 1)th circle is drawn to intersect each of the previous,
2n more sub-regions are added. Follow example no.16.]
4. By using that (2x + 7)/(x2 + 5x + 6) has an expression in ascending powers of x in the
form (p0 + p1x + p2x2 + .), prove that
pn + 5pn +1 + 6pn + 2 = 0 (n 2)
Solve this difference equation to find the coefficient of pn in the expansion.
Difference Equations and their Applications 937

5. Assuming that ( x )2 ( x ) = x3 + k1x2 + k2x + k3 , where , write down, without


proof, the general solution {an} of the difference equation an + 3 + k1an + 2 + k2 an +1 + k3 an = 0
( n = 1, 2, 3, )
Find the solution of an + 3 3an +1 + 2 an = 0 (n = 1, 2, 3, ) for a1 = 0, a2 = 8 and a3 = 2.

14.4 NON-HOMOGENEOUS LINEAR DIFFERENCE EQUATIONS WITH CONSTANT


COEFFICIENTS
Rules for Finding Particular Integral
Let (E)yn = f (n) , be the given difference equation

Case 1. When f (n) = an , a is a constant, then


1 1
P.I = f (n) = f (n), (a) 0
(E) (a)
If (a) = 0, then we proceed as:
1
(i) (E a)yn = an implies yn = an = n an 1,
(E a)
1 n(n 1) n 2
(ii) (E a)2 yn = an implies yn = an = a ,
(E a)2 2!
1 n(n 1)(n 2) n 3
(iii) (E a)3 yn = an implies yn = an = a , so on
(E a)3 3!

Example 19: Solve yn+2 5yn+1 6yn = 4n.

Solution: Auxiliary equation of (E2 5E 6)yn = 4n is


E2 5E 6 = 0 i.e. E = 1, 6
C.F. = c1(1)n + c2 (6)n
1 1 4n
And yn(P.I ) = 4n = 2 4n =
E 5E 6 2
4 5(4) 6 10 (replace E by 4)
4n
Hence complete solution, yn = c1(1)n + c2(6)n
10
Example 20: Solve yn+2 6yn+1 + 9yn = 3n . [NIT Kurukshetra, 2008]
Solution: Auxiliary equation is E2 6E + 9 = 0 i.e. E = 3, 3
C.F. = (c1 + c2n)3n , case of repeated roots
1 1 n(n 1) n 2
P.I. = 3n = 2 3 =
n
3 , (Comparable to case 1 (ii))
E 6E + 9
2
(E 3) 2!
1
Hence the general solution, yn = (c1 + c2n)3n + n (n 1) 3n 2 .
2
938 Engineering Mathematics through Applications

Example 21: Solve the difference equation 2 ux + 2 ux + ux = 2x .

Solution: We know that ux = ux +1 ux


2 ux = 2 C0 ux + 2 2 C1ux +1 + 2C2 ux = ux + 2 2ux + 1 + ux
Thus, the given equation reduces to
(ux + 2 2ux +1 + ux ) + 2 (ux +1 ux ) + ux = 2x
i.e. ux + 2 = 2x or E2 ux = 2x
Corresponding auxiliary equation becomes, E2 = 0 i.e. E = 0
Whence, C.F. = (c1 + c2 x)0x = 0 ( case of repeated roots)
For particular Integral,
2x 2x
ux = = = 2x 2
E2 22
Hence, in this case, particular integral ux = 2x 2 is the general solution .

Example 22: Solve yp+3 3yp+2 + 3yp+1 yp = 1 .

Solution: The given equation in symbolic form is given by


(E3 3E2 + 3E 1)yp = 1
Corresponding auxiliary equation becomes
E3 3E2 + 3E 1 = 0 i.e. (E 1)3 = 0 E = 1,1,1
Whence, C.F. = (c1 + c2 p1 + c3 p2 )1p = c1 + c2 p + c3 p2 (Case of real and repeated roots)
1 p(p 1)(p 2)
Particular Integral, yp = (E 1)3 1 =
p
3 ! (Comparable to case 1(iii))

p(p 1)(p 2)
Hence complete solution, yp = (c1 + c2 p1 + c3 p2 ) +
6
Case 2. When f(n) = nk, where k is a constant, then
1 k 1
Particular Integral, yn = (E) n = (1 + ) n = [(1 + )] n
k 1 k

(Arranging powers of in ascending order with first term as unity).

Example 23: Solve the difference equation yk+2 + yk+1 + yk = k2 + k + 1 .

Solution: Symbolic form of the given equation is


(E2 + E + 1) yk = (k2 + k + 1) (1)
Corresponding auxiliary equation is
1 3
E2 + E + 1 = 0 i.e. E = 2 i 2 (2)
Difference Equations and their Applications 939

k
C.F. = (2 + 2 )2 [c1 cos k + c2 sin k ] ,

2 1
1 3
Here = tan1 = tan1( 3) = , (2 + 2 )2 = + =1
3 4 4

2k 2k
C.F. = c1 cos + c2 sin
3 3
Particular integral,

yk = 2
1
(k2 + k + 1) =
1
(k(k 1) + 2k + 1)
(E + E + 1) (1 + )2 + (1 + ) + 1

=
1
3 + 3 + 2
( )
[k ]2 + 2 [k ] + 1 (factorial notations)

=
1
([k ] + 2[k ] + 1)
2

3 1 + ( + )
2

3
1
=
1
3
1 + ( +
2
)
3
([k ] + 2 [k ] + 1)
2

=
1

3
1
2
3


(
+ 2 + [k ] + 2 [k ] + 1
2
)
=
1

3
(2
) (
2

3
2
) (
1 [k ] + 2 [k ] + 1 [k ] + 2 [k ] + 1 + 2 [k ] + 2 [k ] + 1
2

)
=
1
3
( [k ] + 2 [k ] + 1) (2 [k ] + 2) + 23 (2) = 13 k
2 2
k+
1

3.
2k 2
+ c2 sin k + k 2 k +
1 1
Hence the complete solution is yk = c1 cos
3 3 3 3

Example 24: Solve the difference equation yn+2 4yn+1 + yn = 3

Solution: Rewrite the given equation as (E2 4E + 1) yn = 3


Auxiliary equation becomes E2 4E + 1 = 0 i.e. E= 2 3
Thus,
C.F. = c1(2 + 3)n + c2(2 3)n
Particular Integral,
1 1
yn = 3= 3
E2 4E + 1 (1 + )2 4(1 + ) + 1
940 Engineering Mathematics through Applications

1
1 1 2 1 2 3
= 3 = 1 + 3 = 1 + 3 =

2
2 2 2 2 2
2 1 +
2

Hence the complete solution, yn = c1 ( 2 + 3 ) + c2 ( 2 3 )


n n 3
2

Example 25: Solve yn+2 3yn+1 + 2yn = n2 + 2 n 1

Solution: Given equations in symbolic form is (E2 3E + 2 ) yn = (n2 + 2n 1)


Auxiliary Equation, E2 3E + 2 = 0 i.e. E = 1, 2
Thus C.F. = (c11n + c2 2n )

1
Particular integral, yn = (n2 + 2n 1)
E2
3E + 2
1
= (n(n 1) + 3n 1)
(1 + )2
3 (1 + ) + 2
=
1
(1 )
(
[n]2 + 3 [n] 1 )
=
1

(
(1 )1 [n]2 + 3 [n] 1 )
=
1

( (
1 + + 2 + ) [n ] + 3 [n ] 1
2
)
1 2
= [n] + 3 [n] 1 + 2 [n] + 3 + 2

1 2
= [n] + 5 [n] + 4

[n]3 5 [n]2
= + + 4 [n]
3 2

n (n 1)(n 2 ) 5n (n 1)
= + + 4n
3 2
2n3 + 9n2 + 13n
=
6
Hence the complete solution is

2n3 + 9n2 + 13n


yn = ( c11n + c2 2n )
6
Difference Equations and their Applications 941

Case 3. When f(n) = cos kn (or sin kn), then particular integral.
1 1
yn = cos kn or sin kn
(E ) (E)

1 (e ) + (e )
ik n ik
n

1 eik n + eik n
= =
(E) 2 (E ) 2

1 an + bn ik
= ; a = e , b = e
ik
(E ) 2
Now proceed as in case 1

Example 26: Solve yn+2 2cos. yn+1 + yn = cos n [NIT Kurukshetra, 2004]

Solution: Symbolic form of above equation is

(E2 2 cos E + 1) yn = cos n. ( E ) yn = cos n


The auxiliary equation is

(E2 2 cos .E + 1) = 0, so that

2 cos 4 cos2 4
E= = (cos i sin )
2
C.F. = (1 ) [c1 cos n + c2 sin n ]
n

1
and P.I. = cos n
E2 2E cos + 1
1 ei n + ein
=
E E (e + e ) + 1
2 ii
2

1 1 1
= ein + ein
2 (E e )(E e )
i i
(E e )(E e )
i i

Take eni = ( ei ) = an , eni = (ei)n = bn; proceed further as per case 1


n

1 1 1 1 1
yn = . i ein + . i ein ,
2 ( E e ) e e
i i
Ee i
e e i

n
i (
e i ) i (
e i )
1 1 n 1
=
4i sin (E e ) Ee

1 i(n 1) n sin ( n 1)
= ne nei(n 1) =
4i sin 2 sin
942 Engineering Mathematics through Applications

sin ( n 1)
Hence the complete solution, yn = c1 cos n + c2 sin n + n
2 sin

n
Example 27: Solve the equation yn+2 + yn = cos [NIT Kurukshetra, 2008]
2

Solution: Auxiliary equation for the given equation is


( E ) = E2 + 1 = 0 which implies E = i
Therefore complementary function is given by
yn = c1 (i ) + c2 ( i ) = c1 (cos n 2 + i sin n 2 ) + c2 (cos n 2 i sin n 2 )
n n

= A cos n 2 + B sin n 2
For particular integral,
in
1 e 2 + e 2
in
1 n
yn = cos =
E2 + 1 2 E2 + 1 2

{n + n}; = e 2 and = e 2
1 1 i i
=
2 E2 + 1

1 n n
= 2 + 2 ;
2 + 1 + 1 i.e. replace E by


( ) ( )
i n i n
e 2 e 2
1
= +
( ) ( )
2 i 2
2 i2
e +1 e 2 + 1

in
1 e 2 e 2
in
= i + i
2 e + 1 e + 1

1 (
=
) ( )
ei + 1 ein 2 + ei + 1 ein 2
( ) ( )
2 (ei + 1)(ei + 1)

e
1
=
+e (
i ( n 2 1 ) i ( n 2 1 ) in in
+ e 2 +e 2

)

2 2 + ( ei + ei )

1 2 cos ( 2 1) + 2 cos 2
n n
= ei + ei
, ei + ei = 2 cos1 as = cos
2 2 + 2 cos1 2
Difference Equations and their Applications 943

using (1 + cos ) = 2 cos2 2


1 2 cos ( 2 ) cos 12
n1
= , A + B A B
2 2 cos2 12 and cos A + cos B = 2 cos .cos
2 2
n 1
cos
1 1
= sec
2 2 2
n n 1 n1 1
Hence the complete solution, yn = A cos + B sin + cos sec
2 2 2 2 2

1 n
Example 28: Solve yn+2 2 cos yn+1 + yn = sin . [NIT Kurukshera, 2003]
2 2
Solution: The general form of this equation is
2 1 n
E 2 cos 2 E + 1 yn = sin 2 (1)

Its auxiliary equation is

E2 2 cos E + 1 = 0
1
(2)
2

1 1
4 cos2 4
2 cos i i
= cos i sin = e 2 , e 2
2 2 1 1
E= (3)
2 2 2
Clearly the roots of equation (1) are of the form ( + i) and ( i)
1

r = 2 + 2 = cos2 + sin2 = 1 and


1 1 2
where
2 2
sin 1
1 1 2 = tan1 tan 1 = 1
= tan = tan
1 2 2
cos
2
n n n
C.F. = rn (c1 cos n + c2 cos n) , = 1 c1 cos + c2 sin ...(4)
2 2
1 1
P.I. = sin n 2 = i sin
n
2
(E 2 cos 1 2 E + 1 )
2 i

(E e 2 )(E e 2)

1 e n i 2 eni 2
= i i
(E e 2 )(E e 2 )
2i


i

i

1 (e 2 )n (e 2 )n
= i
2i i

i

i
(E e 2 )(E e 2 ) (E e 2 )(E e 2 )
944 Engineering Mathematics through Applications

1 an bn
=
2i (E ) (E ) if e = a and e 2 = b

i
2 i

1
bn
1 1
= an i

2i E e e e

i
2
(i
2
i
2 e)( 2 e
i
2 E e
i
2
)
( )( )
(i.e. replace E by a; provided (a) 0)

=
1 1 1
an +
1
bn
i
(
2i e e
2
i
2
E e
i
) (
2 E e
i
2
) ( )

= 1 1
an +
1
bn ; a = ei /2 , b = ei /2
1
4i2 sin E e
i
2
(
i
Ee 2
) ( )
2
1 n
Now comparing with the case1(i) (E a ) a = nan1 , when (a) = 0

( e ) + (e 2 )
n i 2 n 1
1 n 1
nan 1 + nbn 1 =
i
P.I. =
2
4i sin 2
1 1
4 sin 2
(n 1)
=
n
4 sin 1 2
(
2 cos (n21) =
n cos 2
2 sin 1 2
)

Example 29: Solve ( E2 2E + 2 ) yn = cos n .


2
Solution: Auxiliary Equation is

(E2 2E + 2 ) = 0 i.e. E = 1 i
Complementary Function,
yn = c1 (1 + i ) + c2 (1 i )
n n

n n
= rn [ A cos n + B sin n] = 2 2 A cos + B sin ,
n

4 4
n
( ) ( )
i n i n
1 1 1
P.I. = cos = 2 Re e 2 = 2 Re e 2
(E 2E + 2 ) 2 (E 2E + 2 )
2
(E 2E + 2 )

( e ) , repalce E by a as
i n

( ) =a
1
= Re 2 i n

( )
2 n
i i e 2

e2 2e 2 +2

= Re 2
1 cos n + i sin n
i 2i + 2 2 2
Difference Equations and their Applications 945

n n
= Re
1
cos + i sin
1 2i 2 2

(1 + 2i ) n n
= Re cos + i sin
12 ( 2i )2 2 2

1 n n n 2 n
2 sin = cos
1
=cos sin
5 2 2 5 2 5 2
Hence the complete solution is

yn = 2
n A cos n + B sin n + 1 cos n 2 sin n
2

4 4 5 2 5 2

Example 30: Solve uk+2 + a2uk = cosak .

Solution: The given equation in its symbolic form, ( E2 + a2 ) uk = cos ak


Auxiliary equation, E2 + a2 = 0 i.e. E = ia,

k k
Hence, C.F. = ak c1 cos + c2 sin
2 2
1
P.I. = 2 cos ak
E + a2

2 (
eia )
1 1 k
= Re eiak = Re 2
E +a
2 2
E +a
eiak 1 e2ia + a2
= Re = Re eiak 2ia
(e ) ia 2
+ a2 e +a e
2ia 2
+ a2

= Re eiak
(e2ia + a2 )
e2ia e 2ia + a2 ( e2ia + e2ia ) + a4

= Re eiak
{(cos 2a i sin 2a ) + a2 }
1 + 2a2 cos 2a + a4

= Re (cos ak + i sin ak)


{(cos 2a + a ) i sin 2a}
2

1 + 2a2 cos 2a + a4
a2 cos ak + cos a ( k 2 )
=
1 + 2a2 cos 2a + a4
Hence the complete solution yk = C.F. + P.I.

Case 4. When f(n) = an F (n) , F(n) a polynomial of degree p in n, then


946 Engineering Mathematics through Applications

Particular integral ( P.I.) = 1 anF (n ) = an 1 F (n )


(E ) ( aE )
(i.e. replace E by aE in the polynomial exp.)
Further proceed as in case 2.

Example 31: Solve the difference equation un+2 4un+1 + 4un = n2 2n .

Solution: In symbolic form,


(E2 4E + 4 ) un = n2 2n
A.E., E2 4E + 4 = 0 i.e., E = 2, 2
C.F. = (c1n + c2 ) 2n
1
P.I. = 2n n2
(E 2 )2
1 1
= 2n n2 = 2n 2 n
2
( 2E 2 ) 2
4 ( E 1)

=
2n
42
([n] + [n]) , as E = (1 + ) and n
2
2
= n (n 1) + n = [n ] + [n ]
2 1

2n [n ] [n]
4 3
= + on Integrating twice
4 3 4 2 3

2n [n ] + 2 [n]
4 3
=
4 12

2n
= n (n 1)(n 2 )(n 3 ) + 2n (n 1)(n 2 )
48
2n
= n (n 1)(n 2 ){(n 3) + 2}
48
2n 2n
n ( n 1)(n 2 )(n 1 ) = n ( n 1) (n 2 )
2
=
48 48

n (n 1) (n 2 ) n
2
Complete solution = C.F. + P.I = (c1n + c2 ) + 2
48
Example 32: Solve ( E2 7E 8 ) yn = 2n n2 . [NIT Kurukshetra, 2003]

Solution: Auxiliary equation is (E2 7E 8 ) = 0 Its roots are 1, 8.

C.F. = c1 ( 1) + c1 (8 )
n n
Difference Equations and their Applications 947

1
P.I. = 2n n2 , (i.e. replace E by aE in (E) as in case 4.)
E 7E 8
2

1 1
= 2n n2 = 2n 2 n2
( 2E ) 2
7 ( 2E ) 8 4E 14E 8

1
= 2n n2
4 (1 + ) 14 (1 + ) 8
2

1
1 2n 3 22 2
= 2n n2
= 1 + n
42 6 18 18 9

2n 2 3 n2 22 n2
= n + 2n2
18 9

1 n 2 1 2 11 2 2
= 2 n n + n
18 3 9

n2 = (n + 1) n2 = 2n + 1,
2
As

2n2 = n2 = [2n + 1] = 2 (n + 1) + 1 [2n + 1] = (2n + 3) (2n + 1) = 2

1 n 2 1
2 n ( 2n + 1) + ( 2) = 2n n2
11 1 2n 19
P.I. = +
18 3 9 18 3 9
Complete solution is therefore written as
1 n 2 2n 19
yn = c1 ( 1) + c2 (8)
n n
2 n +
18 3 9

Example 33: Solve the difference equation ( E2 2E + 4 ) un = 2n 6cos { n


3
+ 2 3 sin
n
3 }
Solution: The Auxiliary equation is

(E2 2E + 4 ) = 0 E = 1 i 3 = r(cos + i sin )


where r= x2 + y2 = 2 and = tan1 3 =
3
n n n
Therefore, C.F. = ( 2) c1 cos + c2 sin
3 3

P.I. =
( E2

1
2E + 4 )
2n 6cos
n
3 {
+ 2 3 sin
n
3 }
2n 1 3 n 3 n
= 4 3 cos + 2.2 sin , Replaceing E by 2E
1 4 ( E2 E + 1) 2 3 2 3
948 Engineering Mathematics through Applications

=
2n 1
4 (E E + 1)
2

4 3 sin cos
3
n
3
+ sin
n
3
cos

3{ }
2n 4 3 1
= sin (n + 1) 3
4 Ee
i
3 Ee
i
(3
)( )
=
2n 3 1
)( )(
i ( n +1 ) 3
)
i n +1
e ( ) 3 ,
(
i i
e
2i Ee 3 Ee 3

=

2n 3
e
i n +1
3
( )

e
i n + 1
3
( )

)( ) ( )( )

(

2i E ei 3 E ei 3 i
Ee 3 Ee 3
i

=
2n 3 ( )n +1
()n+ 1

( )( ) ( )( )
i i
2i E ei 3 E ei 3 , if = e 3 , = e 3
i i
Ee 3 Ee 3

2n 3 ei 3 (n+ 1) i n+ 1
e 3( )
= +
( )( ) ( )
i i i i
2i e 3 e 3 Ee 3 Ee 3

Replacing E by = ei 3 and = ei 3

2n 3 n +1 n+1
= + ,
2i (2i sin 3 ) (E ) (E )

2n 3 n
P.I. = (n + 1) n + ( n + 1)n , as un = = nn1
4 sin 3
(E )

2n 3 i.n i.n

= ( n + 1) e 3 + e 3
3
4
2

i.n i .n
e 3 +e 3 n
= 2 (n + 1)
n
= 2n (n + 1) cos
2 3
Hence the complete solution,

un = C.F. + P.I. = 2n c1 cos { n


3
+ c2 sin
n
3 }
+ 2n (n + 1) cos
n
3
Difference Equations and their Applications 949

Example 34: A beam of length l, supported at n points carries a uniform load w per unit
length. The bending moments M1, M2, M3, , Mn at the supports satisfy the Clapeyrons
equation:
1
Mr+2 + 4 Mr+1 + Mr = wl2
2
If a beam weighing 30 kg is supported at its ends and at two other supports dividing
the beam into three equal parts of 1 meter length, show that the bending moments at each
of the two middle supports is 1 kg meter.

Solution: Symbolic Expression for above equation is

(E2 + 4E + 1) Mr = 12 wl2 (1)

Auxiliary Equation

f (E ) = 0 E = 4 16 4 = ( 2 3 ) (2)
2
C.F. = ( 1) c1 ( 2 + 3 ) + c2 ( 2 3 )
r r r
(3)

As ( 2 3 ) = 1( 2 + 3 ) and ( 2 + 3 ) = 1( 2 3 )

1 1 2
P.I. = 2
wl
1 + 4E + E 2

=
1 1 2
2 wl
1 + 4 (1 + ) + (1 + ) 2

=
1 1 wl2
(6 + 6 + 2 ) 2
1
1 2 1 2 1 2
= 1+ + wl = wl
6 6 2 12

Complete Solution, Mr = ( 1)r c1 ( 2 + 3 ) + c2 ( 2 3 ) wl


r r 2
(4)
12

The Special Case


When the beam is divided into three equal parts with each part measuring one metre in
length and total weight of the beam is 30 kg.

1m
C D
M0 A B
M1 M2 M3

1m 1m
950 Engineering Mathematics through Applications

Let M0 , M1, M2 and M3 be the moments at various positions shown in the picture, so that
M0 = 0 = M3 (Moment at the ends)
Further, l0 = 0 mtrs.
l1 = 1 mtrs. (length from A to B)
l2 = 2 mtrs. (length from A to C)
l3 = 3 mtrs. (length from A to D)
30 0
From (4), when r = 0, M0 = 0 = (1) c1 2 + 3 ( ) + c2 ( 2 3 )
0 0 0

12
c1 + c2 = 0 (5)

Again, when r = 3, M3 = 0 = ( 1) c1 2 + 3
3

( )3 + c2 ( 2 3 )3 3012 9
0 = 1 c1 (8 + 3 3 + 12 3 + 18 ) + c2 (8 3 3 12 3 + 18 )
45
2
45
= 8 ( c1 + c2 ) + 3 3 (c1 c2 ) + 12 3 (c1 c2 ) + 18 ( c1 + c2 )
2

= 15 3 ( c1 c2 ) , as (c1 + c2 ) = 0
45

2

(c1 c2 ) = 3
(6)
2

From (5) & (6), we get c1 = 3 and c2 = 3 ... (7)


4 4

3
{(2 + )r ( 2 3 )r } w12l
2
Mr = ( 1)r 3 (8)
4

3
{( 2 + 3 ) ( 2 3 )} 3012 1
2
For r = 1, M1 = ( 1)1
4

3
= 1 {2 3 } 52
4

3.2 3 5 3 5
= = = 1unit (9)
4 2 2 2

3
{(2 + )2 ( 2 3 )2 } 3012 2
2
For r = 2, M2 = ( 1)2 3
4


= 1
4
3
{ 5
. ( 4 + 3 + 4 3 ) (4 + 3 4 3 ) 4
2
}
Difference Equations and their Applications 951

3
= .8 3 10 = 16 units (10)
4
Alternately (From equation (4) onwards):

Mr = ( 1) c1 ( 2 + 3 ) + c2 ( 2 3 )
r r r wl2
12
Let (2 + 3 ) = e , then

( 2 3 )( 2 + 3 ) wl2
r

Mr = ( 1) c1 ( e ) + c2
r r


( 2 + 3) 12
, (on rationalization)

4 3 wl2
r

1 wl2
= ( 1) c1e + c2 ( )
r r r r
= 1 c e + c r
( 2 + 3 ) 12 ( )
1 2
e 12

wl2
= ( 1) c1 (cosh r + sinh r ) + c2 (cosh r sinh r )
r
12

= ( 1) (c1 + c2 ) cosh r + ( c1 c2 ) sinh r


r wl2
12
(
, = log 2 + 3 )
wl2
= ( 1) [ A cosh r + B sinh r ]
r
, where A and B are arbitrary constants.
12
Special case as such.

ASSIGNMENT 3
Solve
(i) (E2 5E + 6 ) y = x + 2x (ii) yk + 2 2yk + 1 + yk = 2k with y0 = 2 and y1 = 1

(iii) un + 2 2un +1 + un = 3n + 5 (iv) (2 + + 1) yk = k2


(v) 2 yn 5 yn + 4yn = n + 2n
(vi) un + 2 + 6un +1 + 9un = n.2n + 3n + 7 [NIT Kurukshetra, 2006]

(vii) (E2 5E + 6 ) yn = 4n (n2 n + 5 ) [NIT Kurukshetra, 2005; KUK, 2001]

(viii) yn+1 3yn = 3n (n + 2 )

(ix) yn + 2 + yn +1 56yn = 2n (n2 3 )


(x) yn + 2 3yn +1 + 2yn = 2n + 1 + 2n (NIT Kurukshetra, 2002)
(xi) yn + 2 4yn +1 + 3yn = 5 n (KUK, 2000)
952 Engineering Mathematics through Applications

14.5 SOME SPECIAL EXAMPLES ON FIRST ORDER LINEAR-EQUATIONS

Example 35: Solve


1. yn+1 ayn = 0 , a 1
2. yn+1 yn = can , where c is a periodic function of period 1 and a 1
3. yn+1 byn = can , (i) b a, (ii) b = a
4. yn+1 ayn = bn
5. yn+1 yn = ( n2 2n ) 2n

Solutions:
1. yn+1 a yn = 0, a 1
Multiplying by the factor an1 , we get
a( n+1)yn+1 anyn = 0 i.e. an yn = 0 or yn = can ,
where c is a periodic function of n with period unity.
2. Given yn+1 yn = can , where c is a periodic function of period 1 and a 1.
We have. yn = can implying

can
yn = 1(can ) + c =
+ c
a 1
where c' is a periodic function.
3. Given yn + 1 byn = can , where c is a periodic function of period 1, when
(i) b a (ii) b = a
(i) Let yn = kcan , be a solution of the given equation, then the given equation reduces to

1
kcan +1 bkcan = can or k =
ab
can
Hence is a particular solution of the equation.
ab
Alternately: On multiplying the given equation throughout by bn1 , we get
bn 1yn + 1 bn yn = can bn 1

(bn yn ) = cb1 ( ab1 )


n
or

bn yn = cb11 ( ab1 )
n

anbn cbn 1an bn can


or yn = cbn 1 1 = =
ab 1 ab1 1 ab
(ii) The equation is yn + 1 ayn = can
Difference Equations and their Applications 953

Let yn = kc nan , be a solution of the given equation then by taking this value of yn,
given equation reduces to
kc(n + 1)an+1 akcn an = can
1
or kcan+1 = can implying ( ka 1) can = 0 i.e. k =
a
yn = cnan 1
Alternately: Multiply by a( n+1) to both sides of the given equation, we get
a( n+1)yn+1 a( n+1)ayn = a( n+1)can
a( n+1)yn +1 anyn = ca1
( an yn ) = ca 1

an yn = ca11 (1) = ca1n


yn = cnan 1

4. The given equation is yn +1 ayn = bn,


Multiply this throughout by a( n+1) , we get

a( n+1)yn +1 a( n+1)a yn = bna( n+1)

n + 1 1 ( n+1) n 1 n
a( n+1)yn+1 anyn = b + 2 a
+ b + 2 a
a 1 ( a 1) a 1 ( a 1)
n 1 n
( an yn ) = b + a
a 1 ( a 1)2

n 1 n
an yn = b + a + c
a 1 ( a 1)2

bn b
yn = can
or a 1 ( a 1)2

5. Given equation is yn+1 yn = (n2 2n ) 2n

Let yn = ( An2 + Bn + c ) 2n ,

then { } { }
yn+1 = A (n + 1) + B (n + 1) + c 2n+1 = A (n + 1) + B (n + 1) + c 2.2n
2 2

yn +1 yn = An2 + ( 4A + B ) n + ( 2 A + 2B + c ) 2n
On comparing this with the given equation, we find
954 Engineering Mathematics through Applications

A = 1, B = 6, C = 10

Thus, yn = ( x2 6x + 10 ) 2n + D (n )

14.6 NON-LINEAR EQUATIONS REDUCIBLE TO LINEAR TYPE

Example 36: Solve

1. yn+1 = F ( n ) yn 2. yn+1 = yn
3. yn .yn+ 2 = y2n+ 1 4. yn+ 1 = 3n yn
1 2 2
5. yn+ 1 = n yn , n > 0 6. yn + 1 3yn yn + 1 + 2yn = 0 .

Solutions:
1. Given yn+1 = F (n ) yn
n
Dividing both sides by F (r ) , we get
r =1

yn +1 yn y
= n 1 n = 0
n n 1

F (r ) F (r ) or F (r )
r =1 r =1 r =1

yn n 1
Thus n 1 =C or yn = C F (r )
F (r ) r =1
r =1

2. Given yn +1 = yn
Taking log on both sides,
1 E 1 log y = 0
log yn +1 log yn = 0 or n
2 2
n
log yn = C = C 2n
1 or yn = exp. (C2n )
2
Alternately: We have

yn = yn 2 1 by taking n as n 1
1

(1 2 ) (1 2 ) n
2

= yn 2 = = = y0 , Taking n as n 2, n 3, , 1, 0

3. Given yn.yn+ 2 = yn+ 12


On rewriting,
Difference Equations and their Applications 955

yn + 2 yn +1 y y
= or n +1 = 0 implying n +1 = C
yn+1 yn n
y yn
so that yn+1 C yn = 0 or ( E C ) yn = 0
yn = ACn
Note: This equation may be solved by taking logarithms.
4. Given yn+1 = 3n yn
Taking logarithms to the base 3 on both sides, we have
log3 yn +1 = log3 ( 3n yn ) = log3 3n + log3 yn

or log3 yn+1 log3 yn = n,

Thus (log3 yn ) = n

log3 yn = 1n + C =
[n]2 + log3 c
2
[n]2 n(n 1)
yn = c 3 2 = c 3 2

Alternately: In log3 yn+1 log3 yn = n, if we take log3 yn = un

Then un+1 un = n or (E 1)un = n


1 1 n(2) n(n 1)
C.F. = A.(1)n and (E 1) n = n = n = 2 =
1
2

Complete Solution, log3 yn = A(1)n + n(n 1)


2
n(n 1)
A(1)n +
yn = e 2

1
5. In the given equation yn+1 = yn , n > 0
n

Putting n = 1, 2, 3, . y2 = 1 y1,
1
1
y3 = y2 ,
2
1
y4 = y3 ,
3
...............
...............
1
yn = yn1
n 1
Multiplying these relations, we get
956 Engineering Mathematics through Applications

1
yn = k
n 1!

6. The given equation is yn2+1 3yn yn +1 + 2yn2 = 0


2
yn+1 yn+1
3 + 2 = 0, on dividing throughout by yn
or 2

n
y n
y
yn +1
Putting = un , the equation reduces to
yn
un2 3un + 2 = 0 i.e. (un 1)(un 2) = 0
un = 1; un = 2 i.e. yn +1 = yn and yn+1 = 2yn
(E 1) yn = 0; (E 2)yn = 0
yn = c11n ; yn = c2 2n

ASSIGNMENT 4
Solve the following non-linear difference equations reducible to linear one
(i) (n + 1)yn +1 n yn = 0, n > 0 (ii) yn +1 e2n yn = 0
(iii) yn2 = yn yn+1 (iv) yn yn +1 4yn + 3 = 0
(Hint: Dividing throughout by (yn +1 yn ) )

14.7 SIMULTANEOUS DIFFERENCE EQUATIONS WITH CONSTANT COEFFICIENTS


Simultaneous difference equations with constant coefficients are analogous in handling to
the method of ordinary differential equations with constant coefficients. Some examples are
discussed to explain the method.

Example 37: Solve x ( n + 1 ) - x ( n ) - 2y ( n ) = 2n


y ( n + 1 ) - y (n ) + 2x (n + 1 ) = 0

Solution: Clearly the above two simultaneous difference equations involve functions x(n)
and y(n) of discrete variable n. Thus, we write these equations in their symbolic form
Exn xn 2yn = 2n i.e. ( E 1) xn 2yn = 2n (1)

Eyn yn + 2Exn = 0 i.e. 2Exn + ( E 1) yn = 0 (2)


Operate on (1) by 2E and (2) by (E 1) and then subtract (1) from (2), we get

( E + 1)2 yn = 2E.2n or ( E + 1)2 yn = 2n+ 2 (3)


Corresponding auxiliary equation becomes,

( E + 1)2 = 0 i.e. E = 1, 1
Difference Equations and their Applications 957

C.F. = (c1 + c2n ) ( 1)


n
Whence, (4)
1 1 n+ 2
P.I. = 2n+ 2 = 2
( E + 1)2
9 (5)

1 n+ 2
Therefore complete solution, yn = (c1 + c2n ) ( 1) +
n
2 (6)
9
With this value of yn , from the given simultaneous equation (1), we get
n+ 2
( E 1) xn 2 (c1 + c2n ) ( 1)n 2
=2
n
9
n+ 3
or ( E 1) xn = 2n + ( 2c1 + 2c2n) ( 1)n 2
9
n 2n23 2n
( E 1) xn = (2c1 + c2 2n) ( 1)n + 2 , Q 2
n
=
9 9 9

2n
xn = c1 + c2 (n 12 ) ( 1) +
n
or (7)
9
Equations (6) and (7) give the general solution.

Example 38: Solve the simultaneous difference equations


2ux+1 3ux + 5vx = 2
2ux + vx+1 2vx = 7

Solution: Write the given set of equations in standard symbolic form.


2Eux 3ux + 5vx = 2 i.e. ( 2E 3 ) ux + 5vx = 2 (1)

2ux + Evx 2vx = 7 i.e. 2ux + (E 2 ) vx = 7 (2)


Operate on (1) with (E 2), on (2) with 5 and subtract to get
(2E2 7E 4 ) ux = (E 2 ) 2 35
i.e. ( 2E + 1)(E 4 ) ux = 39, as 2E = 0 (3)
Thus, corresponding auxiliary equation becomes
1
( 2E + 1)(E 4 ) = 0 with E = 2 , 4
x
C.F. = c1 + C2 ( 4 )
1 x
Whence,
2
1
39 39 39 1 2 2
P.I. = = = 1 + 3 9
(2 (1 + ) )
For 2
7 (1 + ) 4 ( 2 2
3 9) 9

x
ux = c1 + c2 ( 4 ) +
1 x 39
2
(4)
9
958 Engineering Mathematics through Applications

With the above value of ux , from equation, (1), we get


x
39
( 2E 3 ) c1 + c2 ( 4) +
2 1 1 x
vx =
5 5 2 9

3 1 39
x
2 2
+ c2 ( 4 ) +
x
= E c1
5 5
2 2 9
x +1
2 2 1 39 3 1 39
x
+ c2 ( 4) +
x +1
= c1 + c + c2 (4)x +
5 5 2 9 5 2
1
9

x
57 4 1 2 2 39 3 39 57
= + c1 c2 4x , + =
45 5 2 5 5 9 5 9 45

Example 39: Obtain the solution of the simultaneous difference equations


un+1 + n = 3un + 2vn
vn+1 - n = un + 2vn }
, given u0 = 0, v0 = 3

Solution: On rewriting the given set of equations


( E 3 ) un 2vn = n (1)
un ( E 2 ) vn = n (2)
Operate (E 3) on (2) and then subtract it from (1), we get
( E 2 )(E 3 ) vn 2vn = n + ( E 3 ) n
i.e. (E 2 )(E 3 ) 2 vn = n + En 3n

( E 1)( E 4 ) vn = 3n + 1, (En = n + 1) (3)

Thus C.F.(vn ) = (c11n + c2 4n )

1
P.I.(vn ) =
( 3)
(3 [n] 1)
1
1
=

(3 [n] 1) = 31 1 3 ( 3 [n] 1)
3 1
3
1 n ( n 1)
= 3 [n] 1 + .3 [n] =
3 3 3
1
( 3 [n ]) =
2
Therefore,
n(n 1)
vn = c11n + c2 4n + (4)
2
Difference Equations and their Applications 959

On using the value of vn in equation (2), we get


n ( n 1)
un = (E 2 ) (c11n + c2 4n ) + n
2
n ( n 1) n (n 1 )
= E ( c11n + c2 4n ) + 2 (c11n + c3 4n ) + n
2 2
n ( n + 1) n (n 1)
or un = ( c11n+1 + c2 4n+1 ) + 2 (c11n + c2 4n ) + n (5)
2 2
Now, when n = 0, un = u0 = 0, then using (5)

0 = (c111 + c2 41 ) + 0 2 (c110 + c2 40 ) + 0 0

(c1 + 4c2 ) 2 (c1 + c2 ) = 0 or 2c2 c1 = 0 (6)


Again when n = 0, vn = v0 = 3, then using (4)
c1 + c2 = 3 ...(7)
By (6) and (7), c1 = 2, c2 = 1
n ( n 1)
Whence, un = ( 2 + 2.4n ) (on simplification from (5)
2
n ( n 1)
vn = ( 2 + 4n ) +
2

ASSIGNMENT 5
Solve the following simultaneous difference equations
(i) yx+1 zx = 2 ( x + 1) , zx +1 yx = 2 ( x + 1)
(ii) yn+ 1 yn + 2zn+ 1 = 0, zn +1 zn 2yn = 2n
(iii) u ( x + 1) + v ( x ) + w ( x ) = 1, u ( x ) + v ( x + 1) + w ( x ) = x , u ( x ) + v ( x ) + w ( x + 1) = 2x
(iv) y (n + 1) 3y (n ) 2x (n ) + n = 0, x (n + 1) 2x (n ) y (n ) n = 0
with y ( 0 ) = 0, x ( 0 ) = 3
960 Engineering Mathematics through Applications

ANSWERS

Assignment 1
1. yn+ 3 2yn+ 2 + 2yn+ 1 = 0

2. (i) (x 1)yx + 2 (3x 2)yx +1 + 2xyx = 0 (ii) yx + 2 6yx +1 + 9yx = 0


(iii) y(n + 1) 2y(n) = (n + 3)3n 1
(iv) (n2 + n)yn + 2 (2n2 + 4n)yn +1 + (n2 + 3n + 2)yn = 0
(v) (x + 2)yx + 2 2(x + 1)yx +1 + xyx = 0 .

Assignment 2
n
n 1
1. (i) f (x) = (c1 + c2 x)( 1)x + c3 2x (ii) yn = 3
3

6 6 1
(iii) yn = (1) + n (2)
n n
(iv) yn = c1 2n + c2 3n
5 5 5

n n
(v) un = c1 cos + c2 sin
2 2

n
2. un = {23 (1) }
7 n
3. yn+1 = yn + 2n
8

3 1
n
= n +1
+ an = ( A + Bn) + C , an = 2n + (2)
4. pn ( 1) 5. n n n
2 2

Assignment 3

(i) y = (c1 2 + c2 3 ) +
1
x x
(2x + 2) x2x 1 (ii) yk = 1 2k + 2k
4
k k
(iii) un = (c1 + c2n ) +
1
n (n 1)(n + 3 ) (iv) yk = c1 cos + c2 sin + ( k 2 2k 1)
2 3 3

(v) yn = (c1 2 + c2 5 )
n n 1 1
n n
2 + ( 4n + 5 )
3 16

2x
(vi) ux = (c1 + c2 x ) ( 3 ) +
x
( 5x 2 ) + 1 3x 2 + 7
25 4 16
n2 13n + 61 .3 (n + 3n )
(vii) yn = (c1 2 + c2 3 ) + 4 .
1 n 1 2
(viii) yn = c3 +
n n n n
2 2
Difference Equations and their Applications 961

(
(ix) yn = c1 ( 8 ) + c2 7
n n
) 2n 1 2 2n 64
25
n +
5 25

(xi) yn = (c1 + c2 3 ) +
5n
(x) yn = ( c1 + c2 2n ) ( n2 + 2n + 3) + n 2n 1
n
8

Assignment 4

c
(i) yn = (ii) yn = cen(n 1) , (Hint: As per Ex. 4)
n

(
(iii) yn = A 1 + 2 )n + B (1 2 )n ,
A + B 3n+1 un +1
(iv) yn = , Put yn = u
A + B3n n

Assignment 5
x +1
(i) yx = a + b ( 1) , zx = a + b ( 1) ( x + 1)
x

1 n + 2 z = 2n 1 n a + b n 1
(ii) yn = ( a + bn ) ( 1)
n
2 , n ( ) ( )
9 9 2

1
(iii) u(x) = 2a + b ( 2 ) c + x ( 3 x ) , v ( x ) = a + c + b ( 2 )x ,
x

2
1
w ( x ) = a + b (2 ) + x ( x 1)
x

2
n ( n + 1)
(iv) x (n ) = ( 4n + 2 ) + , y (n ) = ( 2.4 2 ) n (n 1)
n 1
2 2

You might also like