# Mathematical reasoning to get closed-forms or nice definite integrals from these outputs of Wolfram Alpha

I was thinking about the shape of integrals related with $\zeta(3)$ and Catalan's constant, I am saying those in section 3.1 of this Wikipedia. I was thinking in moments of higher order $x^k$ in the integrand, and since I believe that these integrals will be well known, after I was trying to calculate with Wolfram Alpha these integrals that are different, I am saying this $$\int e^{-i x}\log\left(\sec(x)+\tan(x)\right)dx\tag{1}$$ and

Codes. You can see the different closed-forms that Wolfram Alpha provide us as outputs for these indefinite integrals, involving logarithms and complex exponentials, hypergeometric functions and polylogarithms, and also trigonometric functions:

integrate xe^(-ix) log(sec(x)+tan(x))dx $\tag{2}$ integrate e^(-i s x) log(sec(x)+tan(x))dx$\tag{3}$ integrate e^(-i s x) log(1+tan(x))dx$\tag{4}$ integrate e^(-i s x) log(1+sec(x))dx$\tag{5}$

From the online calculator of Wolfram Alpha, and from my computer with standard computation time, I only obtain as output a definite integral, in example $(1)$, for which I believe that it's easy to prove $$\Re\left(\int_0^{\pi} e^{-i x}\log\left(\sec(x)+\tan(x)\right)dx\right)=\pi.$$

Question. Imagine that from these kind of integrals $(1)-(5)$ you need to create a nice closed-form, you can take also the real or imaginary part. What is the algebraic/analytic tricks that do you make to explore and exploit your possiblilities from Wolfram Alpha's outputs? I am saying that we need to do some evaluations of the integration limits, you can take these following your reasoning, but also we need to have knowledges about the functions involved in the outputs. What is the output $(1)-(5)$ that do you choose? What are your manipulations and final statement? Many thanks.

• My goal is learn if there are some strategies, but also refresh more my complex analysis and integration methods, thus are welcome also your mathematical details, but my goal is read if it is possible/feasible your explanation of your mathematical strategy, that is the why of your choice. Thanks. – user243301 Feb 10 '17 at 13:22
• A reasonable thing to do is to apply integration by parts to turn the logarithm into something more manageable. Then one may exploit integral representations for the $\zeta$ function and usual tricks. – Jack D'Aurizio Feb 10 '17 at 13:31
• Well it is interesting @JackD'Aurizio Many thanks for your attention, feel free to explain with details your strategy in your example as an answer. – user243301 Feb 10 '17 at 13:34
• I would prefer some explicit integration bounds in $(1),\ldots,(5)$ before start typing my answer. The Fourier series of $\log\sin$ and $\log\cos$ are also deeply involved, see here: math.stackexchange.com/questions/292468/… – Jack D'Aurizio Feb 10 '17 at 13:44
• Sometimes, the right substitution makes the problem much more manageable. Sometimes the key is to spot a nice series expansion. IMHO, you may wish to read the top voted stuff from the integration tag: math.stackexchange.com/questions/tagged/… – Simply Beautiful Art Feb 10 '17 at 14:30

Partial Answer: My suggested first two steps for your strategy since I can't comment.

Step 1. Look for Mathematical/Trignometric Identities and investigate other work done using those.

In the case of this question it is well worth exploring the available trigonometric identities before looking at substitutions. e.g.

$$\log\left(\sec(x)+\tan(x)\right)= \frac{1}{2} \log\left(\frac{1+\sin(x)}{1-\sin(x)}\right)= \log \tan\left( \frac{\pi}{4}+\frac{x}{2}\right)$$

which is very closely related to $$\log\left(\csc(x)-\cot(x)\right)=-\log\left(\csc(x)+\cot(x)\right)= \frac{1}{2} \log\left(\frac{1-\cos(x)}{1+\cos(x)}\right)= \log \tan\left(\frac{x}{2}\right)$$

For work on integrating $f(x)\log\tan(x)$ that may help you formulate your strategy in regards to integrating $f(x)\log \tan\left( \frac{\pi}{4}+\frac{x}{2}\right)$ see for example https://arxiv.org/abs/1611.01274

Step 2. Search for Substitutions.

For example the standard integral for the Dirichlet Beta Function can be written in substituted form using $\log \tan (x)$

$$\Gamma(n)\beta(n)=\int_0^\infty \frac{u^{n-1}}{e^u+e^{-u}}\,du= \frac{1}{2}\int_{\pi/4}^{\pi/2} \left( \log \tan x\right)^{n}\,dx$$