Optimal. Leaf size=8 \[ -x-2 \cot (x) \]
[Out]
_______________________________________________________________________________________
Rubi [A] time = 0.0578814, antiderivative size = 8, normalized size of antiderivative = 1., number of steps used = 4, number of rules used = 4, integrand size = 17, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.235 \[ -x-2 \cot (x) \]
Antiderivative was successfully verified.
[In] Int[(1 + Cos[x]^2)/(1 - Cos[x]^2),x]
[Out]
_______________________________________________________________________________________
Rubi in Sympy [F] time = 0., size = 0, normalized size = 0. \[ \int \frac{\cos ^{2}{\left (x \right )} + 1}{\sin ^{2}{\left (x \right )}}\, dx \]
Verification of antiderivative is not currently implemented for this CAS.
[In] rubi_integrate((1+cos(x)**2)/(-cos(x)**2+1),x)
[Out]
_______________________________________________________________________________________
Mathematica [A] time = 0.0130457, size = 8, normalized size = 1. \[ -x-2 \cot (x) \]
Antiderivative was successfully verified.
[In] Integrate[(1 + Cos[x]^2)/(1 - Cos[x]^2),x]
[Out]
_______________________________________________________________________________________
Maple [A] time = 0.062, size = 11, normalized size = 1.4 \[ -2\, \left ( \tan \left ( x \right ) \right ) ^{-1}-x \]
Verification of antiderivative is not currently implemented for this CAS.
[In] int((1+cos(x)^2)/(-cos(x)^2+1),x)
[Out]
_______________________________________________________________________________________
Maxima [A] time = 1.51114, size = 14, normalized size = 1.75 \[ -x - \frac{2}{\tan \left (x\right )} \]
Verification of antiderivative is not currently implemented for this CAS.
[In] integrate(-(cos(x)^2 + 1)/(cos(x)^2 - 1),x, algorithm="maxima")
[Out]
_______________________________________________________________________________________
Fricas [A] time = 0.21793, size = 20, normalized size = 2.5 \[ -\frac{x \sin \left (x\right ) + 2 \, \cos \left (x\right )}{\sin \left (x\right )} \]
Verification of antiderivative is not currently implemented for this CAS.
[In] integrate(-(cos(x)^2 + 1)/(cos(x)^2 - 1),x, algorithm="fricas")
[Out]
_______________________________________________________________________________________
Sympy [A] time = 2.37255, size = 12, normalized size = 1.5 \[ - x + \tan{\left (\frac{x}{2} \right )} - \frac{1}{\tan{\left (\frac{x}{2} \right )}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In] integrate((1+cos(x)**2)/(-cos(x)**2+1),x)
[Out]
_______________________________________________________________________________________
GIAC/XCAS [A] time = 0.225478, size = 22, normalized size = 2.75 \[ -x - \frac{1}{\tan \left (\frac{1}{2} \, x\right )} + \tan \left (\frac{1}{2} \, x\right ) \]
Verification of antiderivative is not currently implemented for this CAS.
[In] integrate(-(cos(x)^2 + 1)/(cos(x)^2 - 1),x, algorithm="giac")
[Out]