Suppose someone has a lake with an area of $A = 1240~m^2$ in this example). It is covered by an area of $c = 10~m^2$) of algae at the beginning ($t = 0$), which doubles each day. This gives us the exponential formula
$A(t) = c \cdot a^t$
$A(t) = 1240 \cdot 2^t$
Now, suppose the owner of the lake removes a constant area of algae at the end of each day ($b$, in this case $= 8 m^2$). The tasks are the following:
- find a formula to describe this removal.
- calculate after how many days (real number, not integer) the lake will be fully covered.
- calculate how much area the owner has to remove so that it takes exactly a) 14 days and b) one year for the lake to be fully covered.
(Note that this is a 12th-grade task we were supposed to solve during the lesson. The teacher showed me the solution but couldn't explain it.)
My initial approach to this was to use a recursive formula
$A(0) = c - b$
$A(t) = A(t - 1) \cdot a - b$
which expands to
$A(0) = 10 - 8 = 2$
$A(t) = A(t - 1) \cdot 2 - 8$
However, this couldn't be used to find the solution for task 2 and 3b.
The apparent formula my teacher gave me was the following:
$A(t) = c \cdot a^t - b\cdot\frac{a^t - 1}{a - 1}$
This expands to
$A(t) = 10 \cdot 2^t - b\cdot\frac{2^t - 1}{2 - 1}$
$A(t) = 10 \cdot 2^t - b\cdot(2^t - 1)$
You start with the behavior after first second third... day and then generalize
You can write now for $4^{th}$ day without calculating anything $2(2(2(2c-b)-b)-b)-b$
You have $c\cdot2^4$ and then how many times you reduce by b: $-2\cdot 2\cdot 2\cdot b-2\cdot 2\cdot b-2\cdot b-b$
It is clear that in general case after n days you are going to have
$c\cdot 2^n-2^{n-1} b-2^{n-2}b-...-2b-b = c\cdot 2^n-(2^{n-1}+2^{n-2}+...+2+1)b$
This part $2^{n-1}+2^{n-2}+...+2+1$ is a sum of geometric series, simply multiply by $1=(2-1)$ and telescope to find $2^{n-1}+2^{n-2}+...+2+1=2^n-1$
The solution is then $c\cdot2^n-b\cdot (2^n-1)$
As you can see the solution is the same as if we have $(c-b)$ area from the start plus one additional $b$, $(c-b)\cdot2^n+b$