# Recurrence relation - How to solve this recurrence relation

a person invests 1000 at a bank at 4 percent compound interest compounded annually and every year government and bank charges amounting to C are deducted and if An is the value of the investment at the end of 10 years.

Solve this difference equation.

if i)C=0 ii)C=40

$$A_{10} = 1.04 A_{n-1} - C$$
$$A_0 = 1000$$

i) C=0

$$A_{10} = 1.04^{10} . 1000 = 1480.24$$

ii) C=40

$$A_n = 1.04 . A_{n-1} - 40$$

Particular solution: Put $$A_n = A_{n-1} = A*$$
$$A* = 1.04 . A* - 40$$
$$A* = 40/0.04 = 1000$$

General solution of the associated homogenous equation: $$A_n = 1.04 A_{n-1}$$
$$a_n = A . 1.04^n$$

General solution of the difference equation: $$A_n = A_n + A*$$
$$A_n = A . 1.04^n + 1000$$
$$A_0 = A . 1.04^0 + 1000$$
$$A = 1000$$

$$A_{10} = 1000 . 1.04^{10} + 1000$$
$$= 1480.20 + 1000$$
$$= 2480.24$$

Getting 2480.24 as the answers tell me something is wrong. But I cant figure out which part of my working is incorrect.

Since 1000-40 for 10 years I believe the answer should be

$$A_{10} = 1.04^{10} . 1000 - 40$$

In your first line the subscript $10$ should be $n$, and why is the multiplier $1.04$ instead of $1.02$? This ripples all the way through. – Ross Millikan May 2 '11 at 17:44
I propose that we deal with this problem in a purely algebraic fashion, i.e., without talking about specific numbers like 4% or $40\$$or 10 years. So we have an initial investment a_0 on January 1st of year 1, an annual increment factor 1+p and an annual charge c. After n years have elapsed, i.e., on January 1st of year n+1, the amount on the account is a_n. The sequence n\mapsto a_n satisfies the recurrence relation$$a_{n+1}=(1+p)a_n - c\qquad(n\geq 0)\ .$$If it weren't for the c the a_n would increase exponentially. To account for the charges we try a solution of the form$$a_n= a (1+p)^n + b\qquad (n\geq 0)\qquad(*)$$and hope that we can fix the constants a and b in such a way that all conditions of the problem are fulfilled. Putting n=0 in (*) we must have a+ b=a_0 (where a_0 is given in advance), and the recurrence relation implies$$a(1+p)^{n+1} + b = (1+p)\bigl(a(1+p)^n + b \bigr) -c$$from which we draw the condition b=(1+p) b -c \ or \ b={c\over p}. It follows that a=a_0-{c\over p} so that we definitively obtain$$a_n=\Bigl(a_0-{c\over p}\Bigr)(1+p)^n + {c\over p}\ .$$- Your work on i.) is correct. For ii.) you could just notice that with C=40, A_0=1000, you get A_1=1000 and nothing changes. So A_n=1000 for all n. If A_0 were not 1000, you could imagine breaking A_0 into two pieces-A_* and A_{**}. The A* piece, we see, doesn't change and pays the annual fee of C. The A_{**} piece (which could be negative) is left to grow at 4\% per year. So if you started with A_0=1500 you would say A_*=1000, A_{**}=500, so A_n=1000+500\cdot1.04^n. Have you checked out the Wikipedia article? -$$ A_0 = A(1.04)^0 + 1000  A = 1000 $$Hence$$ A = 0  A_10 = 1000$$– youcanlearnanything May 3 '11 at 12:56 I dont really understand the explanations on wikipedia. – youcanlearnanything May 3 '11 at 12:57 can anyone further elaborate? – youcanlearnanything May 3 '11 at 14:31 @liengteh: Do you understand the separation into a particular solution of the full equation and a general solution of the homogeneous equation (deleting your C) because of linearity? That is the heart of this. – Ross Millikan May 5 '11 at 4:46 In general: We know the recurrence:$a_{n+1} = r \; a_n $has the explicit solution$a_n = r^n a_0$To solve the non-homogeneous recurrence$a_{n+1} = r \; a_n + c $we seek an alternative$b_n = a_n + x$($x$is to be found) such that the above equation is equivalent to$b_{n+1} = r \; b_n $Replacing, we must have$c = rx -x$, so$x = c/(r-1)$And then the solution is$b_n = r^n \; b_0a_n + x = r^n \; ( a_0 + x)\displaystyle a_n = r^n \; a_0 + c \frac{ r^n-1}{r-1}\$