Optimal. Leaf size=7 \[ -\cot (x)+\tan (x) \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.02, antiderivative size = 7, normalized size of antiderivative = 1.00, number of steps
used = 3, number of rules used = 2, integrand size = 9, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.222, Rules used = {2700, 14}
\begin {gather*} \tan (x)-\cot (x) \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 14
Rule 2700
Rubi steps
\begin {align*} \int \csc ^2(x) \sec ^2(x) \, dx &=\text {Subst}\left (\int \frac {1+x^2}{x^2} \, dx,x,\tan (x)\right )\\ &=\text {Subst}\left (\int \left (1+\frac {1}{x^2}\right ) \, dx,x,\tan (x)\right )\\ &=-\cot (x)+\tan (x)\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.01, size = 6, normalized size = 0.86 \begin {gather*} -2 \cot (2 x) \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.02, size = 15, normalized size = 2.14
method | result | size |
default | \(\frac {1}{\sin \left (x \right ) \cos \left (x \right )}-2 \cot \left (x \right )\) | \(15\) |
risch | \(-\frac {4 i}{\left ({\mathrm e}^{2 i x}+1\right ) \left ({\mathrm e}^{2 i x}-1\right )}\) | \(22\) |
norman | \(\frac {\frac {1}{2}-3 \left (\tan ^{2}\left (\frac {x}{2}\right )\right )+\frac {\left (\tan ^{4}\left (\frac {x}{2}\right )\right )}{2}}{\left (\tan ^{2}\left (\frac {x}{2}\right )-1\right ) \tan \left (\frac {x}{2}\right )}\) | \(36\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A]
time = 2.14, size = 9, normalized size = 1.29 \begin {gather*} -\frac {1}{\tan \left (x\right )} + \tan \left (x\right ) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [B] Leaf count of result is larger than twice the leaf count of optimal. 18 vs.
\(2 (7) = 14\).
time = 0.52, size = 18, normalized size = 2.57 \begin {gather*} -\frac {2 \, \cos \left (x\right )^{2} - 1}{\cos \left (x\right ) \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. 12 vs.
\(2 (5) = 10\).
time = 0.01, size = 12, normalized size = 1.71 \begin {gather*} - \frac {2 \cos {\left (2 x \right )}}{\sin {\left (2 x \right )}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A]
time = 0.98, size = 9, normalized size = 1.29 \begin {gather*} -\frac {1}{\tan \left (x\right )} + \tan \left (x\right ) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 0.20, size = 6, normalized size = 0.86 \begin {gather*} -2\,\mathrm {cot}\left (2\,x\right ) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________