<s>[INST] Derivative of sum over sum? Consider the following expression:
$$f(r)=\sum_{t=1}^T\frac{c}{(1+r)^t\sum_{k=1}^T\frac{c}{(1+r)^k}}\cdot t$$
with $c,r,T>0$.
Is it true, that $f(r)$ is decreasing in $r$?
I.e. $f(0)\geq f(r),\quad \forall r>0$?
 [/INST] Hint: The function can be considerably simplified, which should ease the analysis of monotonicity.
In the following I use for convenience only $f_T$ instead of $f$ to indicate the dependency of the parameter $T>0$.

Observe that the inner sum does not depend on the index $t$ of the outer sum and can so be factored out. We obtain for $c,r,T>0$
  \begin{align*}
f_T(r)&=\sum_{t=1}^T\frac{c}{(1+r)^t\sum_{k=1}^T\frac{c}{(1+r)^k}}\cdot t\\
&=\left(\sum_{k=1}^T\frac{1}{(1+r)^k}\right)^{-1}\sum_{t=1}^T\frac{t}{(1+r)^t}\tag{1}\\
&=\left(\frac{\frac{1}{1+r}-\left(\frac{1}{1+r}\right)^{T+1}}{1-\frac{1}{1+r}}\right)^{-1}\sum_{t=1}^T\frac{t}{(1+r)^t}\tag{2}\\
&=\frac{r}{1-\left(\frac{1}{1+r}\right)^{T}}\sum_{t=1}^T\frac{t}{(1+r)^t}\tag{3}\\
&=\frac{r(1+r)^{T}}{(1+r)^T-1}\sum_{t=1}^T\frac{t}{(1+r)^t}\tag{4}
\end{align*}

Comment:


*

*In (1) we cancel $c$ and factor out the inner sum.

*In (2) we apply the formula for the finite geometric series.

*In (3) and (4) we do some simplifications.
Now we derive a closed formula for the series in (4). 

We obtain from (4) with $q:=\frac{1}{1+r}$
  \begin{align*}
\sum_{t=1}^T\frac{t}{(1+r)^t}&=\sum_{t=1}^Ttq^t
=q\cdot\sum_{t=1}^Ttq^{t-1}
=q\cdot\frac{d}{dq}\left(\sum_{t=1}^Tq^t\right)\\
&=q\cdot\frac{d}{dq}\left(\frac{1-q^{T+1}}{1-q}\right)\\
&=q\cdot\frac{Tq^{T+1}-(T+1)q^{T}+1}{\left(1-q\right)^2}\\
&=\frac{1}{1+r}\cdot\frac{T\left(\frac{1}{1+r}\right)^{T+1}-(T+1)\left(\frac{1}{1+r}\right)^T+1}{\left(1-\frac{1}{1+r}\right)^2}\\
&=\frac{1+r}{r^2}\cdot\left(T\left(\frac{1}{1+r}\right)^{T+1}-(T+1)\left(\frac{1}{1+r}\right)^T+1\right)\\
\end{align*}

$$ $$

Putting this in (4) we obtain
\begin{align*}
f_T(r)&=\frac{1}{r}\cdot\frac{(1+r)^{(T+1)}}{(1+r)^T-1}\cdot\left(T\left(\frac{1}{1+r}\right)^{T+1}-(T+1)\left(\frac{1}{1+r}\right)^T+1\right)\\
&=\frac{1}{r}\cdot\frac{(1+r)^{T+1}-(1+T)r-1}{(1+r)^{T}-1}\\
&=1+\frac{1}{r}-\frac{T}{(1+r)^T-1}
\end{align*}

Note: The derivation of $f_T$ assumes $r>0$ according to the stated problem. We get 
\begin{align*}
\lim_{r\rightarrow 0}\left(1+\frac{1}{r}-\frac{T}{(1+r)^T-1}\right)=\frac{1}{2}\left(T+1\right)
\end{align*}
which coincides with $f_T$ evaluated at $r=0$.
</s>