>    restart;

Problem  4.57(a) page 133- "Solve the difference equation."

With initial condition of a(0)=1, a(1)=0.

This "Difference Equation" problem from chapter 4 of "Schaum's Outlines: LAPLACE TRANSFORMS", is one of the assigned problem that you (MA-360 fall 2006 class) solve using "Laplace Transform" method. Shown below is the way how "Maple 9 does it rather easily.

>    rsolve({3*a(n+2) - 5*a(n+1) + 2*a(n) = 0, a(0)=1, a(1)=0}, {a});

{a(n) = -2+3*(2/3)^n}

To find an exact answer to say, a(5) and a(9), we need to invoke the 'makeproc' option. This instruct Maple 9 to create a code for a procedure that can be repeatedly use to specify desired values.

>    a:=rsolve({3*a(n+2)- 5*a(n+1) + 2*a(n) = 0, a(0)=1,a(1)=0}, {a(n)}, 'makeproc');

a := proc (n) local i, s, t, bipow; bipow := proc (n) local A, B, M, nbase2, i, j, k, pos, len; option `Copyright (c) 1991 by the University of Waterloo. All rights reserved.`; if n = 0 then return Mat...
a := proc (n) local i, s, t, bipow; bipow := proc (n) local A, B, M, nbase2, i, j, k, pos, len; option `Copyright (c) 1991 by the University of Waterloo. All rights reserved.`; if n = 0 then return Mat...
a := proc (n) local i, s, t, bipow; bipow := proc (n) local A, B, M, nbase2, i, j, k, pos, len; option `Copyright (c) 1991 by the University of Waterloo. All rights reserved.`; if n = 0 then return Mat...
a := proc (n) local i, s, t, bipow; bipow := proc (n) local A, B, M, nbase2, i, j, k, pos, len; option `Copyright (c) 1991 by the University of Waterloo. All rights reserved.`; if n = 0 then return Mat...
a := proc (n) local i, s, t, bipow; bipow := proc (n) local A, B, M, nbase2, i, j, k, pos, len; option `Copyright (c) 1991 by the University of Waterloo. All rights reserved.`; if n = 0 then return Mat...
a := proc (n) local i, s, t, bipow; bipow := proc (n) local A, B, M, nbase2, i, j, k, pos, len; option `Copyright (c) 1991 by the University of Waterloo. All rights reserved.`; if n = 0 then return Mat...
a := proc (n) local i, s, t, bipow; bipow := proc (n) local A, B, M, nbase2, i, j, k, pos, len; option `Copyright (c) 1991 by the University of Waterloo. All rights reserved.`; if n = 0 then return Mat...
a := proc (n) local i, s, t, bipow; bipow := proc (n) local A, B, M, nbase2, i, j, k, pos, len; option `Copyright (c) 1991 by the University of Waterloo. All rights reserved.`; if n = 0 then return Mat...
a := proc (n) local i, s, t, bipow; bipow := proc (n) local A, B, M, nbase2, i, j, k, pos, len; option `Copyright (c) 1991 by the University of Waterloo. All rights reserved.`; if n = 0 then return Mat...
a := proc (n) local i, s, t, bipow; bipow := proc (n) local A, B, M, nbase2, i, j, k, pos, len; option `Copyright (c) 1991 by the University of Waterloo. All rights reserved.`; if n = 0 then return Mat...
a := proc (n) local i, s, t, bipow; bipow := proc (n) local A, B, M, nbase2, i, j, k, pos, len; option `Copyright (c) 1991 by the University of Waterloo. All rights reserved.`; if n = 0 then return Mat...
a := proc (n) local i, s, t, bipow; bipow := proc (n) local A, B, M, nbase2, i, j, k, pos, len; option `Copyright (c) 1991 by the University of Waterloo. All rights reserved.`; if n = 0 then return Mat...
a := proc (n) local i, s, t, bipow; bipow := proc (n) local A, B, M, nbase2, i, j, k, pos, len; option `Copyright (c) 1991 by the University of Waterloo. All rights reserved.`; if n = 0 then return Mat...

>    a(5);

-130/81

>    a(9);

-12610/6561

Similarly Problem 4.57(b) page 133

with initial condition of b(0)=0, b(1)=1

can likewise be solve as follow

>    rsolve({b(n+2) + 2*b(n+1) - 3*b(n) = 0, b(0)=0, b(1)=1}, {b});

{b(n) = 1/4-1/4*(-3)^n}

>   

To find value for instant for b(5) and b(7), we first invoke 'makeproc' then specify them.

>    b:=rsolve({b(n+2) + 2*b(n+1) - 3*b(n) = 0, b(0)=0,b(1)=1}, {b(n)}, 'makeproc');

b := proc (n) if 1 < nargs then ('procname')(args) else expand(-1/4*(-3)^n+1/4) end if end proc

>    b(5);

61

>    b(7);

547

>