# Numerical comparison of two integrals and a function :

Consider the following integral:

$$S(q)=\int_{x=2}^q\sin^2\left(\frac{π\Gamma(x)}{2x}\right)dx$$

And consider the functions :

$$R(q)=\frac{q}{\log(q)}$$

$$T(q)=\int_2^q\frac{1}{\log(x)}dx$$

I want to compare them with each other ( at least numerically for large interval of value )

If graph for very large intervals (upto atleast $$10^4$$) possible please add (please add three graphs in one axis system , so that I can compare)

(Does numerics suggest $$S(q) \sim R(q)$$ or $$T(q)$$? )

See ; Related : https://math.stackexchange.com/q/3570663/702232

Note : Can't calculate the first integral on Mathematica for large values

• Plotting the first integrand shows it's highly oscillatory. Other than throwing (a lot) more precision at it and/or using LevinRule, I can't think of a straight-forward way of efficiently computing it. Maybe someone else can think of a way, but I think your best bet might be to figure out analytically how to make the integrand nicer. – Sami May 7 '20 at 18:06
• Hopefully you are aware that LogIntegral[] is built-in? Additionally: perhaps you could explore using NDSolve[] for your $S(q)$; e.g. sol = NDSolveValue[{s'[q] == Sin[Exp[Log[Pi/2] + LogGamma[q] - Log[q]]]^2, s == 0}, s, {q, 2, 10}]. – J. M.'s ennui May 7 '20 at 18:07
• Running NIntegrate[Sin[(π Gamma[x])/(2 x)]^2, {x, 2, 10^4}, Method -> "LevinRule", MinRecursion -> 20, MaxRecursion -> 50] gives out an answer without warnings, but I can't really judge its validity. – Sami May 7 '20 at 18:14
• Can I get a graph of them three in one axis system for q at least 10^4? You can give it as an answer to me . I just need the rough inter- comparison. – bambi May 7 '20 at 18:26
• Not unless you can properly compute the function values up to $q=10^4$ – Sami May 7 '20 at 18:29