Artificial intelligent assistant

What if monthly contribution is taken into account This it the formula for final value when there is no monthly contribution ! $$finalvalue={initial amount *{(1+rate of Interest )^ {(compoundfrequency∗years)}}\over compound frequency)}$$! What will be formula if monthly contribution is taken into account ! People who are down voting can you please explain why ! ![enter image description here](

let $i_m=\frac{i}{12}$ the monthly converted interest rate and $q=1+i_m$. $x$ is the the monthly payed amount of money.

Then the future value (final balance) is

$$S=\color{red}x+x\cdot q+x\cdot q^2+x\cdot q^3+x\cdot q^4+\ldots+x\cdot q^n \quad (1)$$

Multipliying by $q$

$$S\cdot q= x\cdot q+x\cdot q^2+x\cdot q^3+x\cdot q^4+\ldots+x\cdot q^n+\color{red}{x\cdot q^{n+1}} \quad (2)$$

Subtracting (2) from (1)

$S-S\cdot q=x-x\cdot q^{n+1}$

$S(1-q)=x(1-q^{n+1})$

Thus $$S=x\cdot \frac{1-q^{n+1}}{1-q}$$

In your case $x=100, q=1+\frac{0.5}{12}$ and $n=2$. Therefore

$$S=100\cdot \frac{1-(1+\frac{0.5}{12})^{3}}{1-1-\frac{0.5}{12}}=100\cdot \frac{1-(1+\frac{0.5}{12})^{3}}{-\frac{0.5}{12}}=312.67$$

Edit:

The general formula is

$$S= \frac{x\cdot (1-q^{n})+y\cdot (q^n-q^{n+1})}{1-q}=\frac{x\cdot (1-q^{n})}{1-q}+y\cdot q^n$$

with $x=100, y=50,q=1+\frac{0.5}{12}$ and $n=2$ it is

$$\frac{100-(100\cdot (1+\frac{0.5}{12})^{2})}{-\frac{0.5}{12}}+50\cdot (1+\frac{0.5}{12})^2=258.42$$

xcX3v84RxoQ-4GxG32940ukFUIEgYdPy 111b36a7ec1765903953db89238ded7c