Integrating :$\int_{0}^{1} \frac{x^{b}-x^{a}}{\log(x)}\sin(\log(x))dx$

Your integral consists of two similar part and we only do one of them, namely: \begin{align} \int_0^1 \frac{x^a}{\ln(x)}\sin(\ln(x)) dx \end{align} Set $x=e^{-u}$ so that $dx = -e^{-u}du$, and we get: \begin{align} \int^\infty_0 \frac{e^{-(a+1)u}}{u}\sin(u)du \end{align} Now consider: \begin{align} I(z) = \int^\infty_0 \frac{e^{-zu}}{u}\sin(u)du \end{align} This is well defined as a real number for $z>0$, otherwise the integral won't converge. We also have: \begin{align} I'(z) = -\int^\infty_0 e^{-zu}\sin(u) du \end{align} I assume you can evaluate that, two times partial integration and you get: \begin{align} I'(z) = -\frac{1}{z^2+1} \end{align} Integrating this gives us $I(z)$ namely: \begin{align} I(z) = -\arctan(z) + C \end{align} Now we would actually determine $C$. But that is not needed, since our original integral is a diference of $I(b+1)$ and $I(a+1)$ so that $C$ will be canceled. So: \begin{align} \int_0^1 \frac{x^b-x^a}{\ln(x)}\sin(\ln(x)) dx =I(b+1) - I(a+1) = \arctan(a+1) - \arctan(b+1) \end{align} And we have (indirectly) seen that is only convergent if $a>-1, b>-1$.

Edit: If you really want to determine the value of $C$: Note that we know the following: \begin{align} \lim_{z\to \infty} I(z) = -\frac{\pi}{2}+C \end{align} And we also know: \begin{align} \lim_{z\to \infty} I(z) = \lim_{z\to \infty} \int^\infty_0 \frac{e^{-zu}} {u}\sin(u)du \stackrel{\text{DCT}}{=} \int^\infty_0 \lim_{z\to \infty} \frac{e^{-zu}} {u}\sin(u)du = 0 \end{align} Where DCT means Dominated Convergence Theorem. Now we can solve for $C$ and finally we get: \begin{align} I(z) = -\arctan(z) +\frac{\pi}{2} \end{align}


It suffices to evaluate $$\int_0^1 \frac{x^a}{\ln x}\sin(\ln x) dx = \int_0^\infty \frac{e^{-(a+1)x}}{x}\sin x dx = \int_0^\infty {e^{-(a+1)x}}\sin x d(\ln x)$$

Integration by parts shows it suffices to evaluate integrals like $$\int_0^\infty {e^{-(a+1-i)x}}\ln x dx$$

Using the following formula, valid for $\Re(z)> 0$, enables you to finish the problem: $$\int_0^\infty e^{-zx}\ln x dx = -\frac{\gamma+\ln z}{z}$$ where $\gamma$ is this constant.


Observes that: $$\color{red}{\frac{d}{dt}\left(\frac{x^t}{\ln x}\right) =x^t}$$ we have,

\begin{align}\int_{0}^{1} \frac{x^{b}-x^{a}}{\log(x)}\sin(\log(x))dx &= \int_{0}^{1} \left[\frac{x^{t}}{\log(x)}\right]_a^b\sin(\log(x))dx \\ &=\int_a^b\int_{0}^{1} x^t\sin(\log(x))dx dt\\ & \overset{\color{red}{u =-\ln x}}{=}- \int_a^b\int_{0}^{\infty} e^{-ut-u}\sin(u)du dt\\ &= -\int_a^b Im\left(\int_{0}^{\infty} e^{(-t-1+i)u}du \right)dt\\ &=-\int_a^b Im\left[\frac{1}{-t-1+i}e^{(-t-1+i)u} \right]_0^\infty dt \\ &=- \int_a^b \frac{dt}{(t+1)^2+1} \\ &=\color{blue}{\arctan (a+1)-\arctan (b+1)}\end{align}