Optimal. Leaf size=25 \[ \frac {x^2}{4}+\frac {\cos ^2(x)}{4}+\frac {1}{2} x \cos (x) \sin (x) \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.01, antiderivative size = 25, normalized size of antiderivative = 1.00, number of steps
used = 2, number of rules used = 2, integrand size = 6, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.333, Rules used = {3391, 30}
\begin {gather*} \frac {x^2}{4}+\frac {\cos ^2(x)}{4}+\frac {1}{2} x \sin (x) \cos (x) \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 30
Rule 3391
Rubi steps
\begin {align*} \int x \cos ^2(x) \, dx &=\frac {\cos ^2(x)}{4}+\frac {1}{2} x \cos (x) \sin (x)+\frac {\int x \, dx}{2}\\ &=\frac {x^2}{4}+\frac {\cos ^2(x)}{4}+\frac {1}{2} x \cos (x) \sin (x)\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.01, size = 25, normalized size = 1.00 \begin {gather*} \frac {x^2}{4}+\frac {1}{8} \cos (2 x)+\frac {1}{4} x \sin (2 x) \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.02, size = 25, normalized size = 1.00
method | result | size |
risch | \(\frac {x^{2}}{4}+\frac {\cos \left (2 x \right )}{8}+\frac {x \sin \left (2 x \right )}{4}\) | \(20\) |
default | \(x \left (\frac {x}{2}+\frac {\cos \left (x \right ) \sin \left (x \right )}{2}\right )-\frac {x^{2}}{4}-\frac {\left (\sin ^{2}\left (x \right )\right )}{4}\) | \(25\) |
norman | \(\frac {x \tan \left (\frac {x}{2}\right )-\left (\tan ^{2}\left (\frac {x}{2}\right )\right )+\frac {x^{2}}{4}-x \left (\tan ^{3}\left (\frac {x}{2}\right )\right )+\frac {x^{2} \left (\tan ^{2}\left (\frac {x}{2}\right )\right )}{2}+\frac {x^{2} \left (\tan ^{4}\left (\frac {x}{2}\right )\right )}{4}}{\left (1+\tan ^{2}\left (\frac {x}{2}\right )\right )^{2}}\) | \(63\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A]
time = 1.50, size = 19, normalized size = 0.76 \begin {gather*} \frac {1}{4} \, x^{2} + \frac {1}{4} \, x \sin \left (2 \, x\right ) + \frac {1}{8} \, \cos \left (2 \, x\right ) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 0.54, size = 19, normalized size = 0.76 \begin {gather*} \frac {1}{2} \, x \cos \left (x\right ) \sin \left (x\right ) + \frac {1}{4} \, x^{2} + \frac {1}{4} \, \cos \left (x\right )^{2} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [A]
time = 0.09, size = 36, normalized size = 1.44 \begin {gather*} \frac {x^{2} \sin ^{2}{\left (x \right )}}{4} + \frac {x^{2} \cos ^{2}{\left (x \right )}}{4} + \frac {x \sin {\left (x \right )} \cos {\left (x \right )}}{2} + \frac {\cos ^{2}{\left (x \right )}}{4} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A]
time = 0.74, size = 19, normalized size = 0.76 \begin {gather*} \frac {1}{4} \, x^{2} + \frac {1}{4} \, x \sin \left (2 \, x\right ) + \frac {1}{8} \, \cos \left (2 \, x\right ) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 0.15, size = 19, normalized size = 0.76 \begin {gather*} \frac {x\,\sin \left (2\,x\right )}{4}-\frac {{\sin \left (x\right )}^2}{4}+\frac {x^2}{4} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________