Optimal. Leaf size=28 \[ \frac{1}{4} x \sin (3)-\frac{1}{4} \cos (2 x+3)-\frac{1}{16} \cos (4 x+3) \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.0231948, antiderivative size = 28, normalized size of antiderivative = 1., number of steps used = 4, number of rules used = 2, integrand size = 11, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.182, Rules used = {4574, 2638} \[ \frac{1}{4} x \sin (3)-\frac{1}{4} \cos (2 x+3)-\frac{1}{16} \cos (4 x+3) \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 4574
Rule 2638
Rubi steps
\begin{align*} \int \cos ^2(x) \sin (3+2 x) \, dx &=\int \left (\frac{\sin (3)}{4}+\frac{1}{2} \sin (3+2 x)+\frac{1}{4} \sin (3+4 x)\right ) \, dx\\ &=\frac{1}{4} x \sin (3)+\frac{1}{4} \int \sin (3+4 x) \, dx+\frac{1}{2} \int \sin (3+2 x) \, dx\\ &=-\frac{1}{4} \cos (3+2 x)-\frac{1}{16} \cos (3+4 x)+\frac{1}{4} x \sin (3)\\ \end{align*}
Mathematica [A] time = 0.0152, size = 28, normalized size = 1. \[ \frac{1}{4} x \sin (3)-\frac{1}{4} \cos (2 x+3)-\frac{1}{16} \cos (4 x+3) \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A] time = 0.011, size = 23, normalized size = 0.8 \begin{align*} -{\frac{\cos \left ( 3+2\,x \right ) }{4}}-{\frac{\cos \left ( 3+4\,x \right ) }{16}}+{\frac{x\sin \left ( 3 \right ) }{4}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A] time = 0.95125, size = 30, normalized size = 1.07 \begin{align*} \frac{1}{4} \, x \sin \left (3\right ) - \frac{1}{16} \, \cos \left (4 \, x + 3\right ) - \frac{1}{4} \, \cos \left (2 \, x + 3\right ) \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A] time = 1.86913, size = 116, normalized size = 4.14 \begin{align*} -\frac{1}{2} \, \cos \left (3\right ) \cos \left (x\right )^{4} + \frac{1}{4} \, x \sin \left (3\right ) + \frac{1}{4} \,{\left (2 \, \cos \left (x\right )^{3} \sin \left (3\right ) + \cos \left (x\right ) \sin \left (3\right )\right )} \sin \left (x\right ) \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [B] time = 2.26138, size = 75, normalized size = 2.68 \begin{align*} - \frac{x \sin ^{2}{\left (x \right )} \sin{\left (2 x + 3 \right )}}{4} - \frac{x \sin{\left (x \right )} \cos{\left (x \right )} \cos{\left (2 x + 3 \right )}}{2} + \frac{x \sin{\left (2 x + 3 \right )} \cos ^{2}{\left (x \right )}}{4} - \frac{\sin{\left (x \right )} \sin{\left (2 x + 3 \right )} \cos{\left (x \right )}}{4} - \frac{\cos ^{2}{\left (x \right )} \cos{\left (2 x + 3 \right )}}{2} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A] time = 1.07769, size = 30, normalized size = 1.07 \begin{align*} \frac{1}{4} \, x \sin \left (3\right ) - \frac{1}{16} \, \cos \left (4 \, x + 3\right ) - \frac{1}{4} \, \cos \left (2 \, x + 3\right ) \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]