Optimal. Leaf size=35 \[ -a \cos (x)+b \sin (x)-b x \cos (x)-c x^2 \cos (x)+2 c x \sin (x)+2 c \cos (x) \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.07, antiderivative size = 35, 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} \[ -a \cos (x)+b \sin (x)-b x \cos (x)-c x^2 \cos (x)+2 c x \sin (x)+2 c \cos (x) \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 2637
Rule 2638
Rule 3296
Rule 6742
Rubi steps
\begin {align*} \int \left (a+b x+c x^2\right ) \sin (x) \, dx &=\int \left (a \sin (x)+b x \sin (x)+c x^2 \sin (x)\right ) \, dx\\ &=a \int \sin (x) \, dx+b \int x \sin (x) \, dx+c \int x^2 \sin (x) \, dx\\ &=-a \cos (x)-b x \cos (x)-c x^2 \cos (x)+b \int \cos (x) \, dx+(2 c) \int x \cos (x) \, dx\\ &=-a \cos (x)-b x \cos (x)-c x^2 \cos (x)+b \sin (x)+2 c x \sin (x)-(2 c) \int \sin (x) \, dx\\ &=-a \cos (x)+2 c \cos (x)-b x \cos (x)-c x^2 \cos (x)+b \sin (x)+2 c x \sin (x)\\ \end {align*}
________________________________________________________________________________________
Mathematica [A] time = 0.04, size = 32, normalized size = 0.91 \[ -a \cos (x)+b \sin (x)-b x \cos (x)-c \left (x^2-2\right ) \cos (x)+2 c x \sin (x) \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 0.59, size = 27, normalized size = 0.77 \[ -{\left (c x^{2} + b x + a - 2 \, c\right )} \cos \relax (x) + {\left (2 \, c x + b\right )} \sin \relax (x) \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [A] time = 0.12, size = 27, normalized size = 0.77 \[ -{\left (c x^{2} + b x + a - 2 \, c\right )} \cos \relax (x) + {\left (2 \, c x + b\right )} \sin \relax (x) \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 0.03, size = 36, normalized size = 1.03 \[ c \left (-x^{2} \cos \relax (x )+2 \cos \relax (x )+2 x \sin \relax (x )\right )+b \left (\sin \relax (x )-x \cos \relax (x )\right )-a \cos \relax (x ) \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [A] time = 0.32, size = 35, normalized size = 1.00 \[ -{\left (x \cos \relax (x) - \sin \relax (x)\right )} b - {\left ({\left (x^{2} - 2\right )} \cos \relax (x) - 2 \, x \sin \relax (x)\right )} c - a \cos \relax (x) \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 0.06, size = 34, normalized size = 0.97 \[ b\,\sin \relax (x)-\cos \relax (x)\,\left (a-2\,c\right )-b\,x\,\cos \relax (x)+2\,c\,x\,\sin \relax (x)-c\,x^2\,\cos \relax (x) \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [A] time = 0.33, size = 39, normalized size = 1.11 \[ - a \cos {\relax (x )} - b x \cos {\relax (x )} + b \sin {\relax (x )} - c x^{2} \cos {\relax (x )} + 2 c x \sin {\relax (x )} + 2 c \cos {\relax (x )} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________