# What is $\int_{0}^{\infty}\frac{\cos^{n}x \sin x \ln x}{x} dx$?

Letting $\gamma$ denote the Euler-Mascheroni constant, evaluating $\int_{0}^{\infty}\frac{\cos^{n}x \sin x \ln x}{x} dx$ for $n \in \{ 1, 2, 3, 4 \}$, we have that:

\begin{align*} \int_{0}^{\infty}\frac{\cos^{1}x \sin x \ln x}{x} dx & = - \frac{1}{4} \pi \left( \gamma + \ln 2 \right), \\ \int_{0}^{\infty}\frac{\cos^{2}x \sin x \ln x}{x} dx & = - \frac{1}{8} \pi \left( 2 \gamma + \ln 3 \right), \\ \int_{0}^{\infty}\frac{\cos^{3}x \sin x \ln x}{x} dx & = - \frac{1}{16} \pi \left( 3 \gamma + \ln 16 \right), \\ \int_{0}^{\infty}\frac{\cos^{4}x \sin x \ln x}{x} dx & = - \frac{1}{32} \pi \left( 6 \gamma + \ln 135 \right). \end{align*}

More generally, it appears that $$\int_{0}^{\infty}\frac{\cos^{n}x \sin x \ln x}{x} dx = - \frac{1}{2^{n+1}} \pi \left( \binom{n}{ \left\lfloor \frac{n}{2} \right\rfloor } \gamma + \ln a_{n} \right)$$ for some integer sequence $$(a_{n} : n \in \mathbb{N}) = \left( 2, 3, 16, 135, 49152, 430565625, 1641562064176545792, \ldots \right)$$ which is not currently in the On-Line Encyclopedia of Integer Sequences.

Ideally, I would like to find a closed-form evaluation for this sequence. Alternatively, I would be interested in evaluating this sequence as a summation (e.g., a binomial sum), the terms of which have a closed-form evaluation.

I have tried to evaluate this sequence by evaluating indefinite integrals of the form $\int \frac{\cos^{n}x \sin x \ln x}{x} dx$, but this is difficult since Mathematica is not able to evaluate a general indefinite integral of this form, and Mathematica is only able to evaluate indefinite integrals of this form for specific values of $n \in \mathbb{N}$ using generalized hypergeometric functions and the incomplete gamma function.

A plan:

1. We may write $\cos^n(x)\sin(x)$ as a Fourier sine series, so the problem boils down to evaluating $\int_{0}^{+\infty}\sin(kx)\frac{\log x}{x}\,dx$;
2. The last integral is $f'(1)$, where $f(a)=\int_{0}^{+\infty}\frac{\sin(kx)}{x^a}\,dx=k^{a-1}\int_{0}^{+\infty}\frac{\sin x}{x^a}\,dx$;
3. The integral $I(a)=\int_{0}^{+\infty}\frac{\sin x}{x^a}\,dx$ can be easily evaluated through the Laplace transform, leading to: $$I(a) = \frac{1}{\Gamma(a)}\int_{0}^{+\infty}\frac{s^{a-1}}{s^2+1}\,ds = \frac{\pi}{2\,\Gamma(a)\sin\left(\frac{\pi a}{2}\right)};$$
4. By putting all together, we get:

$$\int_{0}^{+\infty}\sin(kx)\frac{\log x}{x}\,dx = \frac{\pi}{2}\left(\gamma+\log k\right).$$

Now we just need to compute the Fourier sine series of $\cos^n(x)\sin(x)$.

• How $\sum _{k=0}^n \sin (k x)=\cos ^n(x) \sin (x)$ ? – Mariusz Iwaniuk Aug 18 '18 at 22:10
• @MariuszIwaniuk: where did I write it? That is not true, for instance because the derivatives at the origin do not match. – Jack D'Aurizio Aug 18 '18 at 22:24
• Of course not,is not true. – Mariusz Iwaniuk Aug 19 '18 at 8:05