Optimal. Leaf size=14 \[ \frac {1}{2} \log (\tan (x))-\frac {\tan (x)}{2} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.03, antiderivative size = 14, normalized size of antiderivative = 1.00, number of steps
used = 3, number of rules used = 1, integrand size = 11, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.091, Rules used = {12}
\begin {gather*} \frac {1}{2} \log (\tan (x))-\frac {\tan (x)}{2} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 12
Rubi steps
\begin {align*} \int \csc (2 x) (1-\tan (x)) \, dx &=\text {Subst}\left (\int \frac {1}{2} \left (-1+\frac {1}{x}\right ) \, dx,x,\tan (x)\right )\\ &=\frac {1}{2} \text {Subst}\left (\int \left (-1+\frac {1}{x}\right ) \, dx,x,\tan (x)\right )\\ &=\frac {1}{2} \log (\tan (x))-\frac {\tan (x)}{2}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.02, size = 21, normalized size = 1.50 \begin {gather*} -\frac {1}{2} \log (\cos (x))+\frac {1}{2} \log (\sin (x))-\frac {\tan (x)}{2} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.08, size = 11, normalized size = 0.79
method | result | size |
default | \(\frac {\ln \left (\tan \left (x \right )\right )}{2}-\frac {\tan \left (x \right )}{2}\) | \(11\) |
norman | \(\frac {\ln \left (\tan \left (x \right )\right )}{2}-\frac {\tan \left (x \right )}{2}\) | \(11\) |
risch | \(-\frac {i}{{\mathrm e}^{2 i x}+1}-\frac {\ln \left ({\mathrm e}^{2 i x}+1\right )}{2}+\frac {\ln \left ({\mathrm e}^{2 i x}-1\right )}{2}\) | \(34\) |
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. 47 vs.
\(2 (10) = 20\).
time = 2.32, size = 47, normalized size = 3.36 \begin {gather*} -\frac {\sin \left (2 \, x\right )}{\cos \left (2 \, x\right )^{2} + \sin \left (2 \, x\right )^{2} + 2 \, \cos \left (2 \, x\right ) + 1} - \frac {1}{4} \, \log \left (\cos \left (2 \, x\right ) + 1\right ) + \frac {1}{4} \, \log \left (\cos \left (2 \, x\right ) - 1\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. 32 vs.
\(2 (10) = 20\).
time = 0.97, size = 32, normalized size = 2.29 \begin {gather*} \frac {1}{4} \, \log \left (\frac {\tan \left (x\right )^{2}}{\tan \left (x\right )^{2} + 1}\right ) - \frac {1}{4} \, \log \left (\frac {1}{\tan \left (x\right )^{2} + 1}\right ) - \frac {1}{2} \, \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. 27 vs.
\(2 (10) = 20\).
time = 0.69, size = 27, normalized size = 1.93 \begin {gather*} \frac {\log {\left (\cos {\left (2 x \right )} - 1 \right )}}{4} - \frac {\log {\left (\cos {\left (2 x \right )} + 1 \right )}}{4} - \frac {\sin {\left (x \right )}}{2 \cos {\left (x \right )}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A]
time = 0.95, size = 11, normalized size = 0.79 \begin {gather*} \frac {1}{2} \, \log \left ({\left | \tan \left (x\right ) \right |}\right ) - \frac {1}{2} \, \tan \left (x\right ) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 0.21, size = 10, normalized size = 0.71 \begin {gather*} \frac {\ln \left (\mathrm {tan}\left (x\right )\right )}{2}-\frac {\mathrm {tan}\left (x\right )}{2} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________