Optimal. Leaf size=37 \[ \sqrt {2} x-x-\sqrt {2} \tan ^{-1}\left (\frac {\sin (x) \cos (x)}{\cos ^2(x)+\sqrt {2}+1}\right ) \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.03, antiderivative size = 37, normalized size of antiderivative = 1.00, number of steps used = 4, number of rules used = 2, integrand size = 11, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.182, Rules used = {1130, 203} \[ \sqrt {2} x-x-\sqrt {2} \tan ^{-1}\left (\frac {\sin (x) \cos (x)}{\cos ^2(x)+\sqrt {2}+1}\right ) \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 203
Rule 1130
Rubi steps
\begin {align*} \int \frac {1}{\cot ^2(x)+\csc ^2(x)} \, dx &=\operatorname {Subst}\left (\int \frac {x^2}{2+3 x^2+x^4} \, dx,x,\tan (x)\right )\\ &=2 \operatorname {Subst}\left (\int \frac {1}{2+x^2} \, dx,x,\tan (x)\right )-\operatorname {Subst}\left (\int \frac {1}{1+x^2} \, dx,x,\tan (x)\right )\\ &=-x+\sqrt {2} x-\sqrt {2} \tan ^{-1}\left (\frac {\cos (x) \sin (x)}{1+\sqrt {2}+\cos ^2(x)}\right )\\ \end {align*}
________________________________________________________________________________________
Mathematica [A] time = 0.04, size = 19, normalized size = 0.51 \[ \sqrt {2} \tan ^{-1}\left (\frac {\tan (x)}{\sqrt {2}}\right )-x \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 1.32, size = 35, normalized size = 0.95 \[ -\frac {1}{2} \, \sqrt {2} \arctan \left (\frac {3 \, \sqrt {2} \cos \relax (x)^{2} - \sqrt {2}}{4 \, \cos \relax (x) \sin \relax (x)}\right ) - x \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [A] time = 0.14, size = 49, normalized size = 1.32 \[ \sqrt {2} {\left (x + \arctan \left (-\frac {\sqrt {2} \sin \left (2 \, x\right ) - \sin \left (2 \, x\right )}{\sqrt {2} \cos \left (2 \, x\right ) + \sqrt {2} - \cos \left (2 \, x\right ) + 1}\right )\right )} - x \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 0.16, size = 17, normalized size = 0.46 \[ \sqrt {2}\, \arctan \left (\frac {\sqrt {2}\, \tan \relax (x )}{2}\right )-x \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [A] time = 0.41, size = 16, normalized size = 0.43 \[ \sqrt {2} \arctan \left (\frac {1}{2} \, \sqrt {2} \tan \relax (x)\right ) - x \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 2.71, size = 16, normalized size = 0.43 \[ \sqrt {2}\,\mathrm {atan}\left (\frac {\sqrt {2}\,\mathrm {tan}\relax (x)}{2}\right )-x \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [F] time = 0.00, size = 0, normalized size = 0.00 \[ \int \frac {1}{\cot ^{2}{\relax (x )} + \csc ^{2}{\relax (x )}}\, dx \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________