Optimal. Leaf size=6 \[ -x+\tan (x) \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.00, antiderivative size = 6, normalized size of antiderivative = 1.00, number of steps
used = 2, number of rules used = 2, integrand size = 4, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.500, Rules used = {3554, 8}
\begin {gather*} \tan (x)-x \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 8
Rule 3554
Rubi steps
\begin {align*} \int \tan ^2(x) \, dx &=\tan (x)-\int 1 \, dx\\ &=-x+\tan (x)\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.01, size = 6, normalized size = 1.00 \begin {gather*} -x+\tan (x) \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.01, size = 9, normalized size = 1.50
method | result | size |
norman | \(-x +\tan \left (x \right )\) | \(7\) |
derivativedivides | \(\tan \left (x \right )-\arctan \left (\tan \left (x \right )\right )\) | \(9\) |
default | \(\tan \left (x \right )-\arctan \left (\tan \left (x \right )\right )\) | \(9\) |
risch | \(-x +\frac {2 i}{{\mathrm e}^{2 i x}+1}\) | \(17\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A]
time = 3.17, size = 6, normalized size = 1.00 \begin {gather*} -x + \tan \left (x\right ) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 0.79, size = 6, normalized size = 1.00 \begin {gather*} -x + \tan \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. 7 vs.
\(2 (3) = 6\).
time = 0.01, size = 7, normalized size = 1.17 \begin {gather*} - x + \frac {\sin {\left (x \right )}}{\cos {\left (x \right )}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A]
time = 0.50, size = 6, normalized size = 1.00 \begin {gather*} -x + \tan \left (x\right ) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 0.07, size = 6, normalized size = 1.00 \begin {gather*} \mathrm {tan}\left (x\right )-x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________