Calculate the ROI when the rate of return has its own rate of change. This is a real-world problem, not a home-work assignment or anything of the sort.
Where I live, the current cost of electricity (Tariff) is $T_0$. Historically, I've noticed that this rate changes at an average compounding monthly rate of $r$. I am installing some solar panels which will generate some average number $n$ of kWhrs each month, which will generate a savings ($S$) of $nT_0$ in the first month.  My solar panels will cost me $c$.
So, in any given month $t$, it would seem my savings would be $nT_t$ or $nT_0(1+r)^t$
I would like to determine an expression which yields the number of months until my accumulated savings equals my initial cost.
Suddenly, I wished I had paid more attention in Calculus class, 28 years ago. I do want to remember this stuff, so, showing me the steps/process, not just the answer itself is important to me.
 A: I assume you meant savings in month $t$ are given by
$$nT_0(1+r)^{t-1}$$
To check, when $t=1$, the first month, the savings are $nT_0(1+r)^{1-1}=nT_0$.
Now to find the cumulative savings till month $M$, we need to sum this up.  Let $S$ denote this savings. So we have
$$S = nT_0 + nT_0(1+r) + nT_0(1+r)^2+...+nT_0(1+r)^{M-1}$$
A simple way to do this sum is to consider multiplying the whole equation above with $(1+r)$.  Then we have
$$S(1+r) = nT_0(1+r) + nT_0(1+r)^2 + nT_0(1+r)^3+...+nT_0(1+r)^M$$
Subtracting the equations, you can notice many terms on the RHS cancelling, giving
$$Sr = nT_0(1+r)^M - nT_0$$
$$\text{or }\quad S = nT_0\frac{(1+r)^M-1}{r}$$
You need to find when this becomes equal to (or greater than) $c$.
So set $\displaystyle nT_0\frac{(1+r)^M-1}{r} = c$ and solve for $M$.  This is probably easier using the actual numbers, however algebraically you could do...
$$(1+r)^M = 1 + \frac{cr}{nT_0}$$
$$M \log(1+r) = \log(1 + \frac{cr}{nT_0})$$
$$\text{So }\quad M = \frac{\log(1 + \frac{cr}{nT_0})}{\log(1+r)}$$
