# FV challenge...

#### Wilmer

##### In Memoriam
d is deposited in a savings account for 3 years, then 2d for 3years,
then 3d for 3 years, and so on similarly;
here's an example for 9 years, 1st deposit = $100, rate = 10% annual: Code: YEAR DEPOSIT INTEREST BALANCE 0 .00 1 100.00 .00 100.00 2 100.00 10.00 210.00 3 100.00 21.00 331.00 4 200.00 33.10 564.10 5 200.00 56.41 820.51 6 200.00 82.05 1,102.56 7 300.00 110.26 1,512.82 8 300.00 151.28 1,964.10 9 300.00 196.41 2,460.51 GIVENS: y = number of years (multiple of 3): 9 in above example j = annual rate / 100 : .10 in above example f = first deposit :$100 in above example

What is the future value of the account (2,460.51 in above example) in terms of y, j and f ?

#### MarkFL

Staff member
I find:

$$\displaystyle FV(y,j,f)=f\sum_{k=1}^y\left(\left\lceil\frac{k}{3} \right\rceil(1+j)^{y-k} \right)$$

I simply wrote down the first few terms, observed the pattern, then checked the above formula against the provided table.

#### Wilmer

##### In Memoriam
Nice, Mark, but that's not really what I was after;

I meant something like a standard financial formula, a bit like:
FV of growing annuity = P * ((1+r)^n - (1+g)^n) / (r-g)
P=initial payment
r=discount rate or interest rate
g=growth rate
n=number of periods

Guess I should have said so, then

#### MarkFL

Staff member
Nice, Mark, but that's not really what I was after;

I meant something like a standard financial formula, a bit like:
FV of growing annuity = P * ((1+r)^n - (1+g)^n) / (r-g)
P=initial payment
r=discount rate or interest rate
g=growth rate
n=number of periods

Guess I should have said so, then
I have FV on the left of the equal sign and on the right a set of mathematical symbols representing the value of FV...it's just like what you are after.

#### Wilmer

##### In Memoriam
...it's just like what you are after.
No it's not...the right side is not really a "formula", even if correct,
but more a definition of how the formula is arrived at...
Well, not really important anyway: won't affect price of groceries

#### MarkFL

Staff member
I gather you want a closed form...well, let's look at the difference equation:

$$\displaystyle FV_{y+1}-(1+j)FV_{y}=sf$$

where $s$ is the step-function $$\displaystyle s=\left\lceil\frac{y}{3} \right\rceil$$

The homogeneous solution will take the form:

$$\displaystyle h_y=c_1(1+j)^y$$

But, I have no idea what form the particular solution must take, given that pesky step function, which also thwarts my ability to use symbolic differencing to obtain a homogeneous recurrence.

#### Wilmer

##### In Memoriam
Well, this was mine :

n = FLOOR(y/3) + 1 [4 in example]
i = (1 + j)^3 - 1 [.331 in example]
d = f(j^2 + 3j + 3) [331.00 in example]
Code:
     d[(1 + i)^n - in - 1]
FV = ---------------------
i^2

Last edited:

#### MarkFL

Staff member
Your formula does work when $y$ is a multiple of 3, and if I had read your original post more carefully, I would have noticed you did state that $y$ is a multiple of 3...I was trying to find a formula that worked for any natural number $y$.

When I have more time later, I will attempt to post a derivation of your formula.

#### Wilmer

##### In Memoriam
...and if I had read your original post more carefully, I would have noticed you did state that $y$ is a multiple of 3...
Oh oh: 15 minutes in the corner

#### MarkFL

Staff member
The 15 minutes in the corner was nothing compared to the battle I had with silly errors in coming up with the formula...

Let's let $y=3n$ where $n\in\mathbb{N_0}$.

Now, consider the following difference equation obtained from analyzing what goes on in between each value of $n$:

$$\displaystyle FV_{n+1}-(1+j)^3FV_{n}=(n+1)f\left(j^2+3j+3 \right)$$

We see that the homogeneous solution is given by:

$$\displaystyle h_n=c_1(1+j)^{3n}$$

And we seek a particular solution of the form:

$$\displaystyle p_n=An+B$$

Substituting, we find:

$$\displaystyle (A(n+1)+B)-(1+j)^3(An+B)=(n+1)f\left(j^2+3j+3 \right)$$

$$\displaystyle -jAn+\frac{A}{j^2+3j+3}-jB=fn+f$$

Equating coefficients, we find:

$$\displaystyle A=-\frac{f}{j},\,B=-\frac{f(1+j)^3}{j^2\left(j^2+3j+3 \right)}$$

Thus, we have:

$$\displaystyle p_n=-\frac{f}{j}n-\frac{f(1+j)^3}{j^2\left(j^2+3j+3 \right)}$$

And so the general solution is:

$$\displaystyle FV_{n}=h_n+p_n=c_1(1+j)^{3n}-\frac{f}{j}n-\frac{f(1+j)^3}{j^2\left(j^2+3j+3 \right)}$$

Using $FV_0=0$, we find:

$$\displaystyle c_1=\frac{f(1+j)^3}{j^2\left(j^2+3j+3 \right)}$$

Thus, we have (after some simplification):

$$\displaystyle FV_{n}=\frac{f}{j}\left(\frac{(1+j)^{3n}-1}{1-(1+j)^{-3}}-n \right)$$

#### Wilmer

##### In Memoriam
I simply converted a "3 periods" to an equivalent "1 period";
in my example, that's 331 deposited periodically , and
increasing by 331 each period, at 33.1%.
Code:
P  DEPOSIT INTEREST BALANCE
0                        .00
1   331.00            331.00
2   662.00  109.56  1,102.56
3   993.00  364.95  2,460.51