Optimal. Leaf size=218 \[ \frac{a^2 \text{CosIntegral}(2 a+2 b x)}{2 b^3}-\frac{a^2 \log (a+b x)}{2 b^3}-\frac{\text{CosIntegral}(2 a+2 b x)}{b^3}+\frac{a \text{Si}(2 a+2 b x)}{b^3}-\frac{2 \text{Si}(a+b x) \sin (a+b x)}{b^3}+\frac{2 x \text{Si}(a+b x) \cos (a+b x)}{b^2}+\frac{a x}{2 b^2}+\frac{\log (a+b x)}{b^3}-\frac{\sin ^2(a+b x)}{4 b^3}+\frac{\cos (2 a+2 b x)}{2 b^3}-\frac{a \sin (a+b x) \cos (a+b x)}{2 b^3}+\frac{x \sin (a+b x) \cos (a+b x)}{2 b^2}+\frac{x^2 \text{Si}(a+b x) \sin (a+b x)}{b}-\frac{x^2}{4 b} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.659721, antiderivative size = 218, normalized size of antiderivative = 1., number of steps used = 21, number of rules used = 14, integrand size = 16, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.875, Rules used = {6519, 6742, 2635, 8, 3310, 30, 3312, 3302, 6513, 4573, 6741, 2638, 3299, 6517} \[ \frac{a^2 \text{CosIntegral}(2 a+2 b x)}{2 b^3}-\frac{a^2 \log (a+b x)}{2 b^3}-\frac{\text{CosIntegral}(2 a+2 b x)}{b^3}+\frac{a \text{Si}(2 a+2 b x)}{b^3}-\frac{2 \text{Si}(a+b x) \sin (a+b x)}{b^3}+\frac{2 x \text{Si}(a+b x) \cos (a+b x)}{b^2}+\frac{a x}{2 b^2}+\frac{\log (a+b x)}{b^3}-\frac{\sin ^2(a+b x)}{4 b^3}+\frac{\cos (2 a+2 b x)}{2 b^3}-\frac{a \sin (a+b x) \cos (a+b x)}{2 b^3}+\frac{x \sin (a+b x) \cos (a+b x)}{2 b^2}+\frac{x^2 \text{Si}(a+b x) \sin (a+b x)}{b}-\frac{x^2}{4 b} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 6519
Rule 6742
Rule 2635
Rule 8
Rule 3310
Rule 30
Rule 3312
Rule 3302
Rule 6513
Rule 4573
Rule 6741
Rule 2638
Rule 3299
Rule 6517
Rubi steps
\begin{align*} \int x^2 \cos (a+b x) \text{Si}(a+b x) \, dx &=\frac{x^2 \sin (a+b x) \text{Si}(a+b x)}{b}-\frac{2 \int x \sin (a+b x) \text{Si}(a+b x) \, dx}{b}-\int \frac{x^2 \sin ^2(a+b x)}{a+b x} \, dx\\ &=\frac{2 x \cos (a+b x) \text{Si}(a+b x)}{b^2}+\frac{x^2 \sin (a+b x) \text{Si}(a+b x)}{b}-\frac{2 \int \cos (a+b x) \text{Si}(a+b x) \, dx}{b^2}-\frac{2 \int \frac{x \cos (a+b x) \sin (a+b x)}{a+b x} \, dx}{b}-\int \left (-\frac{a \sin ^2(a+b x)}{b^2}+\frac{x \sin ^2(a+b x)}{b}+\frac{a^2 \sin ^2(a+b x)}{b^2 (a+b x)}\right ) \, dx\\ &=\frac{2 x \cos (a+b x) \text{Si}(a+b x)}{b^2}-\frac{2 \sin (a+b x) \text{Si}(a+b x)}{b^3}+\frac{x^2 \sin (a+b x) \text{Si}(a+b x)}{b}+\frac{2 \int \frac{\sin ^2(a+b x)}{a+b x} \, dx}{b^2}+\frac{a \int \sin ^2(a+b x) \, dx}{b^2}-\frac{a^2 \int \frac{\sin ^2(a+b x)}{a+b x} \, dx}{b^2}-\frac{\int x \sin ^2(a+b x) \, dx}{b}-\frac{\int \frac{x \sin (2 (a+b x))}{a+b x} \, dx}{b}\\ &=-\frac{a \cos (a+b x) \sin (a+b x)}{2 b^3}+\frac{x \cos (a+b x) \sin (a+b x)}{2 b^2}-\frac{\sin ^2(a+b x)}{4 b^3}+\frac{2 x \cos (a+b x) \text{Si}(a+b x)}{b^2}-\frac{2 \sin (a+b x) \text{Si}(a+b x)}{b^3}+\frac{x^2 \sin (a+b x) \text{Si}(a+b x)}{b}+\frac{2 \int \left (\frac{1}{2 (a+b x)}-\frac{\cos (2 a+2 b x)}{2 (a+b x)}\right ) \, dx}{b^2}+\frac{a \int 1 \, dx}{2 b^2}-\frac{a^2 \int \left (\frac{1}{2 (a+b x)}-\frac{\cos (2 a+2 b x)}{2 (a+b x)}\right ) \, dx}{b^2}-\frac{\int x \, dx}{2 b}-\frac{\int \frac{x \sin (2 a+2 b x)}{a+b x} \, dx}{b}\\ &=\frac{a x}{2 b^2}-\frac{x^2}{4 b}+\frac{\log (a+b x)}{b^3}-\frac{a^2 \log (a+b x)}{2 b^3}-\frac{a \cos (a+b x) \sin (a+b x)}{2 b^3}+\frac{x \cos (a+b x) \sin (a+b x)}{2 b^2}-\frac{\sin ^2(a+b x)}{4 b^3}+\frac{2 x \cos (a+b x) \text{Si}(a+b x)}{b^2}-\frac{2 \sin (a+b x) \text{Si}(a+b x)}{b^3}+\frac{x^2 \sin (a+b x) \text{Si}(a+b x)}{b}-\frac{\int \frac{\cos (2 a+2 b x)}{a+b x} \, dx}{b^2}+\frac{a^2 \int \frac{\cos (2 a+2 b x)}{a+b x} \, dx}{2 b^2}-\frac{\int \left (\frac{\sin (2 a+2 b x)}{b}+\frac{a \sin (2 a+2 b x)}{b (-a-b x)}\right ) \, dx}{b}\\ &=\frac{a x}{2 b^2}-\frac{x^2}{4 b}-\frac{\text{Ci}(2 a+2 b x)}{b^3}+\frac{a^2 \text{Ci}(2 a+2 b x)}{2 b^3}+\frac{\log (a+b x)}{b^3}-\frac{a^2 \log (a+b x)}{2 b^3}-\frac{a \cos (a+b x) \sin (a+b x)}{2 b^3}+\frac{x \cos (a+b x) \sin (a+b x)}{2 b^2}-\frac{\sin ^2(a+b x)}{4 b^3}+\frac{2 x \cos (a+b x) \text{Si}(a+b x)}{b^2}-\frac{2 \sin (a+b x) \text{Si}(a+b x)}{b^3}+\frac{x^2 \sin (a+b x) \text{Si}(a+b x)}{b}-\frac{\int \sin (2 a+2 b x) \, dx}{b^2}-\frac{a \int \frac{\sin (2 a+2 b x)}{-a-b x} \, dx}{b^2}\\ &=\frac{a x}{2 b^2}-\frac{x^2}{4 b}+\frac{\cos (2 a+2 b x)}{2 b^3}-\frac{\text{Ci}(2 a+2 b x)}{b^3}+\frac{a^2 \text{Ci}(2 a+2 b x)}{2 b^3}+\frac{\log (a+b x)}{b^3}-\frac{a^2 \log (a+b x)}{2 b^3}-\frac{a \cos (a+b x) \sin (a+b x)}{2 b^3}+\frac{x \cos (a+b x) \sin (a+b x)}{2 b^2}-\frac{\sin ^2(a+b x)}{4 b^3}+\frac{2 x \cos (a+b x) \text{Si}(a+b x)}{b^2}-\frac{2 \sin (a+b x) \text{Si}(a+b x)}{b^3}+\frac{x^2 \sin (a+b x) \text{Si}(a+b x)}{b}+\frac{a \text{Si}(2 a+2 b x)}{b^3}\\ \end{align*}
Mathematica [A] time = 0.343218, size = 134, normalized size = 0.61 \[ \frac{4 \left (a^2-2\right ) \text{CosIntegral}(2 (a+b x))-4 a^2 \log (a+b x)+8 \text{Si}(a+b x) \left (\left (b^2 x^2-2\right ) \sin (a+b x)+2 b x \cos (a+b x)\right )+8 a \text{Si}(2 (a+b x))+4 a b x+8 \log (a+b x)-2 a \sin (2 (a+b x))+2 b x \sin (2 (a+b x))+5 \cos (2 (a+b x))-2 b^2 x^2}{8 b^3} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A] time = 0.068, size = 209, normalized size = 1. \begin{align*}{\frac{{x}^{2}{\it Si} \left ( bx+a \right ) \sin \left ( bx+a \right ) }{b}}+2\,{\frac{x\cos \left ( bx+a \right ){\it Si} \left ( bx+a \right ) }{{b}^{2}}}-2\,{\frac{{\it Si} \left ( bx+a \right ) \sin \left ( bx+a \right ) }{{b}^{3}}}+{\frac{x\cos \left ( bx+a \right ) \sin \left ( bx+a \right ) }{2\,{b}^{2}}}-{\frac{a\cos \left ( bx+a \right ) \sin \left ( bx+a \right ) }{2\,{b}^{3}}}-{\frac{{x}^{2}}{4\,b}}+{\frac{ax}{2\,{b}^{2}}}+{\frac{3\,{a}^{2}}{4\,{b}^{3}}}-{\frac{ \left ( \sin \left ( bx+a \right ) \right ) ^{2}}{4\,{b}^{3}}}-{\frac{{a}^{2}\ln \left ( bx+a \right ) }{2\,{b}^{3}}}+{\frac{{a}^{2}{\it Ci} \left ( 2\,bx+2\,a \right ) }{2\,{b}^{3}}}+{\frac{ \left ( \cos \left ( bx+a \right ) \right ) ^{2}}{{b}^{3}}}+{\frac{a{\it Si} \left ( 2\,bx+2\,a \right ) }{{b}^{3}}}+{\frac{\ln \left ( bx+a \right ) }{{b}^{3}}}-{\frac{{\it Ci} \left ( 2\,bx+2\,a \right ) }{{b}^{3}}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F] time = 0., size = 0, normalized size = 0. \begin{align*} \int x^{2}{\rm Si}\left (b x + a\right ) \cos \left (b x + a\right )\,{d x} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [F] time = 0., size = 0, normalized size = 0. \begin{align*}{\rm integral}\left (x^{2} \cos \left (b x + a\right ) \operatorname{Si}\left (b x + a\right ), x\right ) \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F(-1)] time = 0., size = 0, normalized size = 0. \begin{align*} \text{Timed out} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [C] time = 1.21811, size = 231, normalized size = 1.06 \begin{align*}{\left (\frac{2 \, x \cos \left (b x + a\right )}{b^{2}} + \frac{{\left (b^{2} x^{2} - 2\right )} \sin \left (b x + a\right )}{b^{3}}\right )} \operatorname{Si}\left (b x + a\right ) - \frac{b^{2} x^{2} - 2 \, a b x + 2 \, a^{2} \log \left ({\left | b x + a \right |}\right ) - a^{2} \Re \left ( \operatorname{Ci}\left (2 \, b x + 2 \, a\right ) \right ) - a^{2} \Re \left ( \operatorname{Ci}\left (-2 \, b x - 2 \, a\right ) \right ) - 2 \, a \Im \left ( \operatorname{Ci}\left (2 \, b x + 2 \, a\right ) \right ) + 2 \, a \Im \left ( \operatorname{Ci}\left (-2 \, b x - 2 \, a\right ) \right ) - 4 \, a \operatorname{Si}\left (2 \, b x + 2 \, a\right ) - 4 \, \log \left ({\left | b x + a \right |}\right ) + 2 \, \Re \left ( \operatorname{Ci}\left (2 \, b x + 2 \, a\right ) \right ) + 2 \, \Re \left ( \operatorname{Ci}\left (-2 \, b x - 2 \, a\right ) \right )}{4 \, b^{3}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]