# Proof or find counterexample to inequality (in three vars)

I'm trying to show \begin{eqnarray*} \left(\frac{1-q^r}{1-q^n}\right)^{\frac{1}{n-r}} \left(\frac{q^n \log (q)}{\left(1-q^n\right) (n-r)}-\frac{\log \left(\frac{1-q^r}{1-q^n}\right)}{(n-r)^2}\right)>0, \end{eqnarray*}or alternatively find a counterexample. I know $q \in (0,1)$, $n>r$ and $n, r \in \mathbb{N}$. I tried the following code:

derivative[q_, r_, n_] = ((1 - q^r)/(1 - q^n))^(1/(n - r)) ((q^n Log[q])/
((1 - q^n) (n - r)) - Log[(1 - q^r)/(1 - q^n)]/(n - r)^2)
Reduce[derivative[q, r, n] > 0 && 0 < q < 1 && n > r && r>0 && n ∈ Integers && r ∈ Integers]
FindInstance[derivative[q, r, n] <= 0 && n > r && r>0 && 0 < q && q < 1 &&
n ∈ Integers && r ∈ Integers, {q, n, r}]


But each evaluation simply returns the given command (after running for multiple minutes on a brand new laptop). Is this just too complicated for Mathematica? There are only three variables, so it should be doable?

EDIT: Actually, Mathematica seems unable to do the FindInstance as soon as I add the $0<q<1$ constraint, even if I let it search for instances where the inequality holds -- but I can plot this as a function and all the values I can see are such that the inequality holds...

EDIT 2: I ended up solving this analytically; if you are interested you can see my answer at https://math.stackexchange.com/questions/1602299/sign-the-derivative-of-frac1-qr1-qn1-n-r-wrt-n-where-q-in/1603248#1603248

• I presume that you mean n and r to be Integers greater than 0. But, your code simply says Integers. – bbgodfrey Jan 6 '16 at 11:05
• Excellent catch! I reran it with r > 0 as additional restriction (see edit; n>0 follows from n>r) but still the same result :( – PortMeadow Jan 6 '16 at 11:09
• The first factor, ((1 - q^r)/(1 - q^n))^(n - r)^(-1), can be discarded, because it always is positive. Also, the second factor can be simplified by clearing its denominator. – bbgodfrey Jan 6 '16 at 11:17
• consider the factors seperately. Try without the integer restriction – george2079 Jan 6 '16 at 11:20
• @bbgodfrey Yes, I noticed that - but it changes nothing to do so (in terms of what Mathematica returned).. – PortMeadow Jan 6 '16 at 11:21

## 1 Answer

Beginning with the expression

((1 - q^r)/(1 - q^n))^(1/(n - r))
((q^n Log[q])/((1 - q^n) (n - r)) - Log[(1 - q^r)/(1 - q^n)]/(n - r)^2)


multiply by the positive quantity

(n - r)^2 (1 - q^n) ((1 - q^r)/(1 - q^n))^(-1/(n - r))


and Simplify to obtain

q^n (n - r) Log[q] + (-1 + q^n) Log[(-1 + q^r)/(-1 + q^n)]


The transformation q^n -> x and r/n -> t then reduces the number of variables from three to two.

x (1 - t) Log[x] + (x - 1) Log[(1 - x^t)/(1 - x)]


Unfortunately, Reduce and FindInstance still cannot determine whether this expression is positive. The function can, however, be plotted (with large WorkingPrecision to take account of substantial precision loss in evaluating the function).

ContourPlot[x (1 - t) Log[x] + (x - 1) Log[(1 - x^t)/(1 - x)], {x, 0, 1}, {t, 0, 1},
PlotPoints -> 100, PlotRange -> {0, 1}, FrameLabel -> {x, t},
ContourLabels -> All, WorkingPrecision -> 30] which appears to be positive throughout. Also, the limiting values of the function at x = 0, x = 1, and t=1 all are zero, while the limiting value at x = 0 is infinite. This does not prove the validity of the proposition in the question but does add credence to it.