# Solving Inequalities with Gamma Function

I am wondering why Mathematica outputs that the following system "cannot be solved with the methods available to Reduce".

$\frac{\Gamma(\frac{1}{2}+n)}{n-1}<\frac{\Gamma(\frac{1}{2}+k)}{k-1}$

with $k, n \in N$. I used the command

Reduce[Gamma[1/2 + n]/(-1 + n) < Gamma[1/2 + k]/(-1 + k) && k > 1 && n > 1, {n}, Integers]


and tried unsuccessfully to solve for $k$ and $n$.

I suppose, I do something improper and Mathematica is capable to solve those kind of inequalities. So, what did I do wrong?

First let's start with a symbolic approach in the reals. This is a general issue arrising in systems of equations and/or inequalities involving the Euler gamma function and a simple univariate polynomial, e.g.:

Reduce[ Gamma[x] == (-1 + x)^6 && x > 1, x, Reals]

Reduce::nsmet: This system cannot be solved with the methods available to Reduce. >>


we can remedy this problem by adding an upper bound, e.g. let's supplement the system with 100 > x:

Reduce[ Gamma[x] == (-1 + x)^6 && 100 > x > 1, x, Reals]

Reduce::incs: Warning: Reduce was unable to prove that the solution set found is complete. >>

x == 2 ||
x == Root[{1 - Gamma[#1] - 6 #1 + 15 #1^2 - 20 #1^3 + 15 #1^4 - 6 #1^5 + #1^6 &,
10.23754139578609138335400426041}]


Let's plot the function appearing in the original question, i.e. Gamma[1/2 + x]/(-1 + x):

Plot[ Gamma[1/2 + x]/(-1 + x), {x, 1, 5}, AxesOrigin -> {1, 0}, PlotStyle -> Thick]


In order to solve the system we have to determine monotonicity intervals of the function, i.e. where it decreases and increases respectively. We can find the minimum of the function numerically:

NMinimize[{Gamma[1/2 + x]/(-1 + x), x > 1}, x]

{1.28648, {x -> 2.23263}}


If we are interested in the argument only we can use FindRoot:

FindRoot[ D[Gamma[1/2 + x]/(-1 + x), x], {x, 2}]

{x -> 2.23263}


or we can find a symbolic solution with:

Reduce[ D[Gamma[1/2 + x]/(-1 + x), x] == 0 && 100 > x > 1, x, Reals]

 Reduce::nint: Warning: Reduce used numeric integration to show that
the solution set found is complete. >>

 x == Root[{-1 - PolyGamma[0, 1/2 + #1] + PolyGamma[0, 1/2 + #1] #1 &,
2.23263150493249115565238711315}]


Having said that you can figure out what the solution of the original question should be. We demonstrate graphically solutions for n == 5. Obvoiusly every integer k > 5 is a solution and there is no integer solution between 1 and the minimum of the function whatever integer n is. It will be convenient to use:

f = Log[ Gamma[1/2 + #]/(-1 + #)] &;


since Gamma increases too rapidly.

Plot[{f[x], f[5]}, {x, 1, 13.3}, AxesOrigin -> {1, 0}, PlotStyle -> Thick,
Filling -> {1 -> {2}}, FillingStyle -> {Lighter @ Cyan, Darker @ Orange},
Epilog -> {Red, PointSize[0.017], Point[{#, f[#]}& @
Root[{-1 - PolyGamma[0, 1/2 + #1] + PolyGamma[0, 1/2 + #1] #1 &,
2.23263150493249115565238711315}]],
Darker @ Green, PointSize[0.019], Point[{#, f[#]} & /@ Range[6, 13]],
Blue, Point[{#, f[#]}& @ 5]}, PlotRange -> All]


Every integer greater than n is a solution to the given inequality in the integers greater than 1. In the above plot the blue point denotes {5, f[5]} while higher integers in green denotes solutions k > n.

We encounter similar problems more often, e.g. see e.g. When does the real part of Zeta vanish on the critical line?. This post also clarify why another symbolic function (namely ZetaZero) was needed for finding symbolic roots of the Riemann Zeta function. I recommend reading also Transcendental Roots for a general setting of the underlying issue.

• Wonderful treatment of the problem. +1 – Mr.Wizard Jan 25 '14 at 19:50
• @Mr.Wizard Thanks, I think that special functions are one of the most impressive achievements of WRI. – Artes Jan 25 '14 at 20:03
• Very nicely done. +1 – ciao Jan 25 '14 at 23:21
• Many thanks for this really nice treatment of the problem. You are right in the original problem posted abvoe it is pretty easy to see what the solutions for a given n should be. But in cases like $2\frac{\Gamma(-0.5+n)}{\Gamma(n)}=\frac{\Gamma(-0.5+k)}{\Gamma(k)}$ it is not obvious. – user11937 Jan 26 '14 at 10:01
• @user11937 I answered the question you had asked, not another one. You can always use e.g. FullSimplify with appropriate assumptions. However since I can't see any clarification I'm curious what you really expect to get and awaiting more precise formulation of the problem. I really don't like ambiguous questions. One should beware of taking to much time of another users. Nonetheless I'm trying to help and provide the best answers I can. – Artes Jan 26 '14 at 16:28
FindInstance[Gamma[1/2 + n]/(-1 + n) < Gamma[1/2 + k]/(-1 + k) && k > 1 && n > 1, {n, k}]


gives

 {{n -> 42/5, k -> 82/5}}


To find more solutions:

Table[FindInstance[Gamma[1/2 + n]/(-1 + n) < Gamma[1/2 + k]/(-1 + k)
&& k > 1 && n > 1, {n, k}, RandomSeed -> i], {i, 0, 10}]


Another way to generate more solutions as Rasher commented below is to use quantity last argument. see example.

• Thank you. Can you tell me why Reduce does not work? – user11937 Jan 25 '14 at 9:31
• Or just FindInstance[ Gamma[1/2 + n]/(-1 + n) < Gamma[1/2 + k]/(-1 + k) && k > 1 && n > 1, {n, k}, 20], replace 20 with however many instances you want to try to find,,, – ciao Jan 25 '14 at 9:32
• @rasher yes, that is easier. I was looking at RandomSeed -> i as I never used it before. thanks, – Nasser Jan 25 '14 at 9:33
• @user11937 I can't answer why Reduce did not solve it. Other than what the message said cannot be solved by the methods available to Reduce – Nasser Jan 25 '14 at 9:36