Optimal. Leaf size=30 \[ \frac {x^3}{3}+\frac {x}{2}+2 \sin (x)-2 x \cos (x)-\frac {1}{2} \sin (x) \cos (x) \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.03, antiderivative size = 30, normalized size of antiderivative = 1.00, number of steps used = 6, number of rules used = 5, integrand size = 6, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.833, Rules used = {6742, 3296, 2637, 2635, 8} \[ \frac {x^3}{3}+\frac {x}{2}+2 \sin (x)-2 x \cos (x)-\frac {1}{2} \sin (x) \cos (x) \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 8
Rule 2635
Rule 2637
Rule 3296
Rule 6742
Rubi steps
\begin {align*} \int (x+\sin (x))^2 \, dx &=\int \left (x^2+2 x \sin (x)+\sin ^2(x)\right ) \, dx\\ &=\frac {x^3}{3}+2 \int x \sin (x) \, dx+\int \sin ^2(x) \, dx\\ &=\frac {x^3}{3}-2 x \cos (x)-\frac {1}{2} \cos (x) \sin (x)+\frac {\int 1 \, dx}{2}+2 \int \cos (x) \, dx\\ &=\frac {x}{2}+\frac {x^3}{3}-2 x \cos (x)+2 \sin (x)-\frac {1}{2} \cos (x) \sin (x)\\ \end {align*}
________________________________________________________________________________________
Mathematica [A] time = 0.06, size = 30, normalized size = 1.00 \[ \frac {1}{6} x \left (2 x^2+3\right )+2 \sin (x)-\frac {1}{4} \sin (2 x)-2 x \cos (x) \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 0.43, size = 22, normalized size = 0.73 \[ \frac {1}{3} \, x^{3} - 2 \, x \cos \relax (x) - \frac {1}{2} \, {\left (\cos \relax (x) - 4\right )} \sin \relax (x) + \frac {1}{2} \, x \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [A] time = 0.94, size = 24, normalized size = 0.80 \[ \frac {1}{3} \, x^{3} - 2 \, x \cos \relax (x) + \frac {1}{2} \, x - \frac {1}{4} \, \sin \left (2 \, x\right ) + 2 \, \sin \relax (x) \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 0.02, size = 25, normalized size = 0.83 \[ \frac {x^{3}}{3}-2 x \cos \relax (x )-\frac {\cos \relax (x ) \sin \relax (x )}{2}+\frac {x}{2}+2 \sin \relax (x ) \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [A] time = 0.58, size = 24, normalized size = 0.80 \[ \frac {1}{3} \, x^{3} - 2 \, x \cos \relax (x) + \frac {1}{2} \, x - \frac {1}{4} \, \sin \left (2 \, x\right ) + 2 \, \sin \relax (x) \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 0.31, size = 24, normalized size = 0.80 \[ \frac {x}{2}+2\,\sin \relax (x)-\frac {\cos \relax (x)\,\sin \relax (x)}{2}-2\,x\,\cos \relax (x)+\frac {x^3}{3} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [A] time = 0.22, size = 41, normalized size = 1.37 \[ \frac {x^{3}}{3} + \frac {x \sin ^{2}{\relax (x )}}{2} + \frac {x \cos ^{2}{\relax (x )}}{2} - 2 x \cos {\relax (x )} - \frac {\sin {\relax (x )} \cos {\relax (x )}}{2} + 2 \sin {\relax (x )} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________