For a number `c` and a function `f`
`u_0=c` and `u_(n+1) = f(u_n)`
is a recurrence relation description of a sequence.
Q: A patient is injected with `160`ml of a drug. Every `6` hours `25%` of the drug passes out of her bloodstream. To compensate a further `20`ml dose is given every `6` hours.
A: (a) Let `u_n` be the amount of drug in bloodstream after `6 times n` hours.
Initial amount `u_0 = 160`ml
After every `6` hours `25%` leaves so `75%` remains.
To the remaining `75%` an extra `20`ml is added. So
`u_(n+1) = 75/100 u_n +20`.
(b) The patient will have received two injections after `12` hours. So we need to calculate `u_2`.
`u_1 = 75/100 times 160 +20 = 140`ml
`u_2 = 75/100 times 140 + 20 = 125`ml
A sequence defined by
`u_(n+1) = a u_n +b \ \ \ \ \ \ \ \ \ \ \ a!=0`
is called a linear recurrence relation.
(Linear because comparing with `u_(n+1)=f(u_n)`, we see `f(x) = ax+b`, the equation of a line.)
A sequence in mathematics is an ordered list. For example
`9, 9, 9`
`6,7,6,6,9`
`1,1,2,3,5,8, ldots`
`1,3,5,7, ldots`
`0, 1/2, 2/3, 3/4, ldots`
`1,-1,1,-1, ldots`
We often relate a sequence to a general sequence `u_0, u_1, u_2, ldots`
e.g. `u_0 =1, u_1=3, u_2=5`.
Because we start with `u_0`, the `n`th term in the sequence is `u_(n-1)`.
In one of Fibonacci's books he posed the following problem: "How many pairs of rabbits would there be each month if you started with a pair of newborn rabbits?"
Picture from http://www.ee.surrey.ac.uk/Personal/R.Knott/Fibonacci/fibnat.html
Sometimes by plotting the points of an infinite sequence we can see patterns.
In graphs 2 to 4 there are patterns and in 2 and 3 there is a special type of pattern: convergence.
As we go further through the sequence the terms are approaching a fixed value, called the limit.
If a sequence converges it has a limit.
A sequence that doesn't converge is said to diverge.
with(LREtools):
prob := REcreate(
u(n+1)=0.3*u(n)- 11
,u(n),{u(0) = 8}):
rec := REtoproc(prob): first:= rec(0); second := rec(1); third:= rec(2); tenth := rec(9); hundreth := rec(99);
REplot(prob,0..3);
For a linear recurrence relation
`u_(n+1) = au_n +b`,
if `-1 <a<1`, then the sequence `u_0, u_1, ldots` converges and has limit
`L = b/(1-a)`.
Q: Find the first four terms and the limit, if it exists, for the following recurrence relations:
(a) `quad u_(n+1) = 0.3u_n +11 qquad qquad u_0=8`
(b) `quad u_(n+1)=7-1.2u_n qquad qquad u_0=1`
A: (a) `u_0=8, u_1=13.4, u_2=15.02, u_3=15.506, ldots `
Sequence converges because `a= 0.3` and so `-1<a<1`.
Therefore limit is `L= b/(1-a)=11/(1-0.3)=15.71428 ldots`
A: (b) `u_0=1, u_1=5.8, u_2=0.04, u_3=6.952`
Sequence does not satisfy the convergence condition above, because `a=-1.2<-1`. And by checking with a plot we see that it diverges.
Q: A recurrence relation is defined by `u_(n+1) = au_n+b` has
`u_1=2, qquad u_2=4, qquad, u_3=14`.
Find `a` and `b`.
A: Because `u_(n+1) = au_n+b`, we know that `u_2 = au_1 +b` and `u_3=au_2+b`. So using the information given in the question we get the simultaneous equations
`4=2a+b`
`14=4a+b`
Subtracting the two equations above gives `10=2a`. So `a=5`.
Substituting `a=5` into `4=2a+b`, gives `4=2 times 5 +b`. So `b=-6`.
Q: The population of Scotland is approximately 5 million. Each year since 1990, `30%` of the rural community has moved to an urban environment, while `2%` of urban dwellers have moved to the country. Demographers are concerned with the long-term effect on the population if this pattern continues.
(a) If `R_n` denotes the rural population, in millions, after `n` years, show that
`R_(n+1)=0.68R_n+0.1`.
(b) What would be the long-term effect on the rural population if this pattern were to continue?
A: (a) We have that `R_n=` the rural population, in millions, after `n` years.
So let `U_n=` the urban population, in millions, after `n` years.
So `R_n+U_n=5`. That is `U_n=5-R_n`.
The information in the question also tells us that
`R_(n+1) = 0.7 R_n +0.02U_n`.
Now substitute `U_n=5-R_n` into the equation above to get
`R_(n+1) = 0.7 R_n + 0.02 (5-R_n)`
`=0.68R_n +0.1`.
(b) Comparing with the general formula for a linear recurrence relation (`u_(n+1) = au_n +b`) we see that `a=0.68`. Therefore the sequence converges because `-1<a<1`.
Limit `= b/(1-a) = 0.1/(1-0.68)=0.3125`
The long-term effect is that the rural population will tend to 312,500.
Example of an arithmetic sequence: `1,4,7,10, ldots`.
The recurrence relation description is `\ \ \ u_0 = a, \ \ \ \ \ \ \ \ \ \ \ u_(n+1) = u_n+d`.
Hence the sequence is
`u_0=a ,`
`u_1=a+d ,`
`u_2=a+2d, \ .....`
So we can describe the sequence directly by `\ \ \ \ \ \ \ u_n=a+nd`.
Example of a geometric sequence
The recurrence relation description is `\ \ \ u_0= a \ \ \ \ \ \ \ \ \ \ \ u_(n+1)=r u_n`
Hence the sequence is
`u_0 = a, `
`u_1=ra,`
`u_2 = r^2a, . . . . . `
So we can describe the sequence directly by `\ \ \ \ u_n = r^na`.