# Difference Equations

Tom’s old car has a major oil leak, losing 25% of the oil in the engine every week. Tom adds a quart of oil weekly. The capacity of the engine is 6 quarts of oil. In the long run, what will the oil level (in quarts) be at the end of every week before each quart of oil is added?

-
Welcome to Math.SE! One way you can help us answer your question is by describing what you've already tried. What have you attempted to do in solving this word problem? (Also--What does this have to do with differential equations?) – apnorton Dec 7 '12 at 13:20
This seems to be more of a dynamical systems question - the fuel is added all at once, it seems to me? – andybenji Dec 7 '12 at 13:23
I don't think the oil is added all at once--it is added once a week at the end of the week. – apnorton Dec 7 '12 at 13:46

Let's write out a few test cases and see if we can find a pattern:

   At the end of week:    Capacity (quarts):    After filling (quarts):
1                   4.5                     5.5
2                   4.125                   5.125
3                   3.84375                 4.84375


Well, that wasn't too useful for pattern finding, but we can at least use it to check our work...

Let $a_i$ represent the amount of oil in the tank at then end of a given week $i$ (before filling the tank):

$$a_n = (a_{n-1}+1)\cdot\frac{3}{4}$$ for $n >= 0$ where $a_0 = 5$

Expanding: $$a_{n+2} = (((a_{n}+1)\cdot\frac{3}{4})+1)\cdot\frac{3}{4}$$ $$a_{n+2} = (((a_{n}+1)\cdot\frac{3^2}{4^2})+\frac{3}{4})$$ $$a_{n+2} = (((\frac{3^2}{4^2}\cdot a_{n}+\frac{3^2}{4^2}))+\frac{3}{4})$$ I will generalize this to: $$a_{n} = \left(\frac{3}{4}\right)^n\cdot a_{0}+\sum_{k=1}^{n}\frac{3^k}{4^k}$$ By geometric series: $$a_{n} = \left(\frac{3}{4}\right)^n\cdot a_{0}+\left(\frac{3}{4}\cdot\frac{1-\left(\frac{3}{4}\right)^n}{1-\left(\frac{3}{4}\right)}\right)$$

$$a_{n} = \left(\frac{3}{4}\right)^n\cdot a_{0}+\left(3\frac{2^{2n}-3^n}{2^{2n}}\right)$$

Computing $a_3$ yields $3.84375$, thus I assume the formula is correct.

EDIT: I now see you want what happens in the "long term." Taking the limit of the series as $n\to\infty$ evaluates to 3 quarts.

-
Just checked 1st ten cases--the explicit formula is correct... – apnorton Dec 7 '12 at 14:15

Let's first find the answer, on the assumption there is an answer. Let $a_n$ be the amount at the end of the $n$-th week, before adding the quart.

Then, as at the beginning of anorton's answer, we have $$a_{n+1}=\dfrac{3}{4}\left(1+a_n\right)\tag{1}$$
Assume that the limit of $a_n$ as $n\to\infty$ exists. Let that limit be $a$. Then $$a=\frac{3}{4}(1+a).$$ Solve for $a$: we get $a=3$.

We still owe a debt, to show existence. Since we "know" that the answer is $3$, it is natural to let $a_n=b_n+3$. Substituting in $(1)$, we obtain $$b_{n+1}=\frac{3}{4}b_n.$$ This finishes things, the "error" $b_n$ gets multiplied by $\dfrac{3}{4}$ each time, so $b_n$ has limit $0$. It follows that $a_n$ has limit $3$.

-
wow... I would have never thought of that approach. Much better than mine (with regards to time usage). – apnorton Dec 7 '12 at 15:58