Optimal. Leaf size=10 \[ \frac {1}{2} (x+\sin (x))^2 \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.01, antiderivative size = 20, normalized size of antiderivative = 2.00, number of steps
used = 6, number of rules used = 4, integrand size = 13, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.308, Rules used = {3377, 2718,
2644, 30} \begin {gather*} \frac {x^2}{2}+\frac {\sin ^2(x)}{2}+x \sin (x) \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 30
Rule 2644
Rule 2718
Rule 3377
Rubi steps
\begin {gather*} \begin {aligned} \text {Integral} &=\frac {x^2}{2}+\int x \cos (x) \, dx+\int \sin (x) \, dx+\int \cos (x) \sin (x) \, dx\\ &=\frac {x^2}{2}-\cos (x)+x \sin (x)-\int \sin (x) \, dx+\text {Subst}(\int x \, dx,x,\sin (x))\\ &=\frac {x^2}{2}+x \sin (x)+\frac {\sin ^2(x)}{2}\\ \end {aligned} \end {gather*}
________________________________________________________________________________________
Mathematica [A]
time = 0.01, size = 20, normalized size = 2.00 \begin {gather*} \frac {x^2}{2}-\frac {\cos ^2(x)}{2}+x \sin (x) \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.11, size = 17, normalized size = 1.70
method | result | size |
default | \(\frac {x^{2}}{2}+x \sin \left (x \right )+\frac {\left (\sin ^{2}\left (x \right )\right )}{2}\) | \(17\) |
risch | \(\frac {x^{2}}{2}+x \sin \left (x \right )-\frac {\cos \left (2 x \right )}{4}\) | \(17\) |
parts | \(\frac {x^{2}}{2}-\frac {\left (\cos ^{2}\left (x \right )\right )}{2}+x \sin \left (x \right )\) | \(17\) |
norman | \(\frac {x^{2} \left (\tan ^{2}\left (\frac {x}{2}\right )\right )+2 \left (\tan ^{2}\left (\frac {x}{2}\right )\right )+\frac {x^{2}}{2}+2 x \tan \left (\frac {x}{2}\right )+2 x \left (\tan ^{3}\left (\frac {x}{2}\right )\right )+\frac {x^{2} \left (\tan ^{4}\left (\frac {x}{2}\right )\right )}{2}}{\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 = 0.33, size = 16, normalized size = 1.60 \begin {gather*} \frac {1}{2} \, x^{2} - \frac {1}{2} \, \cos \left (x\right )^{2} + x \sin \left (x\right ) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 0.58, size = 16, normalized size = 1.60 \begin {gather*} \frac {1}{2} \, x^{2} - \frac {1}{2} \, \cos \left (x\right )^{2} + x \sin \left (x\right ) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [B] Leaf count of result is larger than twice the leaf count of optimal. 15 vs.
\(2 (7) = 14\).
time = 0.06, size = 15, normalized size = 1.50 \begin {gather*} \frac {x^{2}}{2} + x \sin {\left (x \right )} + \frac {\sin ^{2}{\left (x \right )}}{2} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A]
time = 0.56, size = 16, normalized size = 1.60 \begin {gather*} \frac {1}{2} \, x^{2} - \frac {1}{2} \, \cos \left (x\right )^{2} + x \sin \left (x\right ) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 0.06, size = 8, normalized size = 0.80 \begin {gather*} \frac {{\left (x+\sin \left (x\right )\right )}^2}{2} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Chatgpt [F] Failed to verify
time = 1.00, size = 14, normalized size = 1.40 \begin {gather*} \frac {x^{2}}{2}-\cos \left (x \right )+x \sin \left (x \right ) \end {gather*}
Warning: Unable to verify antiderivative.
[In]
[Out]
________________________________________________________________________________________