Optimal. Leaf size=25 \[ \frac {1}{2} a \sin ^2(x)+\frac {b x}{2}-\frac {1}{2} b \sin (x) \cos (x) \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.03, antiderivative size = 25, normalized size of antiderivative = 1.00, number of steps used = 6, number of rules used = 5, integrand size = 12, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.417, Rules used = {3089, 2564, 30, 2635, 8} \[ \frac {1}{2} a \sin ^2(x)+\frac {b x}{2}-\frac {1}{2} b \sin (x) \cos (x) \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 8
Rule 30
Rule 2564
Rule 2635
Rule 3089
Rubi steps
\begin {align*} \int \sin (x) (a \cos (x)+b \sin (x)) \, dx &=\int \left (a \cos (x) \sin (x)+b \sin ^2(x)\right ) \, dx\\ &=a \int \cos (x) \sin (x) \, dx+b \int \sin ^2(x) \, dx\\ &=-\frac {1}{2} b \cos (x) \sin (x)+a \operatorname {Subst}(\int x \, dx,x,\sin (x))+\frac {1}{2} b \int 1 \, dx\\ &=\frac {b x}{2}-\frac {1}{2} b \cos (x) \sin (x)+\frac {1}{2} a \sin ^2(x)\\ \end {align*}
________________________________________________________________________________________
Mathematica [A] time = 0.00, size = 25, normalized size = 1.00 \[ -\frac {1}{2} a \cos ^2(x)+\frac {b x}{2}-\frac {1}{4} b \sin (2 x) \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 0.40, size = 19, normalized size = 0.76 \[ -\frac {1}{2} \, a \cos \relax (x)^{2} - \frac {1}{2} \, b \cos \relax (x) \sin \relax (x) + \frac {1}{2} \, b x \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [A] time = 0.17, size = 19, normalized size = 0.76 \[ \frac {1}{2} \, b x - \frac {1}{4} \, a \cos \left (2 \, x\right ) - \frac {1}{4} \, b \sin \left (2 \, x\right ) \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 0.16, size = 21, normalized size = 0.84 \[ b \left (-\frac {\cos \relax (x ) \sin \relax (x )}{2}+\frac {x}{2}\right )-\frac {a \left (\cos ^{2}\relax (x )\right )}{2} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [A] time = 0.32, size = 21, normalized size = 0.84 \[ -\frac {1}{2} \, a \cos \relax (x)^{2} + \frac {1}{4} \, b {\left (2 \, x - \sin \left (2 \, x\right )\right )} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 0.41, size = 19, normalized size = 0.76 \[ \frac {a\,{\sin \relax (x)}^2}{2}-\frac {b\,\cos \relax (x)\,\sin \relax (x)}{2}+\frac {b\,x}{2} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [A] time = 0.16, size = 37, normalized size = 1.48 \[ - \frac {a \cos ^{2}{\relax (x )}}{2} + \frac {b x \sin ^{2}{\relax (x )}}{2} + \frac {b x \cos ^{2}{\relax (x )}}{2} - \frac {b \sin {\relax (x )} \cos {\relax (x )}}{2} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________