Optimal. Leaf size=28 \[ \frac{4 x}{25}+\frac{2}{5 (\tan (x)+2)}-\frac{3}{25} \log (\sin (x)+2 \cos (x)) \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.0407054, antiderivative size = 28, normalized size of antiderivative = 1., number of steps used = 6, number of rules used = 4, integrand size = 10, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.4, Rules used = {801, 635, 203, 260} \[ \frac{4 x}{25}+\frac{2}{5 (\tan (x)+2)}-\frac{3}{25} \log (\sin (x)+2 \cos (x)) \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 801
Rule 635
Rule 203
Rule 260
Rubi steps
\begin{align*} \int \frac{1}{4+4 \cot (x)+\tan (x)} \, dx &=\operatorname{Subst}\left (\int \frac{x}{(2+x)^2 \left (1+x^2\right )} \, dx,x,\tan (x)\right )\\ &=\operatorname{Subst}\left (\int \left (-\frac{2}{5 (2+x)^2}-\frac{3}{25 (2+x)}+\frac{4+3 x}{25 \left (1+x^2\right )}\right ) \, dx,x,\tan (x)\right )\\ &=-\frac{3}{25} \log (2+\tan (x))+\frac{2}{5 (2+\tan (x))}+\frac{1}{25} \operatorname{Subst}\left (\int \frac{4+3 x}{1+x^2} \, dx,x,\tan (x)\right )\\ &=-\frac{3}{25} \log (2+\tan (x))+\frac{2}{5 (2+\tan (x))}+\frac{3}{25} \operatorname{Subst}\left (\int \frac{x}{1+x^2} \, dx,x,\tan (x)\right )+\frac{4}{25} \operatorname{Subst}\left (\int \frac{1}{1+x^2} \, dx,x,\tan (x)\right )\\ &=\frac{4 x}{25}-\frac{3}{25} \log (\cos (x))-\frac{3}{25} \log (2+\tan (x))+\frac{2}{5 (2+\tan (x))}\\ \end{align*}
Mathematica [A] time = 0.0404914, size = 41, normalized size = 1.46 \[ \frac{4 x-3 \log (\sin (x)+2 \cos (x))+\cot (x) (8 x-6 \log (\sin (x)+2 \cos (x)))-5}{50 \cot (x)+25} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A] time = 0.1, size = 29, normalized size = 1. \begin{align*}{\frac{2}{10+5\,\tan \left ( x \right ) }}-{\frac{3\,\ln \left ( 2+\tan \left ( x \right ) \right ) }{25}}+{\frac{3\,\ln \left ( \left ( \tan \left ( x \right ) \right ) ^{2}+1 \right ) }{50}}+{\frac{4\,x}{25}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A] time = 1.42053, size = 38, normalized size = 1.36 \begin{align*} \frac{4}{25} \, x + \frac{2}{5 \,{\left (\tan \left (x\right ) + 2\right )}} + \frac{3}{50} \, \log \left (\tan \left (x\right )^{2} + 1\right ) - \frac{3}{25} \, \log \left (\tan \left (x\right ) + 2\right ) \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [B] time = 2.16238, size = 153, normalized size = 5.46 \begin{align*} -\frac{3 \,{\left (\tan \left (x\right ) + 2\right )} \log \left (\frac{\tan \left (x\right )^{2} + 4 \, \tan \left (x\right ) + 4}{\tan \left (x\right )^{2} + 1}\right ) - 8 \,{\left (x - 1\right )} \tan \left (x\right ) - 16 \, x - 4}{50 \,{\left (\tan \left (x\right ) + 2\right )}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [B] time = 0.510224, size = 105, normalized size = 3.75 \begin{align*} \frac{8 x \tan{\left (x \right )}}{50 \tan{\left (x \right )} + 100} + \frac{16 x}{50 \tan{\left (x \right )} + 100} - \frac{6 \log{\left (\tan{\left (x \right )} + 2 \right )} \tan{\left (x \right )}}{50 \tan{\left (x \right )} + 100} - \frac{12 \log{\left (\tan{\left (x \right )} + 2 \right )}}{50 \tan{\left (x \right )} + 100} + \frac{3 \log{\left (\tan ^{2}{\left (x \right )} + 1 \right )} \tan{\left (x \right )}}{50 \tan{\left (x \right )} + 100} + \frac{6 \log{\left (\tan ^{2}{\left (x \right )} + 1 \right )}}{50 \tan{\left (x \right )} + 100} - \frac{10 \tan{\left (x \right )}}{50 \tan{\left (x \right )} + 100} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A] time = 1.11721, size = 39, normalized size = 1.39 \begin{align*} \frac{4}{25} \, x + \frac{2}{5 \,{\left (\tan \left (x\right ) + 2\right )}} + \frac{3}{50} \, \log \left (\tan \left (x\right )^{2} + 1\right ) - \frac{3}{25} \, \log \left ({\left | \tan \left (x\right ) + 2 \right |}\right ) \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]