The first payment of 10 accumulates 40 cycles of interest, i.e. 10*1.05^40
and the last payment of 40 accumulates 1 cycle of interest, 40*1.05
. To get the total these are added together along with all the payments in-between :-
10*1.05^40 + 10*1.05^39 + 10*1.05^38 + 10*1.05^37 + 10*1.05^36 +
10*1.05^35 + 10*1.05^34 + 10*1.05^33 + 10*1.05^32 + 10*1.05^31 +
20*1.05^30 + 20*1.05^29 + 20*1.05^28 + 20*1.05^27 + 20*1.05^26 +
20*1.05^25 + 20*1.05^24 + 20*1.05^23 + 20*1.05^22 + 20*1.05^21 +
30*1.05^20 + 30*1.05^19 + 30*1.05^18 + 30*1.05^17 + 30*1.05^16 +
30*1.05^15 + 30*1.05^14 + 30*1.05^13 + 30*1.05^12 + 30*1.05^11 +
40*1.05^10 + 40*1.05^9 + 40*1.05^8 + 40*1.05^7 + 40*1.05^6 +
40*1.05^5 + 40*1.05^4 + 40*1.05^3 + 40*1.05^2 + 40*1.05 =
2445.27
In shorter form :-
Alternatively expressed :-
So solving for future value, v :-
Using this result the future value can be calculated more succinctly :-
10*1.05*(1.05^10 - 1)/0.05 + 10*1.05*(1.05^20 - 1)/0.05 +
10*1.05*(1.05^30 - 1)/0.05 + 10*1.05*(1.05^40 - 1)/0.05 =
2445.27
Note
The above finds the total after 40 periods, giving the last payment one period in which to accrue interest. If, as you state, you actually want to know the total at the time the last payment is made, then you would have to deduct one cycle of interest from each term, i.e first term 10*1.05^39
; last term, simply 40. I imagine you probably want the full 40 periods though.
10*1.05^39 + 10*1.05^38 + 10*1.05^37 + 10*1.05^36 + 10*1.05^35 +
10*1.05^34 + 10*1.05^33 + 10*1.05^32 + 10*1.05^31 + 10*1.05^30 +
20*1.05^29 + 20*1.05^28 + 20*1.05^27 + 20*1.05^26 + 20*1.05^25 +
20*1.05^24 + 20*1.05^23 + 20*1.05^22 + 20*1.05^21 + 20*1.05^20 +
30*1.05^19 + 30*1.05^18 + 30*1.05^17 + 30*1.05^16 + 30*1.05^15 +
30*1.05^14 + 30*1.05^13 + 30*1.05^12 + 30*1.05^11 + 30*1.05^10 +
40*1.05^9 + 40*1.05^8 + 40*1.05^7 + 40*1.05^6 + 40*1.05^5 +
40*1.05^4 + 40*1.05^3 + 40*1.05^2 + 40*1.05 + 40 =
2328.82
(User58220 has posted the formula for this version.)