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.0654437, antiderivative size = 35, normalized size of antiderivative = 1., 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 6742
Rule 2638
Rule 3296
Rule 2637
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.0398081, 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]
________________________________________________________________________________________
Maple [A] time = 0.002, size = 36, normalized size = 1. \begin{align*} c \left ( -{x}^{2}\cos \left ( x \right ) +2\,\cos \left ( x \right ) +2\,x\sin \left ( x \right ) \right ) +b \left ( \sin \left ( x \right ) -x\cos \left ( x \right ) \right ) -a\cos \left ( x \right ) \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A] time = 0.95894, size = 47, normalized size = 1.34 \begin{align*} -{\left (x \cos \left (x\right ) - \sin \left (x\right )\right )} b -{\left ({\left (x^{2} - 2\right )} \cos \left (x\right ) - 2 \, x \sin \left (x\right )\right )} c - a \cos \left (x\right ) \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A] time = 1.8922, size = 73, normalized size = 2.09 \begin{align*} -{\left (c x^{2} + b x + a - 2 \, c\right )} \cos \left (x\right ) +{\left (2 \, c x + b\right )} \sin \left (x\right ) \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [A] time = 0.336708, size = 39, normalized size = 1.11 \begin{align*} - a \cos{\left (x \right )} - b x \cos{\left (x \right )} + b \sin{\left (x \right )} - c x^{2} \cos{\left (x \right )} + 2 c x \sin{\left (x \right )} + 2 c \cos{\left (x \right )} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A] time = 1.0951, size = 36, normalized size = 1.03 \begin{align*} -{\left (c x^{2} + b x + a - 2 \, c\right )} \cos \left (x\right ) +{\left (2 \, c x + b\right )} \sin \left (x\right ) \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]