Optimal. Leaf size=16 \[ \frac {1}{2} x \sec ^2(x)-\frac {\tan (x)}{2} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.01, antiderivative size = 16, normalized size of antiderivative = 1.00, number of steps
used = 3, number of rules used = 3, integrand size = 8, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.375, Rules used = {3842, 3852, 8}
\begin {gather*} \frac {1}{2} x \sec ^2(x)-\frac {\tan (x)}{2} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 8
Rule 3842
Rule 3852
Rubi steps
\begin {align*} \int x \sec ^2(x) \tan (x) \, dx &=\frac {1}{2} x \sec ^2(x)-\frac {1}{2} \int \sec ^2(x) \, dx\\ &=\frac {1}{2} x \sec ^2(x)+\frac {1}{2} \text {Subst}(\int 1 \, dx,x,-\tan (x))\\ &=\frac {1}{2} x \sec ^2(x)-\frac {\tan (x)}{2}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.01, size = 16, normalized size = 1.00 \begin {gather*} \frac {1}{2} x \sec ^2(x)-\frac {\tan (x)}{2} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.10, size = 13, normalized size = 0.81
method | result | size |
default | \(\frac {x}{2 \cos \left (x \right )^{2}}-\frac {\tan \left (x \right )}{2}\) | \(13\) |
risch | \(\frac {2 x \,{\mathrm e}^{2 i x}-i {\mathrm e}^{2 i x}-i}{\left ({\mathrm e}^{2 i x}+1\right )^{2}}\) | \(30\) |
norman | \(\frac {\tan ^{3}\left (\frac {x}{2}\right )+x \left (\tan ^{2}\left (\frac {x}{2}\right )\right )+\frac {x}{2}+\frac {x \left (\tan ^{4}\left (\frac {x}{2}\right )\right )}{2}-\tan \left (\frac {x}{2}\right )}{\left (\tan ^{2}\left (\frac {x}{2}\right )-1\right )^{2}}\) | \(45\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [B] Leaf count of result is larger than twice the leaf count of optimal. 132 vs.
\(2 (12) = 24\).
time = 0.84, size = 132, normalized size = 8.25 \begin {gather*} \frac {4 \, x \cos \left (2 \, x\right )^{2} + 4 \, x \sin \left (2 \, x\right )^{2} + {\left (2 \, x \cos \left (2 \, x\right ) + \sin \left (2 \, x\right )\right )} \cos \left (4 \, x\right ) + 2 \, x \cos \left (2 \, x\right ) + {\left (2 \, x \sin \left (2 \, x\right ) - \cos \left (2 \, x\right ) - 1\right )} \sin \left (4 \, x\right ) - \sin \left (2 \, x\right )}{2 \, {\left (2 \, \cos \left (2 \, x\right ) + 1\right )} \cos \left (4 \, x\right ) + \cos \left (4 \, x\right )^{2} + 4 \, \cos \left (2 \, x\right )^{2} + \sin \left (4 \, x\right )^{2} + 4 \, \sin \left (4 \, x\right ) \sin \left (2 \, x\right ) + 4 \, \sin \left (2 \, x\right )^{2} + 4 \, \cos \left (2 \, x\right ) + 1} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 0.82, size = 15, normalized size = 0.94 \begin {gather*} -\frac {\cos \left (x\right ) \sin \left (x\right ) - x}{2 \, \cos \left (x\right )^{2}} \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. 128 vs.
\(2 (12) = 24\).
time = 0.42, size = 128, normalized size = 8.00 \begin {gather*} \frac {x \tan ^{4}{\left (\frac {x}{2} \right )}}{2 \tan ^{4}{\left (\frac {x}{2} \right )} - 4 \tan ^{2}{\left (\frac {x}{2} \right )} + 2} + \frac {2 x \tan ^{2}{\left (\frac {x}{2} \right )}}{2 \tan ^{4}{\left (\frac {x}{2} \right )} - 4 \tan ^{2}{\left (\frac {x}{2} \right )} + 2} + \frac {x}{2 \tan ^{4}{\left (\frac {x}{2} \right )} - 4 \tan ^{2}{\left (\frac {x}{2} \right )} + 2} + \frac {2 \tan ^{3}{\left (\frac {x}{2} \right )}}{2 \tan ^{4}{\left (\frac {x}{2} \right )} - 4 \tan ^{2}{\left (\frac {x}{2} \right )} + 2} - \frac {2 \tan {\left (\frac {x}{2} \right )}}{2 \tan ^{4}{\left (\frac {x}{2} \right )} - 4 \tan ^{2}{\left (\frac {x}{2} \right )} + 2} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [B] Leaf count of result is larger than twice the leaf count of optimal. 53 vs.
\(2 (12) = 24\).
time = 0.75, size = 53, normalized size = 3.31 \begin {gather*} \frac {x \tan \left (\frac {1}{2} \, x\right )^{4} + 2 \, x \tan \left (\frac {1}{2} \, x\right )^{2} + 2 \, \tan \left (\frac {1}{2} \, x\right )^{3} + x - 2 \, \tan \left (\frac {1}{2} \, x\right )}{2 \, {\left (\tan \left (\frac {1}{2} \, x\right )^{4} - 2 \, \tan \left (\frac {1}{2} \, x\right )^{2} + 1\right )}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 0.35, size = 16, normalized size = 1.00 \begin {gather*} \frac {2\,x-\sin \left (2\,x\right )}{4\,{\cos \left (x\right )}^2} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________