Optimal. Leaf size=45 \[ \frac {x}{2 \sqrt {5}}+\frac {\tan ^{-1}\left (\frac {\sin (x)+2 \cos (x)}{2 \sin (x)-\cos (x)+2 \sqrt {5}+5}\right )}{\sqrt {5}} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.02, antiderivative size = 45, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 3, integrand size = 12, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.250, Rules used = {3124, 618, 204} \[ \frac {x}{2 \sqrt {5}}+\frac {\tan ^{-1}\left (\frac {\sin (x)+2 \cos (x)}{2 \sin (x)-\cos (x)+2 \sqrt {5}+5}\right )}{\sqrt {5}} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 204
Rule 618
Rule 3124
Rubi steps
\begin {align*} \int \frac {1}{5-\cos (x)+2 \sin (x)} \, dx &=2 \operatorname {Subst}\left (\int \frac {1}{4+4 x+6 x^2} \, dx,x,\tan \left (\frac {x}{2}\right )\right )\\ &=-\left (4 \operatorname {Subst}\left (\int \frac {1}{-80-x^2} \, dx,x,4+12 \tan \left (\frac {x}{2}\right )\right )\right )\\ &=\frac {x}{2 \sqrt {5}}+\frac {\tan ^{-1}\left (\frac {2 \cos (x)+\sin (x)}{5+2 \sqrt {5}-\cos (x)+2 \sin (x)}\right )}{\sqrt {5}}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A] time = 0.03, size = 23, normalized size = 0.51 \[ \frac {\tan ^{-1}\left (\frac {3 \tan \left (\frac {x}{2}\right )+1}{\sqrt {5}}\right )}{\sqrt {5}} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 0.42, size = 36, normalized size = 0.80 \[ \frac {1}{10} \, \sqrt {5} \arctan \left (-\frac {\sqrt {5} \cos \relax (x) - 2 \, \sqrt {5} \sin \relax (x) - \sqrt {5}}{2 \, {\left (2 \, \cos \relax (x) + \sin \relax (x)\right )}}\right ) \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [A] time = 0.01, size = 47, normalized size = 1.04 \[ \frac {1}{10} \, \sqrt {5} {\left (x + 2 \, \arctan \left (-\frac {\sqrt {5} \sin \relax (x) - \cos \relax (x) - 3 \, \sin \relax (x) - 1}{\sqrt {5} \cos \relax (x) + \sqrt {5} - 3 \, \cos \relax (x) + \sin \relax (x) + 3}\right )\right )} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 0.06, size = 20, normalized size = 0.44 \[ \frac {\sqrt {5}\, \arctan \left (\frac {\left (6 \tan \left (\frac {x}{2}\right )+2\right ) \sqrt {5}}{10}\right )}{5} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [A] time = 1.27, size = 23, normalized size = 0.51 \[ \frac {1}{5} \, \sqrt {5} \arctan \left (\frac {1}{5} \, \sqrt {5} {\left (\frac {3 \, \sin \relax (x)}{\cos \relax (x) + 1} + 1\right )}\right ) \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 0.10, size = 21, normalized size = 0.47 \[ \frac {\sqrt {20}\,\mathrm {atan}\left (\frac {3\,\sqrt {20}\,\mathrm {tan}\left (\frac {x}{2}\right )}{10}+\frac {\sqrt {20}}{10}\right )}{10} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [A] time = 0.49, size = 39, normalized size = 0.87 \[ \frac {\sqrt {5} \left (\operatorname {atan}{\left (\frac {3 \sqrt {5} \tan {\left (\frac {x}{2} \right )}}{5} + \frac {\sqrt {5}}{5} \right )} + \pi \left \lfloor {\frac {\frac {x}{2} - \frac {\pi }{2}}{\pi }}\right \rfloor \right )}{5} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________