3.379 \(\int \frac{1}{4+4 \cot (x)+\tan (x)} \, dx\)

Optimal. Leaf size=28 \[ \frac{4 x}{25}+\frac{2}{5 (\tan (x)+2)}-\frac{3}{25} \log (\sin (x)+2 \cos (x)) \]

[Out]

(4*x)/25 - (3*Log[2*Cos[x] + Sin[x]])/25 + 2/(5*(2 + Tan[x]))

_______________________________________________________________________________________

Rubi [A]  time = 0.0830554, 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 \[ \frac{4 x}{25}+\frac{2}{5 (\tan (x)+2)}-\frac{3}{25} \log (\sin (x)+2 \cos (x)) \]

Antiderivative was successfully verified.

[In]  Int[(4 + 4*Cot[x] + Tan[x])^(-1),x]

[Out]

(4*x)/25 - (3*Log[2*Cos[x] + Sin[x]])/25 + 2/(5*(2 + Tan[x]))

_______________________________________________________________________________________

Rubi in Sympy [F]  time = 0., size = 0, normalized size = 0. \[ \int \frac{1}{\tan{\left (x \right )} + 4 + \frac{4}{\tan{\left (x \right )}}}\, dx \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  rubi_integrate(1/(4+4*cot(x)+tan(x)),x)

[Out]

Integral(1/(tan(x) + 4 + 4/tan(x)), x)

_______________________________________________________________________________________

Mathematica [A]  time = 0.0660362, 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]  Integrate[(4 + 4*Cot[x] + Tan[x])^(-1),x]

[Out]

(-5 + 4*x + Cot[x]*(8*x - 6*Log[2*Cos[x] + Sin[x]]) - 3*Log[2*Cos[x] + Sin[x]])/
(25 + 50*Cot[x])

_______________________________________________________________________________________

Maple [A]  time = 0.14, size = 29, normalized size = 1. \[{\frac{3\,\ln \left ( 1+ \left ( \tan \left ( x \right ) \right ) ^{2} \right ) }{50}}+{\frac{2}{10+5\,\tan \left ( x \right ) }}-{\frac{3\,\ln \left ( 2+\tan \left ( x \right ) \right ) }{25}}+{\frac{4\,x}{25}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  int(1/(4+4*cot(x)+tan(x)),x)

[Out]

3/50*ln(1+tan(x)^2)+2/5/(2+tan(x))-3/25*ln(2+tan(x))+4/25*x

_______________________________________________________________________________________

Maxima [A]  time = 1.54814, size = 38, normalized size = 1.36 \[ \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 ) \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate(1/(4*cot(x) + tan(x) + 4),x, algorithm="maxima")

[Out]

4/25*x + 2/5/(tan(x) + 2) + 3/50*log(tan(x)^2 + 1) - 3/25*log(tan(x) + 2)

_______________________________________________________________________________________

Fricas [A]  time = 0.221816, size = 62, normalized size = 2.21 \[ -\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 )}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate(1/(4*cot(x) + tan(x) + 4),x, algorithm="fricas")

[Out]

-1/50*(3*(tan(x) + 2)*log((tan(x)^2 + 4*tan(x) + 4)/(tan(x)^2 + 1)) - 8*(x - 1)*
tan(x) - 16*x - 4)/(tan(x) + 2)

_______________________________________________________________________________________

Sympy [A]  time = 0.927537, size = 102, normalized size = 3.64 \[ \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{20}{50 \tan{\left (x \right )} + 100} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate(1/(4+4*cot(x)+tan(x)),x)

[Out]

8*x*tan(x)/(50*tan(x) + 100) + 16*x/(50*tan(x) + 100) - 6*log(tan(x) + 2)*tan(x)
/(50*tan(x) + 100) - 12*log(tan(x) + 2)/(50*tan(x) + 100) + 3*log(tan(x)**2 + 1)
*tan(x)/(50*tan(x) + 100) + 6*log(tan(x)**2 + 1)/(50*tan(x) + 100) + 20/(50*tan(
x) + 100)

_______________________________________________________________________________________

GIAC/XCAS [A]  time = 0.206758, size = 39, normalized size = 1.39 \[ \frac{4}{25} \, x + \frac{2}{5 \,{\left (\tan \left (x\right ) + 2\right )}} + \frac{3}{50} \,{\rm ln}\left (\tan \left (x\right )^{2} + 1\right ) - \frac{3}{25} \,{\rm ln}\left ({\left | \tan \left (x\right ) + 2 \right |}\right ) \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate(1/(4*cot(x) + tan(x) + 4),x, algorithm="giac")

[Out]

4/25*x + 2/5/(tan(x) + 2) + 3/50*ln(tan(x)^2 + 1) - 3/25*ln(abs(tan(x) + 2))