Showing a function is increasing in a discrete variable I'm trying to show that$$
\frac{i(1-\lambda^{n})-n(\lambda^{n-i}-\lambda^{n})}{\mu(1-\lambda)(1-\lambda^{n-i})}
\
$$
is increasing in $1\leq i\leq n-1$ assuming that $\lambda <1$ and $n,i$ are both integers. The denominator is always decreasing in $i$ but the numerator seems to be increasing or decreasing depending on the parameters. I have tried to show the first difference is positive but no luck yet. I would appreciate any ideas. 
 A: There are some tricks you can use to make the task progressively simpler. You can ignore the positive constants $\mu$ (is $\mu$ positive?) and $1-\lambda$ in the denominator. Next, try to find $1-\lambda^{n-i}$ in the numerator by adding and subtracting $n$:
$$
\begin{align}
i(1-\lambda^{n})-n(\lambda^{n-i}-\lambda^{n})+n-n
&=i(1-\lambda^{n})+n(1-\lambda^{n-i})-n(1-\lambda^n)\\
&=n(1-\lambda^{n-i})-(n-i)(1-\lambda^{n})
\end{align}
$$
Dividing by $1-\lambda^{n-i}$, the expression now simplifies to
$$n-{(n-i)(1-\lambda^n)\over 1-\lambda^{n-i}}\;.
$$
To show this is increasing in $i$, you can ignore the leading $n$ and the positive factor $1-\lambda^n$; it's therefore enough to show that
$${-(n-i)\over1-\lambda^{n-i}}$$
is increasing in $i$. Change indices, setting $k:=n-i$. Notice that $k$ decreases as $i$ increases. You're now reduced to showing the expression 
$${k\over 1-\lambda^k}\tag1$$ is increasing in $k$. One way to establish this is to treat $k$ as a continuous variable and show the function $$f(x):={x\over1-\lambda^x}$$ has a positive derivative for all $x>0$. Is this true? Calculate
$$f'(x)={(1-\lambda^x)-x(-\lambda^x)\log\lambda\over(1-\lambda^x)^2}
={1-\lambda^x(1-x\log\lambda)\over(1-\lambda^x)^2}\;.
$$
We want the numerator of $f'(x)$ to be positive for all $x>0$. Call the numerator $h(x)$. We see $h(0)=0$, so it's enough to show $h(x)$ is increasing for positive $x$. Calculate the derivative of $h$:
$$h'(x)=-\lambda^x\log\lambda(1-x\log\lambda)-\lambda^x(-\log\lambda)=x\lambda^x(\log\lambda)^2\;,
$$
which is positive for all $x>0$, and we're done!

EDIT: Alternatively, you can show the first difference of (1) is positive using using the mean value theorem. The first difference is
$${k+1\over1-\lambda^{k+1}}-{k\over1-\lambda^k}={(1-\lambda^k)-(1-\lambda)k\lambda^k\over(1-\lambda^{k+1})(1-\lambda^k)}\;.$$
To show the numerator is positive, consider  $g(t):=t^k$ for fixed $k$ and look at $g(\lambda)$ and $g(1)$. By the MVT,
$${1-\lambda^k\over1-\lambda}={g(1)-g(\lambda)\over1-\lambda}=g'(c)$$
for some $c$ between $\lambda$ and 1. But
$$g'(c)=kc^{k-1}> kc^k> k\lambda^k\;,$$
since $1>c>\lambda$. Conclude
$${1-\lambda^k\over1-\lambda}>k\lambda^k\;.$$
A: since 
$$\dfrac{i(1-\lambda^n)-n(\lambda^{n-i}-\lambda^n)}{1-\lambda^{n-i}}=\dfrac{i\lambda^n(1-\lambda^n)-n\lambda^n(1-\lambda^i)}{\lambda^i-\lambda^n}=f(i)$$
then we have
$$f'(x)=\dfrac{A}{B}=\dfrac{(x^i-x^n)[x^i(1-x^n)+ix^i\ln{x}(1-x^n)+nx^nx^i\ln{x}]-[ix^i(1-x^n)-nx^n(1-x^i)]x^i\ln{x}}{(x^i-x^n)^2}$$
since
$$A=-x^i(x^n-1)(x^i-x^n+nx^n\ln{x}-ix^n\ln{x})$$
Note $x\in(0,1),1\le i<n$,then we have
$$-x^i(x^n-1)\ge 0$$
Let
$$g(x)=x^i-x^n+nx^n\ln{x}-ix^n\ln{x}=x^n\ln{x}(n-i)+x^i-x^n$$
By the mean value we have
$$x^i-x^n=(i-n)\ln{x}x^{\xi},\xi\in[i,n]$$
so
$$g(x)=\ln{x}(n-i)[x^n-x^{\xi}]>0$$
so $$f'(x)\ge 0$$
By Done!
