# Difference equation for interest and bank account

1. Dec 14, 2012

### xortan

1. The problem statement, all variables and given/known data

Consider your bank offers a 2% annual interest rate, and has no annual service charge. Let y[n] represent your account balance at the beginning of the month n and x[n] represent the amount of money you deposit during the month n. Assume that deposits during month n are credited to the balance at the end of that month but earn no interest until the following month.

a. Use difference equations to express the relation between deposits and balances.
b. Assume that you deposit $1000 in the bank and make no further deposits. Solve your difference equations to determine your balance after 25 years. c. Determine your balance after 25 years if you deposit$100 each month

I think I have figured out the answer.

2. Relevant equations

r = interest rate
y[0] = 1000

3. The attempt at a solution

For part a I found the equation to be:

y[n] - (1+r)y[n-1] = x[n]

For part b the equation will become:

y[n] = (1 + r)n*y[0]

This gave an answer of $280 234.51 For part c I am kind of unsure about but after finding the zero-input and zero-state response and performing convolution I found the equation to be y[n] = 1000*(1 + r)n + 100*((1 - (1+r)n) / (1 - (1 + r)) This gave an answer of$2 276 407.05

Please let me know if I am on the right track here!

Thanks!
1. The problem statement, all variables and given/known data

2. Relevant equations

3. The attempt at a solution

2. Dec 15, 2012

### BruceW

Firstly, the interest will depend on the compounding frequency. Usually (by convention), this is per year. In other words, AER. You have assumed not AER. So your answer might not be correct for this reason.

Also, I don't think your equation in part a) is correct. You wrote: y[n] - (1+r)y[n-1] = x[n] But this means that the amount of money in your bank account at the start of the month depends on the amount of money you put in the bank account during that month. Which would be very useful, but unfortunately violates causality :)