# Indefinite or definite Trigonometric Integral

$$\DeclareMathOperator{\sech}{sech} \int \frac{- (\arctan{ \frac{(a + \sqrt{a})x}{a-1}}) \sech^2(\pi x)(-2 \pi x + sinh(2 \pi x)) \tanh^2{\pi x}}{x^4}dx =????$$

Alternatively: $$\int_{-\infty}^{\infty} \frac{- (\arctan{ \frac{(a + \sqrt{a})x}{a-1}}) \sech^2(\pi x)(-2 \pi x + sinh(2 \pi x)) \tanh^2{\pi x}}{x^4}dx =????$$

For some $$\forall a \in \mathbb R_{\gt 1}$$

This integral came up in my research and I thought, "Oh I'll just run it through Wolfram Alpha". That did not work. But now I'm greatly confused as to why. I posted this question previously, but it was closed because individuals needed some additional information, which I've provided below.

I will settle for a calculation in the range of integration from $$-\infty$$ to $$\infty$$, but I really am asking about the anti-derivative.

I was going to let this go, but now I have to know why this is so difficult to calculate in a reasonable amount of time. Anyone know?

(Naive) Motiviation:

Typically (that is to say in my experience) these types of integrals of trigonometric products can be broken down using existing methods; We can usually reach some "solved point" with some additive and/or multiplicative constants notwithstanding. "What is so special about this particular function?" is another way to phrase what I'm asking.

Some background on preferences and pitfalls when dealing with trigonometric integrals:

EDIT: I changed the scalar argument of the the arctan function, so calculating the definite integral is not so obvious. Thanks to @KevinDietrich for the catch.

• If you write down an integral like this, chance are its indefinite integral is not expressed in finite terms involving previously-named functions. Aug 2 at 14:18
• @TymaGaidash I address the reason for closure (which apparently was done by malicious individuals and StackExchange reversed) in my question. Aug 2 at 15:27
• @GEdgar Please enlighten us! What makes you suspect something like this won't have an indefinite integral? My initial suspicions went the other way. Aug 2 at 15:28
• @KevinDietrich You are right, actually I need to edit the question so that the scalar in the $arctan$ function is variable $\in \mathbb R$. Aug 2 at 15:29
• After some strenuous calculation, the definite integral equals to$$I\left( t \right) =\left( \frac{248}{\pi ^2}\zeta \left( 5 \right) -\frac{28}{3}\zeta \left( 3 \right) \right) t+\left( \frac{28}{3\pi ^2}\zeta \left( 3 \right) -\frac{8}{3}\ln \left( 2 \right) -\frac{4}{3}\gamma \right) t^3-\frac{4}{3}t^3\psi ^{\left( 0 \right)}\left( \frac{1}{2}+\frac{1}{t} \right) -\frac{t^5}{3}\int_{-\infty}^{\infty}{\frac{\tanh ^2\left( x \right)}{t^2x^2+\pi ^2}}\mathrm{d}x+\frac{2}{3}t^5\pi ^2\int_{-\infty}^{\infty}{\frac{\tanh ^2\left( x \right)}{\left( t^2x^2+\pi ^2 \right) ^2}}\mathrm{d}x$$ Aug 5 at 9:11

To solve this integral, I shall establish few facts: \begin{align*} &I_1=\int_0^{\infty}{\frac{\tanh ^3\left( x \right)}{x^3}}\mathrm{d}x=\frac{186}{\pi ^4}\zeta \left( 5 \right) -\frac{7}{\pi ^2}\zeta \left( 3 \right) \\&I_2=\int_0^{\infty}{\frac{\tanh ^2\left( x \right)}{x^2}}\mathrm{d}x=\frac{14}{\pi ^2}\zeta \left( 3 \right) \\&I_3=\int_{-\infty}^{\infty}{\frac{\tanh \left( x \right)}{x\left( t^2x^2+\pi ^2 \right)}}\mathrm{d}x=\frac{2}{\pi ^2}\psi ^{\left( 0 \right)}\left( \frac{1}{2}+\frac{1}{t} \right) +\frac{4}{\pi ^2}\ln \left( 2 \right) +\frac{2\gamma}{\pi ^2} \\&I_4=\int_{-\infty}^{\infty}{\frac{\tanh ^2\left( x \right)}{t^2x^2+\pi ^2}}\mathrm{d}x=\frac{1}{t}-\frac{2}{t\pi ^2}\psi ^{\left( 1 \right)}\left( \frac{1}{2}+\frac{1}{t} \right) \\&I_5=\int_{-\infty}^{\infty}{\frac{\tanh ^2\left( x \right)}{\left( t^2x^2+\pi ^2 \right) ^2}}\mathrm{d}x=\frac{1}{\pi ^2}\left( \frac{1}{t^2\pi ^2}\psi ^{\left( 2 \right)}\left( \frac{1}{2}+\frac{1}{t} \right) -\frac{1}{t\pi ^2}\psi ^{\left( 1 \right)}\left( \frac{1}{2}+\frac{1}{t} \right) +\frac{1}{2t} \right) \end{align*} All results above works for $$t>1$$
Lastly, we have $$I_5=\frac{1}{\pi ^2}\left( I_4+\frac{t}{2}\frac{\mathrm{d}}{\mathrm{d}t}I_4 \right)$$. So everything justified.
Now the definite integral at hand (the indefinite one is too hard for me, it just looks undoable for me) \begin{align*} I\left( a \right) &=\int_{-\infty}^{\infty}{\frac{\sinh \left( 2\pi x \right) -2\pi x}{x^4}}\mathrm{arctan} \left( ax \right) \tanh ^2\left( \pi x \right) \mathrm{sech} ^2\left( \pi x \right) \mathrm{d}x \\& =2\int_{-\infty}^{\infty}{\frac{\sinh \left( \pi x \right) \cosh \left( \pi x \right) -\pi x}{x^4}}\mathrm{arctan} \left( ax \right) \tanh ^2\left( \pi x \right) \mathrm{sech} ^2\left( \pi x \right) \mathrm{d}x \\& =2\int_{-\infty}^{\infty}{\frac{\mathrm{arctan} \left( ax \right)}{x^4}\tanh ^3\left( \pi x \right)}\mathrm{d}x-2\pi \int_{-\infty}^{\infty}{\frac{\mathrm{arctan} \left( ax \right)}{x^3}}\tanh ^2\left( \pi x \right) \mathrm{sech} ^2\left( \pi x \right) \mathrm{d}x \\& \stackrel{\pi x\rightsquigarrow x}{=}2\pi ^3\left( \int_{-\infty}^{\infty}{\frac{\mathrm{arctan} \left( \frac{ax}{\pi} \right)}{x^4}\tanh ^3\left( x \right)}\mathrm{d}x-\int_{-\infty}^{\infty}{\frac{\mathrm{arctan} \left( \frac{ax}{\pi} \right)}{x^3}}\tanh ^2\left( x \right) \mathrm{sech} ^2\left( x \right) \mathrm{d}x \right) \\& \stackrel{\mathrm{IBP}}{=}\frac{2}{3}\pi ^4a\int_{-\infty}^{\infty}{\frac{\tanh ^3\left( x \right)}{x^3\left( a^2x^2+\pi ^2 \right)}}\mathrm{d}x \\& =\frac{4}{3}\pi ^2a\int_0^{\infty}{\frac{\tanh ^3\left( x \right)}{x^3}}\mathrm{d}x-\frac{2}{3}a^3\pi ^2\int_0^{\infty}{\frac{\tanh ^3\left( x \right)}{x\left( a^2x^2+\pi ^2 \right)}}\mathrm{d}x \\& =\frac{4}{3}\pi ^2a\int_0^{\infty}{\frac{\tanh ^3\left( x \right)}{x^3}}\mathrm{d}x-\frac{2}{3}a^3\pi ^2\int_{-\infty}^{\infty}{\frac{\tanh \left( x \right)}{x\left( a^2x^2+\pi ^2 \right)}}\mathrm{d}x+\frac{2}{3}a^3\pi ^2\int_{-\infty}^{\infty}{\frac{\tanh \left( x \right) \mathrm{sech} ^2\left( x \right)}{x\left( a^2x^2+\pi ^2 \right)}}\mathrm{d}x \\& \stackrel{\mathrm{IBP}}{=}\frac{4}{3}\pi ^2a\int_0^{\infty}{\frac{\tanh ^3\left( x \right)}{x^3}}\mathrm{d}x-\frac{2}{3}a^3\pi ^2\int_{-\infty}^{\infty}{\frac{\tanh \left( x \right)}{x\left( a^2x^2+\pi ^2 \right)}}\mathrm{d}x+\frac{a^3}{3}\int_{-\infty}^{\infty}{\frac{\tanh ^2\left( x \right)}{x^2}}\mathrm{d}x \\& \,\,\,\,\,\,\,\,-\frac{a^5}{3}\int_{-\infty}^{\infty}{\frac{\tanh ^2\left( x \right)}{a^2x^2+\pi ^2}}\mathrm{d}x+\frac{2}{3}a^5\pi ^2\int_{-\infty}^{\infty}{\frac{\tanh ^2\left( x \right)}{\left( a^2x^2+\pi ^2 \right) ^2}}\mathrm{d}x \\& =\frac{4}{3}\pi ^2a\int_0^{\infty}{\frac{\tanh ^3\left( x \right)}{x^3}}\mathrm{d}x+\frac{2}{3}a^3\int_0^{\infty}{\frac{\tanh ^2\left( x \right)}{x^2}}\mathrm{d}x-\frac{2}{3}a^3\pi ^2\int_{-\infty}^{\infty}{\frac{\tanh \left( x \right)}{x\left( a^2x^2+\pi ^2 \right)}}\mathrm{d}x \\& \,\,\,\,\,\,\,\,-\frac{a^5}{3}\int_{-\infty}^{\infty}{\frac{\tanh ^2\left( x \right)}{a^2x^2+\pi ^2}}\mathrm{d}x+\frac{2}{3}a^5\pi ^2\int_{-\infty}^{\infty}{\frac{\tanh ^2\left( x \right)}{\left( a^2x^2+\pi ^2 \right) ^2}}\mathrm{d}x \\& =\frac{4}{3}\pi ^2aI_1+\frac{2}{3}a^3I_2-\frac{2}{3}a^3\pi ^2I_3-\frac{a^5}{3}I_4+\frac{2}{3}a^5\pi ^2I_5 \end{align*} Pulgging in the value, we have $$I\left( a \right) =\left( \frac{248}{\pi ^2}\zeta \left( 5 \right) -\frac{28}{3}\zeta \left( 3 \right) \right) a+\left( \frac{28}{3\pi ^2}\zeta \left( 3 \right) -\frac{8}{3}\ln \left( 2 \right) -\frac{4}{3}\gamma -\frac{4}{3}\psi ^{\left( 0 \right)}\left( \frac{1}{2}+\frac{1}{a} \right) +\frac{2}{3\pi ^2}\psi ^{\left( 2 \right)}\left( \frac{1}{2}+\frac{1}{a} \right) \right) a^3$$ To put it in a form verbatim to your question $$-\int_{-\infty}^{\infty}{\frac{\sinh \left( 2\pi x \right) -2\pi x}{x^4}}\mathrm{arctan} \left( \frac{a+\sqrt{a}}{a-1}x \right) \tanh ^2\left( \pi x \right) \mathrm{sech} ^2\left( \pi x \right) \mathrm{d}x \\ =-\left( \frac{248}{\pi ^2}\zeta \left( 5 \right) -\frac{28}{3}\zeta \left( 3 \right) \right) \frac{a+\sqrt{a}}{a-1}-\left( \frac{28}{3\pi ^2}\zeta \left( 3 \right) -\frac{8}{3}\ln \left( 2 \right) -\frac{4}{3}\gamma -\frac{4}{3}\psi ^{\left( 0 \right)}\left( \frac{1}{2}+\frac{a-1}{a+\sqrt{a}} \right) +\frac{2}{3\pi ^2}\psi ^{\left( 2 \right)}\left( \frac{1}{2}+\frac{a-1}{a+\sqrt{a}} \right) \right) \left( \frac{a+\sqrt{a}}{a-1} \right) ^3$$ The numerical value check
{"found_math": true, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 1, "mathjax_display_tex": 1, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 11, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0, "url": "https://math.stackexchange.com/questions/4746403/indefinite-or-definite-trigonometric-integral", "fetch_time": 1701759213000000000, "content_mime_type": "text/html", "warc_filename": "crawl-data/CC-MAIN-2023-50/segments/1700679100545.7/warc/CC-MAIN-20231205041842-20231205071842-00658.warc.gz", "warc_record_offset": 445489758, "warc_record_length": 39585, "token_count": 3613, "char_count": 8296, "score": 3.53125, "int_score": 4, "crawl": "CC-MAIN-2023-50", "snapshot_type": "longest", "language": "en", "language_score": 0.9106073975563049, "file_path": "/sailhome/yjruan/project/latent-lm/data/processed/finemath-4plus/finemath-4plus/train-00041-of-00064.parquet"}