Optimal. Leaf size=20 \[ \sqrt{5} \tan ^{-1}\left (\frac{\cos (x)}{\sqrt{5}}\right )-\cos (x) \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.0517718, antiderivative size = 20, normalized size of antiderivative = 1., number of steps used = 3, number of rules used = 3, integrand size = 15, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.2, Rules used = {4335, 321, 203} \[ \sqrt{5} \tan ^{-1}\left (\frac{\cos (x)}{\sqrt{5}}\right )-\cos (x) \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 4335
Rule 321
Rule 203
Rubi steps
\begin{align*} \int \frac{\cos ^2(x) \sin (x)}{5+\cos ^2(x)} \, dx &=-\operatorname{Subst}\left (\int \frac{x^2}{5+x^2} \, dx,x,\cos (x)\right )\\ &=-\cos (x)+5 \operatorname{Subst}\left (\int \frac{1}{5+x^2} \, dx,x,\cos (x)\right )\\ &=\sqrt{5} \tan ^{-1}\left (\frac{\cos (x)}{\sqrt{5}}\right )-\cos (x)\\ \end{align*}
Mathematica [B] time = 0.16288, size = 82, normalized size = 4.1 \[ \frac{1}{20} \left (-20 \cos (x)+21 \sqrt{5} \tan ^{-1}\left (\frac{1}{\sqrt{5}}-\sqrt{\frac{6}{5}} \tan \left (\frac{x}{2}\right )\right )+21 \sqrt{5} \tan ^{-1}\left (\sqrt{\frac{6}{5}} \tan \left (\frac{x}{2}\right )+\frac{1}{\sqrt{5}}\right )-\sqrt{5} \tan ^{-1}\left (\frac{\cos (x)}{\sqrt{5}}\right )\right ) \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A] time = 0.015, size = 18, normalized size = 0.9 \begin{align*} -\cos \left ( x \right ) +\arctan \left ({\frac{\cos \left ( x \right ) \sqrt{5}}{5}} \right ) \sqrt{5} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A] time = 1.40769, size = 23, normalized size = 1.15 \begin{align*} \sqrt{5} \arctan \left (\frac{1}{5} \, \sqrt{5} \cos \left (x\right )\right ) - \cos \left (x\right ) \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A] time = 1.99236, size = 61, normalized size = 3.05 \begin{align*} \sqrt{5} \arctan \left (\frac{1}{5} \, \sqrt{5} \cos \left (x\right )\right ) - \cos \left (x\right ) \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [A] time = 0.576645, size = 19, normalized size = 0.95 \begin{align*} - \cos{\left (x \right )} + \sqrt{5} \operatorname{atan}{\left (\frac{\sqrt{5} \cos{\left (x \right )}}{5} \right )} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A] time = 1.05913, size = 23, normalized size = 1.15 \begin{align*} \sqrt{5} \arctan \left (\frac{1}{5} \, \sqrt{5} \cos \left (x\right )\right ) - \cos \left (x\right ) \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]