Optimal. Leaf size=66 \[ -\frac{\sin (2 a) \text{CosIntegral}(2 b x)}{4 b}-\frac{\cos (2 a) \text{Si}(2 b x)}{4 b}+\frac{\log (x) \sin (a+b x) \cos (a+b x)}{2 b}-\frac{x}{2}+\frac{1}{2} x \log (x) \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.121475, antiderivative size = 66, normalized size of antiderivative = 1., number of steps used = 7, number of rules used = 8, integrand size = 11, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.727, Rules used = {2635, 8, 2554, 12, 3327, 3303, 3299, 3302} \[ -\frac{\sin (2 a) \text{CosIntegral}(2 b x)}{4 b}-\frac{\cos (2 a) \text{Si}(2 b x)}{4 b}+\frac{\log (x) \sin (a+b x) \cos (a+b x)}{2 b}-\frac{x}{2}+\frac{1}{2} x \log (x) \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 2635
Rule 8
Rule 2554
Rule 12
Rule 3327
Rule 3303
Rule 3299
Rule 3302
Rubi steps
\begin{align*} \int \cos ^2(a+b x) \log (x) \, dx &=\frac{1}{2} x \log (x)+\frac{\cos (a+b x) \log (x) \sin (a+b x)}{2 b}-\int \frac{1}{4} \left (2+\frac{\sin (2 (a+b x))}{b x}\right ) \, dx\\ &=\frac{1}{2} x \log (x)+\frac{\cos (a+b x) \log (x) \sin (a+b x)}{2 b}-\frac{1}{4} \int \left (2+\frac{\sin (2 (a+b x))}{b x}\right ) \, dx\\ &=-\frac{x}{2}+\frac{1}{2} x \log (x)+\frac{\cos (a+b x) \log (x) \sin (a+b x)}{2 b}-\frac{\int \frac{\sin (2 (a+b x))}{x} \, dx}{4 b}\\ &=-\frac{x}{2}+\frac{1}{2} x \log (x)+\frac{\cos (a+b x) \log (x) \sin (a+b x)}{2 b}-\frac{\int \frac{\sin (2 a+2 b x)}{x} \, dx}{4 b}\\ &=-\frac{x}{2}+\frac{1}{2} x \log (x)+\frac{\cos (a+b x) \log (x) \sin (a+b x)}{2 b}-\frac{\cos (2 a) \int \frac{\sin (2 b x)}{x} \, dx}{4 b}-\frac{\sin (2 a) \int \frac{\cos (2 b x)}{x} \, dx}{4 b}\\ &=-\frac{x}{2}+\frac{1}{2} x \log (x)-\frac{\text{Ci}(2 b x) \sin (2 a)}{4 b}+\frac{\cos (a+b x) \log (x) \sin (a+b x)}{2 b}-\frac{\cos (2 a) \text{Si}(2 b x)}{4 b}\\ \end{align*}
Mathematica [A] time = 0.0875414, size = 50, normalized size = 0.76 \[ -\frac{\sin (2 a) \text{CosIntegral}(2 b x)+\cos (2 a) \text{Si}(2 b x)-\log (x) \sin (2 (a+b x))+2 b x-2 b x \log (x)}{4 b} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [C] time = 0.079, size = 132, normalized size = 2. \begin{align*}{\frac{x\ln \left ( x \right ) }{2}}+{\frac{\ln \left ( x \right ) \sin \left ( 2\,bx+2\,a \right ) }{4\,b}}+{\frac{{{\rm e}^{-2\,ia}}\pi \,{\it csgn} \left ( bx \right ) }{8\,b}}-{\frac{{{\rm e}^{-2\,ia}}{\it Si} \left ( 2\,bx \right ) }{4\,b}}+{\frac{{\frac{i}{8}}{{\rm e}^{-2\,ia}}{\it Ei} \left ( 1,-2\,ibx \right ) }{b}}+{\frac{a\ln \left ( ibx \right ) }{2\,b}}-{\frac{x}{2}}-{\frac{a}{2\,b}}-{\frac{a\ln \left ( a+i \left ( ibx+ia \right ) \right ) }{2\,b}}-{\frac{{\frac{i}{8}}{{\rm e}^{2\,ia}}{\it Ei} \left ( 1,-2\,ibx \right ) }{b}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [C] time = 1.20405, size = 103, normalized size = 1.56 \begin{align*} \frac{{\left (2 \, b x + 2 \, a + \sin \left (2 \, b x + 2 \, a\right )\right )} \log \left (x\right )}{4 \, b} - \frac{4 \, b x +{\left (-i \,{\rm Ei}\left (2 i \, b x\right ) + i \,{\rm Ei}\left (-2 i \, b x\right )\right )} \cos \left (2 \, a\right ) + 4 \, a \log \left (x\right ) +{\left ({\rm Ei}\left (2 i \, b x\right ) +{\rm Ei}\left (-2 i \, b x\right )\right )} \sin \left (2 \, a\right )}{8 \, b} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A] time = 2.74896, size = 211, normalized size = 3.2 \begin{align*} \frac{4 \, b x \log \left (x\right ) + 4 \, \cos \left (b x + a\right ) \log \left (x\right ) \sin \left (b x + a\right ) - 4 \, b x -{\left (\operatorname{Ci}\left (2 \, b x\right ) + \operatorname{Ci}\left (-2 \, b x\right )\right )} \sin \left (2 \, a\right ) - 2 \, \cos \left (2 \, a\right ) \operatorname{Si}\left (2 \, b x\right )}{8 \, b} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F] time = 0., size = 0, normalized size = 0. \begin{align*} \int \log{\left (x \right )} \cos ^{2}{\left (a + b x \right )}\, dx \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [C] time = 1.38623, size = 165, normalized size = 2.5 \begin{align*} \frac{1}{4} \,{\left (2 \, x + \frac{\sin \left (2 \, b x + 2 \, a\right )}{b}\right )} \log \left (x\right ) - \frac{4 \, b x \tan \left (a\right )^{2} - \Im \left ( \operatorname{Ci}\left (2 \, b x\right ) \right ) \tan \left (a\right )^{2} + \Im \left ( \operatorname{Ci}\left (-2 \, b x\right ) \right ) \tan \left (a\right )^{2} - 2 \, \operatorname{Si}\left (2 \, b x\right ) \tan \left (a\right )^{2} + 4 \, b x + 2 \, \Re \left ( \operatorname{Ci}\left (2 \, b x\right ) \right ) \tan \left (a\right ) + 2 \, \Re \left ( \operatorname{Ci}\left (-2 \, b x\right ) \right ) \tan \left (a\right ) + \Im \left ( \operatorname{Ci}\left (2 \, b x\right ) \right ) - \Im \left ( \operatorname{Ci}\left (-2 \, b x\right ) \right ) + 2 \, \operatorname{Si}\left (2 \, b x\right )}{8 \,{\left (b \tan \left (a\right )^{2} + b\right )}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]