Optimal. Leaf size=11 \[ \frac {1}{2} \tanh ^{-1}(2 \cos (x) \sin (x)) \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.02, antiderivative size = 11, normalized size of antiderivative = 1.00, number of steps
used = 2, number of rules used = 1, integrand size = 17, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.059, Rules used = {212}
\begin {gather*} \frac {1}{2} \tanh ^{-1}(2 \sin (x) \cos (x)) \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 212
Rubi steps
\begin {align*} \int \frac {1+\tan ^2(x)}{1-\tan ^2(x)} \, dx &=\text {Subst}\left (\int \frac {1}{1-x^2} \, dx,x,\tan (x)\right )\\ &=\frac {1}{2} \tanh ^{-1}(2 \cos (x) \sin (x))\\ \end {align*}
________________________________________________________________________________________
Mathematica [B] Leaf count is larger than twice the leaf count of optimal. \(23\) vs. \(2(11)=22\).
time = 0.01, size = 23, normalized size = 2.09 \begin {gather*} -\frac {1}{2} \log (\cos (x)-\sin (x))+\frac {1}{2} \log (\cos (x)+\sin (x)) \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.02, size = 4, normalized size = 0.36
method | result | size |
derivativedivides | \(\arctanh \left (\tan \left (x \right )\right )\) | \(4\) |
default | \(\arctanh \left (\tan \left (x \right )\right )\) | \(4\) |
norman | \(-\frac {\ln \left (-1+\tan \left (x \right )\right )}{2}+\frac {\ln \left (\tan \left (x \right )+1\right )}{2}\) | \(16\) |
risch | \(\frac {\ln \left ({\mathrm e}^{2 i x}+i\right )}{2}-\frac {\ln \left ({\mathrm e}^{2 i x}-i\right )}{2}\) | \(24\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A]
time = 2.21, size = 15, normalized size = 1.36 \begin {gather*} \frac {1}{2} \, \log \left (\tan \left (x\right ) + 1\right ) - \frac {1}{2} \, \log \left (\tan \left (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. 45 vs.
\(2 (9) = 18\).
time = 0.89, size = 45, normalized size = 4.09 \begin {gather*} \frac {1}{4} \, \log \left (\frac {\tan \left (x\right )^{2} + 2 \, \tan \left (x\right ) + 1}{\tan \left (x\right )^{2} + 1}\right ) - \frac {1}{4} \, \log \left (\frac {\tan \left (x\right )^{2} - 2 \, \tan \left (x\right ) + 1}{\tan \left (x\right )^{2} + 1}\right ) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [A]
time = 0.05, size = 15, normalized size = 1.36 \begin {gather*} - \frac {\log {\left (\tan {\left (x \right )} - 1 \right )}}{2} + \frac {\log {\left (\tan {\left (x \right )} + 1 \right )}}{2} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A]
time = 1.31, size = 17, normalized size = 1.55 \begin {gather*} \frac {1}{2} \, \log \left ({\left | \tan \left (x\right ) + 1 \right |}\right ) - \frac {1}{2} \, \log \left ({\left | \tan \left (x\right ) - 1 \right |}\right ) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 0.35, size = 3, normalized size = 0.27 \begin {gather*} \mathrm {atanh}\left (\mathrm {tan}\left (x\right )\right ) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________