Optimal. Leaf size=18 \[ \frac{1}{2} x \sin (a)-\frac{1}{4} \cos (a+2 x) \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.0159437, antiderivative size = 18, normalized size of antiderivative = 1., number of steps used = 3, number of rules used = 2, integrand size = 7, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.286, Rules used = {4574, 2638} \[ \frac{1}{2} x \sin (a)-\frac{1}{4} \cos (a+2 x) \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 4574
Rule 2638
Rubi steps
\begin{align*} \int \cos (x) \sin (a+x) \, dx &=\int \left (\frac{\sin (a)}{2}+\frac{1}{2} \sin (a+2 x)\right ) \, dx\\ &=\frac{1}{2} x \sin (a)+\frac{1}{2} \int \sin (a+2 x) \, dx\\ &=-\frac{1}{4} \cos (a+2 x)+\frac{1}{2} x \sin (a)\\ \end{align*}
Mathematica [A] time = 0.0191674, size = 18, normalized size = 1. \[ \frac{1}{4} (2 x \sin (a)-\cos (a+2 x)) \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A] time = 0.018, size = 15, normalized size = 0.8 \begin{align*} -{\frac{\cos \left ( a+2\,x \right ) }{4}}+{\frac{x\sin \left ( a \right ) }{2}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A] time = 0.954662, size = 19, normalized size = 1.06 \begin{align*} \frac{1}{2} \, x \sin \left (a\right ) - \frac{1}{4} \, \cos \left (a + 2 \, x\right ) \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A] time = 1.74644, size = 103, normalized size = 5.72 \begin{align*} -\frac{1}{2} \, \cos \left (a + x\right )^{2} \cos \left (a\right ) - \frac{1}{2} \, \cos \left (a + x\right ) \sin \left (a + x\right ) \sin \left (a\right ) + \frac{1}{2} \, x \sin \left (a\right ) \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [B] time = 0.548398, size = 32, normalized size = 1.78 \begin{align*} - \frac{x \sin{\left (x \right )} \cos{\left (a + x \right )}}{2} + \frac{x \sin{\left (a + x \right )} \cos{\left (x \right )}}{2} + \frac{\sin{\left (x \right )} \sin{\left (a + x \right )}}{2} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A] time = 1.0879, size = 19, normalized size = 1.06 \begin{align*} \frac{1}{2} \, x \sin \left (a\right ) - \frac{1}{4} \, \cos \left (a + 2 \, x\right ) \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]