Optimal. Leaf size=20 \[ \sqrt {5} \tan ^{-1}\left (\frac {\cos (x)}{\sqrt {5}}\right )-\cos (x) \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.04, antiderivative size = 20, normalized size of antiderivative = 1.00, number of steps
used = 3, number of rules used = 3, integrand size = 15, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.200, Rules used = {4420, 327, 209}
\begin {gather*} \sqrt {5} \text {ArcTan}\left (\frac {\cos (x)}{\sqrt {5}}\right )-\cos (x) \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 209
Rule 327
Rule 4420
Rubi steps
\begin {align*} \int \frac {\cos ^2(x) \sin (x)}{5+\cos ^2(x)} \, dx &=-\text {Subst}\left (\int \frac {x^2}{5+x^2} \, dx,x,\cos (x)\right )\\ &=-\cos (x)+5 \text {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] Leaf count is larger than twice the leaf count of optimal. \(82\) vs. \(2(20)=40\).
time = 0.12, size = 82, normalized size = 4.10 \begin {gather*} \frac {1}{20} \left (-\sqrt {5} \tan ^{-1}\left (\frac {\cos (x)}{\sqrt {5}}\right )+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 (\frac {1}{\sqrt {5}}+\sqrt {\frac {6}{5}} \tan \left (\frac {x}{2}\right )\right )-20 \cos (x)\right ) \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.04, size = 18, normalized size = 0.90
method | result | size |
derivativedivides | \(-\cos \left (x \right )+\arctan \left (\frac {\cos \left (x \right ) \sqrt {5}}{5}\right ) \sqrt {5}\) | \(18\) |
default | \(-\cos \left (x \right )+\arctan \left (\frac {\cos \left (x \right ) \sqrt {5}}{5}\right ) \sqrt {5}\) | \(18\) |
risch | \(-\frac {{\mathrm e}^{i x}}{2}-\frac {{\mathrm e}^{-i x}}{2}-\frac {i \sqrt {5}\, \ln \left ({\mathrm e}^{2 i x}-2 i \sqrt {5}\, {\mathrm e}^{i x}+1\right )}{2}+\frac {i \sqrt {5}\, \ln \left ({\mathrm e}^{2 i x}+2 i \sqrt {5}\, {\mathrm e}^{i x}+1\right )}{2}\) | \(66\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A]
time = 1.82, size = 17, normalized size = 0.85 \begin {gather*} \sqrt {5} \arctan \left (\frac {1}{5} \, \sqrt {5} \cos \left (x\right )\right ) - \cos \left (x\right ) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 0.69, size = 17, normalized size = 0.85 \begin {gather*} \sqrt {5} \arctan \left (\frac {1}{5} \, \sqrt {5} \cos \left (x\right )\right ) - \cos \left (x\right ) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [A]
time = 0.14, size = 19, normalized size = 0.95 \begin {gather*} - \cos {\left (x \right )} + \sqrt {5} \operatorname {atan}{\left (\frac {\sqrt {5} \cos {\left (x \right )}}{5} \right )} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A]
time = 0.43, size = 17, normalized size = 0.85 \begin {gather*} \sqrt {5} \arctan \left (\frac {1}{5} \, \sqrt {5} \cos \left (x\right )\right ) - \cos \left (x\right ) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 0.06, size = 17, normalized size = 0.85 \begin {gather*} \sqrt {5}\,\mathrm {atan}\left (\frac {\sqrt {5}\,\cos \left (x\right )}{5}\right )-\cos \left (x\right ) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________