Suppose I started with $50 - initial investment, and on top of that, I decided to make weekly payments of $15 to the account paying 0.50% interest compounded continuously every quarter. What is the value of this account in 1 year?

Would it look like this?

function that models just one quarter.

Note: the problem is unrealistic because I made it up but the idea is realistic of earning interest on interest received plus investment put in

Now I suppose I could multiply that by 4 because there are 4 quarters in 1 year which will be

That is correct if I am assuming that interest was only paid for (50+180) odd dollars. In other words, at the end of every quarter I take out 4689.50 I made from the investment and starts again, puts back in $50 and resumes $15 weekly payments for the next 3 months and goes through the cycle again until the end of the 1 year.

But lets assume I didnt take out 4689.50 at the end of every quarter, so I started with 50 dollars plus 180(15*4*3). I receive 4689.50 after one quarter. and roll that balance onto the next 3 months and so on.

which will look like this

one quarter

2nd quarter

3rd quarter

etc etc.......

Heres my question. How do I formulate a exponential function that will model this when

changes from year to year and is not constant assuming that the balance of the invesment at the end of one year was rolled foward to the start of the next year and was not withdrawn from the account?