Optimal. Leaf size=11 \[ \frac{1}{2} \tanh ^{-1}(2 \sin (x) \cos (x)) \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.0154245, antiderivative size = 11, normalized size of antiderivative = 1., number of steps used = 2, number of rules used = 1, integrand size = 13, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.077, Rules used = {206} \[ \frac{1}{2} \tanh ^{-1}(2 \sin (x) \cos (x)) \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 206
Rubi steps
\begin{align*} \int \frac{1}{\cos ^2(x)-\sin ^2(x)} \, dx &=\operatorname{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] time = 0.0048526, size = 23, normalized size = 2.09 \[ \frac{1}{2} \log (\sin (x)+\cos (x))-\frac{1}{2} \log (\cos (x)-\sin (x)) \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A] time = 0.025, size = 4, normalized size = 0.4 \begin{align*}{\it Artanh} \left ( \tan \left ( x \right ) \right ) \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A] time = 1.03051, size = 20, normalized size = 1.82 \begin{align*} \frac{1}{2} \, \log \left (\tan \left (x\right ) + 1\right ) - \frac{1}{2} \, \log \left (\tan \left (x\right ) - 1\right ) \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [B] time = 1.85709, size = 84, normalized size = 7.64 \begin{align*} \frac{1}{4} \, \log \left (2 \, \cos \left (x\right ) \sin \left (x\right ) + 1\right ) - \frac{1}{4} \, \log \left (-2 \, \cos \left (x\right ) \sin \left (x\right ) + 1\right ) \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [B] time = 0.468747, size = 36, normalized size = 3.27 \begin{align*} \frac{\log{\left (\tan ^{2}{\left (\frac{x}{2} \right )} - 2 \tan{\left (\frac{x}{2} \right )} - 1 \right )}}{2} - \frac{\log{\left (\tan ^{2}{\left (\frac{x}{2} \right )} + 2 \tan{\left (\frac{x}{2} \right )} - 1 \right )}}{2} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [B] time = 1.12207, size = 45, normalized size = 4.09 \begin{align*} \frac{1}{8} \, \log \left ({\left | \frac{1}{\sin \left (2 \, x\right )} + \sin \left (2 \, x\right ) + 2 \right |}\right ) - \frac{1}{8} \, \log \left ({\left | \frac{1}{\sin \left (2 \, x\right )} + \sin \left (2 \, x\right ) - 2 \right |}\right ) \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]