Optimal. Leaf size=187 \[ -\frac {x}{b^2}+\frac {a \cos (2 a+2 b x)}{4 b^3}-\frac {x \cos (2 a+2 b x)}{4 b^2}-\frac {a \text {CosIntegral}(2 a+2 b x)}{b^3}+\frac {a \log (a+b x)}{b^3}+\frac {\cos (a+b x) \sin (a+b x)}{b^3}+\frac {\sin (2 a+2 b x)}{8 b^3}+\frac {2 \cos (a+b x) \text {Si}(a+b x)}{b^3}-\frac {x^2 \cos (a+b x) \text {Si}(a+b x)}{b}+\frac {2 x \sin (a+b x) \text {Si}(a+b x)}{b^2}-\frac {\text {Si}(2 a+2 b x)}{b^3}+\frac {a^2 \text {Si}(2 a+2 b x)}{2 b^3} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.58, antiderivative size = 187, normalized size of antiderivative = 1.00, number of steps
used = 21, number of rules used = 16, integrand size = 16, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 1.000, Rules used = {6648,
4669, 6873, 6874, 2718, 3377, 2717, 3380, 6654, 2715, 8, 3393, 3383, 6646, 4491, 12}
\begin {gather*} \frac {a^2 \text {Si}(2 a+2 b x)}{2 b^3}-\frac {a \text {CosIntegral}(2 a+2 b x)}{b^3}-\frac {\text {Si}(2 a+2 b x)}{b^3}+\frac {2 \text {Si}(a+b x) \cos (a+b x)}{b^3}+\frac {a \log (a+b x)}{b^3}+\frac {\sin (2 a+2 b x)}{8 b^3}+\frac {a \cos (2 a+2 b x)}{4 b^3}+\frac {\sin (a+b x) \cos (a+b x)}{b^3}+\frac {2 x \text {Si}(a+b x) \sin (a+b x)}{b^2}-\frac {x \cos (2 a+2 b x)}{4 b^2}-\frac {x^2 \text {Si}(a+b x) \cos (a+b x)}{b}-\frac {x}{b^2} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 8
Rule 12
Rule 2715
Rule 2717
Rule 2718
Rule 3377
Rule 3380
Rule 3383
Rule 3393
Rule 4491
Rule 4669
Rule 6646
Rule 6648
Rule 6654
Rule 6873
Rule 6874
Rubi steps
\begin {align*} \int x^2 \sin (a+b x) \text {Si}(a+b x) \, dx &=-\frac {x^2 \cos (a+b x) \text {Si}(a+b x)}{b}+\frac {2 \int x \cos (a+b x) \text {Si}(a+b x) \, dx}{b}+\int \frac {x^2 \cos (a+b x) \sin (a+b x)}{a+b x} \, dx\\ &=-\frac {x^2 \cos (a+b x) \text {Si}(a+b x)}{b}+\frac {2 x \sin (a+b x) \text {Si}(a+b x)}{b^2}+\frac {1}{2} \int \frac {x^2 \sin (2 (a+b x))}{a+b x} \, dx-\frac {2 \int \sin (a+b x) \text {Si}(a+b x) \, dx}{b^2}-\frac {2 \int \frac {x \sin ^2(a+b x)}{a+b x} \, dx}{b}\\ &=\frac {2 \cos (a+b x) \text {Si}(a+b x)}{b^3}-\frac {x^2 \cos (a+b x) \text {Si}(a+b x)}{b}+\frac {2 x \sin (a+b x) \text {Si}(a+b x)}{b^2}+\frac {1}{2} \int \frac {x^2 \sin (2 a+2 b x)}{a+b x} \, dx-\frac {2 \int \frac {\cos (a+b x) \sin (a+b x)}{a+b x} \, dx}{b^2}-\frac {2 \int \left (\frac {\sin ^2(a+b x)}{b}-\frac {a \sin ^2(a+b x)}{b (a+b x)}\right ) \, dx}{b}\\ &=\frac {2 \cos (a+b x) \text {Si}(a+b x)}{b^3}-\frac {x^2 \cos (a+b x) \text {Si}(a+b x)}{b}+\frac {2 x \sin (a+b x) \text {Si}(a+b x)}{b^2}+\frac {1}{2} \int \left (-\frac {a \sin (2 a+2 b x)}{b^2}+\frac {x \sin (2 a+2 b x)}{b}+\frac {a^2 \sin (2 a+2 b x)}{b^2 (a+b x)}\right ) \, dx-\frac {2 \int \sin ^2(a+b x) \, dx}{b^2}-\frac {2 \int \frac {\sin (2 a+2 b x)}{2 (a+b x)} \, dx}{b^2}+\frac {(2 a) \int \frac {\sin ^2(a+b x)}{a+b x} \, dx}{b^2}\\ &=\frac {\cos (a+b x) \sin (a+b x)}{b^3}+\frac {2 \cos (a+b x) \text {Si}(a+b x)}{b^3}-\frac {x^2 \cos (a+b x) \text {Si}(a+b x)}{b}+\frac {2 x \sin (a+b x) \text {Si}(a+b x)}{b^2}-\frac {\int 1 \, dx}{b^2}-\frac {\int \frac {\sin (2 a+2 b x)}{a+b x} \, dx}{b^2}-\frac {a \int \sin (2 a+2 b x) \, dx}{2 b^2}+\frac {(2 a) \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^2 \int \frac {\sin (2 a+2 b x)}{a+b x} \, dx}{2 b^2}+\frac {\int x \sin (2 a+2 b x) \, dx}{2 b}\\ &=-\frac {x}{b^2}+\frac {a \cos (2 a+2 b x)}{4 b^3}-\frac {x \cos (2 a+2 b x)}{4 b^2}+\frac {a \log (a+b x)}{b^3}+\frac {\cos (a+b x) \sin (a+b x)}{b^3}+\frac {2 \cos (a+b x) \text {Si}(a+b x)}{b^3}-\frac {x^2 \cos (a+b x) \text {Si}(a+b x)}{b}+\frac {2 x \sin (a+b x) \text {Si}(a+b x)}{b^2}-\frac {\text {Si}(2 a+2 b x)}{b^3}+\frac {a^2 \text {Si}(2 a+2 b x)}{2 b^3}+\frac {\int \cos (2 a+2 b x) \, dx}{4 b^2}-\frac {a \int \frac {\cos (2 a+2 b x)}{a+b x} \, dx}{b^2}\\ &=-\frac {x}{b^2}+\frac {a \cos (2 a+2 b x)}{4 b^3}-\frac {x \cos (2 a+2 b x)}{4 b^2}-\frac {a \text {Ci}(2 a+2 b x)}{b^3}+\frac {a \log (a+b x)}{b^3}+\frac {\cos (a+b x) \sin (a+b x)}{b^3}+\frac {\sin (2 a+2 b x)}{8 b^3}+\frac {2 \cos (a+b x) \text {Si}(a+b x)}{b^3}-\frac {x^2 \cos (a+b x) \text {Si}(a+b x)}{b}+\frac {2 x \sin (a+b x) \text {Si}(a+b x)}{b^2}-\frac {\text {Si}(2 a+2 b x)}{b^3}+\frac {a^2 \text {Si}(2 a+2 b x)}{2 b^3}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.23, size = 123, normalized size = 0.66 \begin {gather*} \frac {-8 b x+2 a \cos (2 (a+b x))-2 b x \cos (2 (a+b x))-8 a \text {CosIntegral}(2 (a+b x))+8 a \log (a+b x)+5 \sin (2 (a+b x))-8 \left (\left (-2+b^2 x^2\right ) \cos (a+b x)-2 b x \sin (a+b x)\right ) \text {Si}(a+b x)-8 \text {Si}(2 (a+b x))+4 a^2 \text {Si}(2 (a+b x))}{8 b^3} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.56, size = 175, normalized size = 0.94
method | result | size |
derivativedivides | \(\frac {\sinIntegral \left (b x +a \right ) \left (-a^{2} \cos \left (b x +a \right )-2 a \left (\sin \left (b x +a \right )-\left (b x +a \right ) \cos \left (b x +a \right )\right )-\left (b x +a \right )^{2} \cos \left (b x +a \right )+2 \cos \left (b x +a \right )+2 \left (b x +a \right ) \sin \left (b x +a \right )\right )+\frac {a^{2} \sinIntegral \left (2 b x +2 a \right )}{2}+a \left (\cos ^{2}\left (b x +a \right )\right )-\frac {\left (b x +a \right ) \left (\cos ^{2}\left (b x +a \right )\right )}{2}+\frac {5 \sin \left (b x +a \right ) \cos \left (b x +a \right )}{4}-\frac {3 b x}{4}-\frac {3 a}{4}+a \ln \left (b x +a \right )-a \cosineIntegral \left (2 b x +2 a \right )-\sinIntegral \left (2 b x +2 a \right )}{b^{3}}\) | \(175\) |
default | \(\frac {\sinIntegral \left (b x +a \right ) \left (-a^{2} \cos \left (b x +a \right )-2 a \left (\sin \left (b x +a \right )-\left (b x +a \right ) \cos \left (b x +a \right )\right )-\left (b x +a \right )^{2} \cos \left (b x +a \right )+2 \cos \left (b x +a \right )+2 \left (b x +a \right ) \sin \left (b x +a \right )\right )+\frac {a^{2} \sinIntegral \left (2 b x +2 a \right )}{2}+a \left (\cos ^{2}\left (b x +a \right )\right )-\frac {\left (b x +a \right ) \left (\cos ^{2}\left (b x +a \right )\right )}{2}+\frac {5 \sin \left (b x +a \right ) \cos \left (b x +a \right )}{4}-\frac {3 b x}{4}-\frac {3 a}{4}+a \ln \left (b x +a \right )-a \cosineIntegral \left (2 b x +2 a \right )-\sinIntegral \left (2 b x +2 a \right )}{b^{3}}\) | \(175\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Failed to integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 0.37, size = 126, normalized size = 0.67 \begin {gather*} -\frac {2 \, {\left (b x - a\right )} \cos \left (b x + a\right )^{2} + 4 \, {\left (b^{2} x^{2} - 2\right )} \cos \left (b x + a\right ) \operatorname {Si}\left (b x + a\right ) + 3 \, b x + 2 \, a \operatorname {Ci}\left (2 \, b x + 2 \, a\right ) + 2 \, a \operatorname {Ci}\left (-2 \, b x - 2 \, a\right ) - 4 \, a \log \left (b x + a\right ) - {\left (8 \, b x \operatorname {Si}\left (b x + a\right ) + 5 \, \cos \left (b x + a\right )\right )} \sin \left (b x + a\right ) - 2 \, {\left (a^{2} - 2\right )} \operatorname {Si}\left (2 \, b x + 2 \, a\right )}{4 \, b^{3}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int x^{2} \sin {\left (a + b x \right )} \operatorname {Si}{\left (a + b x \right )}\, dx \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [C] Result contains higher order function than in optimal. Order 9 vs. order
4.
time = 0.44, size = 398, normalized size = 2.13 \begin {gather*} {\left (\frac {2 \, x \sin \left (b x + a\right )}{b^{2}} - \frac {{\left (b^{2} x^{2} - 2\right )} \cos \left (b x + a\right )}{b^{3}}\right )} \operatorname {Si}\left (b x + a\right ) + \frac {a^{2} \Im \left ( \operatorname {Ci}\left (2 \, b x + 2 \, a\right ) \right ) \tan \left (b x + a\right )^{2} - a^{2} \Im \left ( \operatorname {Ci}\left (-2 \, b x - 2 \, a\right ) \right ) \tan \left (b x + a\right )^{2} + 2 \, a^{2} \operatorname {Si}\left (2 \, b x + 2 \, a\right ) \tan \left (b x + a\right )^{2} - 3 \, b x \tan \left (b x + a\right )^{2} + 4 \, a \log \left ({\left | b x + a \right |}\right ) \tan \left (b x + a\right )^{2} - 2 \, a \Re \left ( \operatorname {Ci}\left (2 \, b x + 2 \, a\right ) \right ) \tan \left (b x + a\right )^{2} - 2 \, a \Re \left ( \operatorname {Ci}\left (-2 \, b x - 2 \, a\right ) \right ) \tan \left (b x + a\right )^{2} + a^{2} \Im \left ( \operatorname {Ci}\left (2 \, b x + 2 \, a\right ) \right ) - a^{2} \Im \left ( \operatorname {Ci}\left (-2 \, b x - 2 \, a\right ) \right ) + 2 \, a^{2} \operatorname {Si}\left (2 \, b x + 2 \, a\right ) - a \tan \left (b x + a\right )^{2} - 2 \, \Im \left ( \operatorname {Ci}\left (2 \, b x + 2 \, a\right ) \right ) \tan \left (b x + a\right )^{2} + 2 \, \Im \left ( \operatorname {Ci}\left (-2 \, b x - 2 \, a\right ) \right ) \tan \left (b x + a\right )^{2} - 4 \, \operatorname {Si}\left (2 \, b x + 2 \, a\right ) \tan \left (b x + a\right )^{2} - 5 \, b x + 4 \, a \log \left ({\left | b x + a \right |}\right ) - 2 \, a \Re \left ( \operatorname {Ci}\left (2 \, b x + 2 \, a\right ) \right ) - 2 \, a \Re \left ( \operatorname {Ci}\left (-2 \, b x - 2 \, a\right ) \right ) + a - 2 \, \Im \left ( \operatorname {Ci}\left (2 \, b x + 2 \, a\right ) \right ) + 2 \, \Im \left ( \operatorname {Ci}\left (-2 \, b x - 2 \, a\right ) \right ) - 4 \, \operatorname {Si}\left (2 \, b x + 2 \, a\right ) + 5 \, \tan \left (b x + a\right )}{4 \, {\left (b^{3} \tan \left (b x + a\right )^{2} + b^{3}\right )}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [F]
time = 0.00, size = -1, normalized size = -0.01 \begin {gather*} \int x^2\,\mathrm {sinint}\left (a+b\,x\right )\,\sin \left (a+b\,x\right ) \,d x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________