Optimal. Leaf size=40 \[ -\frac {1}{2} x^2 \cos (2 x)+\frac {1}{2} x \sin (2 x)+\sin (2 x)-2 x \cos (2 x)+\frac {7}{4} \cos (2 x) \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.07, antiderivative size = 40, normalized size of antiderivative = 1.00, number of steps used = 8, number of rules used = 4, integrand size = 13, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.308, Rules used = {6742, 2638, 3296, 2637} \[ -\frac {1}{2} x^2 \cos (2 x)+\frac {1}{2} x \sin (2 x)+\sin (2 x)-2 x \cos (2 x)+\frac {7}{4} \cos (2 x) \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 2637
Rule 2638
Rule 3296
Rule 6742
Rubi steps
\begin {align*} \int \left (-3+4 x+x^2\right ) \sin (2 x) \, dx &=\int \left (-3 \sin (2 x)+4 x \sin (2 x)+x^2 \sin (2 x)\right ) \, dx\\ &=-(3 \int \sin (2 x) \, dx)+4 \int x \sin (2 x) \, dx+\int x^2 \sin (2 x) \, dx\\ &=\frac {3}{2} \cos (2 x)-2 x \cos (2 x)-\frac {1}{2} x^2 \cos (2 x)+2 \int \cos (2 x) \, dx+\int x \cos (2 x) \, dx\\ &=\frac {3}{2} \cos (2 x)-2 x \cos (2 x)-\frac {1}{2} x^2 \cos (2 x)+\sin (2 x)+\frac {1}{2} x \sin (2 x)-\frac {1}{2} \int \sin (2 x) \, dx\\ &=\frac {7}{4} \cos (2 x)-2 x \cos (2 x)-\frac {1}{2} x^2 \cos (2 x)+\sin (2 x)+\frac {1}{2} x \sin (2 x)\\ \end {align*}
________________________________________________________________________________________
Mathematica [A] time = 0.04, size = 29, normalized size = 0.72 \[ \frac {1}{4} \left (\left (-2 x^2-8 x+7\right ) \cos (2 x)+2 (x+2) \sin (2 x)\right ) \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 0.55, size = 26, normalized size = 0.65 \[ -\frac {1}{4} \, {\left (2 \, x^{2} + 8 \, x - 7\right )} \cos \left (2 \, x\right ) + \frac {1}{2} \, {\left (x + 2\right )} \sin \left (2 \, x\right ) \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [A] time = 0.13, size = 26, normalized size = 0.65 \[ -\frac {1}{4} \, {\left (2 \, x^{2} + 8 \, x - 7\right )} \cos \left (2 \, x\right ) + \frac {1}{2} \, {\left (x + 2\right )} \sin \left (2 \, x\right ) \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 0.04, size = 35, normalized size = 0.88 \[ \frac {7 \cos \left (2 x \right )}{4}-2 x \cos \left (2 x \right )-\frac {x^{2} \cos \left (2 x \right )}{2}+\sin \left (2 x \right )+\frac {x \sin \left (2 x \right )}{2} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [A] time = 0.33, size = 38, normalized size = 0.95 \[ -\frac {1}{4} \, {\left (2 \, x^{2} - 1\right )} \cos \left (2 \, x\right ) - 2 \, x \cos \left (2 \, x\right ) + \frac {1}{2} \, x \sin \left (2 \, x\right ) + \frac {3}{2} \, \cos \left (2 \, x\right ) + \sin \left (2 \, x\right ) \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 2.90, size = 34, normalized size = 0.85 \[ \frac {7\,\cos \left (2\,x\right )}{4}+\sin \left (2\,x\right )-2\,x\,\cos \left (2\,x\right )+\frac {x\,\sin \left (2\,x\right )}{2}-\frac {x^2\,\cos \left (2\,x\right )}{2} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [A] time = 0.29, size = 39, normalized size = 0.98 \[ - \frac {x^{2} \cos {\left (2 x \right )}}{2} + \frac {x \sin {\left (2 x \right )}}{2} - 2 x \cos {\left (2 x \right )} + \sin {\left (2 x \right )} + \frac {7 \cos {\left (2 x \right )}}{4} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________