\(\int \frac {3}{5-4 \cos (x)} \, dx\) [1]

   Optimal result
   Rubi [A] (verified)
   Mathematica [A] (verified)
   Maple [A] (verified)
   Fricas [A] (verification not implemented)
   Sympy [A] (verification not implemented)
   Maxima [A] (verification not implemented)
   Giac [A] (verification not implemented)
   Mupad [B] (verification not implemented)

Optimal result

Integrand size = 10, antiderivative size = 16 \[ \int \frac {3}{5-4 \cos (x)} \, dx=x+2 \arctan \left (\frac {\sin (x)}{2-\cos (x)}\right ) \]

[Out]

x+2*arctan(sin(x)/(2-cos(x)))

Rubi [A] (verified)

Time = 0.01 (sec) , antiderivative size = 16, normalized size of antiderivative = 1.00, number of steps used = 2, number of rules used = 2, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.200, Rules used = {12, 2736} \[ \int \frac {3}{5-4 \cos (x)} \, dx=2 \arctan \left (\frac {\sin (x)}{2-\cos (x)}\right )+x \]

[In]

Int[3/(5 - 4*Cos[x]),x]

[Out]

x + 2*ArcTan[Sin[x]/(2 - Cos[x])]

Rule 12

Int[(a_)*(u_), x_Symbol] :> Dist[a, Int[u, x], x] /; FreeQ[a, x] &&  !MatchQ[u, (b_)*(v_) /; FreeQ[b, x]]

Rule 2736

Int[((a_) + (b_.)*sin[(c_.) + (d_.)*(x_)])^(-1), x_Symbol] :> With[{q = Rt[a^2 - b^2, 2]}, Simp[x/q, x] + Simp
[(2/(d*q))*ArcTan[b*(Cos[c + d*x]/(a + q + b*Sin[c + d*x]))], x]] /; FreeQ[{a, b, c, d}, x] && GtQ[a^2 - b^2,
0] && PosQ[a]

Rubi steps \begin{align*} \text {integral}& = 3 \int \frac {1}{5-4 \cos (x)} \, dx \\ & = x+2 \arctan \left (\frac {\sin (x)}{2-\cos (x)}\right ) \\ \end{align*}

Mathematica [A] (verified)

Time = 0.03 (sec) , antiderivative size = 11, normalized size of antiderivative = 0.69 \[ \int \frac {3}{5-4 \cos (x)} \, dx=2 \arctan \left (3 \tan \left (\frac {x}{2}\right )\right ) \]

[In]

Integrate[3/(5 - 4*Cos[x]),x]

[Out]

2*ArcTan[3*Tan[x/2]]

Maple [A] (verified)

Time = 0.24 (sec) , antiderivative size = 10, normalized size of antiderivative = 0.62

method result size
default \(2 \arctan \left (3 \tan \left (\frac {x}{2}\right )\right )\) \(10\)
risch \(-i \ln \left ({\mathrm e}^{i x}-\frac {1}{2}\right )+i \ln \left ({\mathrm e}^{i x}-2\right )\) \(24\)
parallelrisch \(-i \left (\ln \left (3 \tan \left (\frac {x}{2}\right )-i\right )-\ln \left (3 \tan \left (\frac {x}{2}\right )+i\right )\right )\) \(27\)

[In]

int(3/(5-4*cos(x)),x,method=_RETURNVERBOSE)

[Out]

2*arctan(3*tan(1/2*x))

Fricas [A] (verification not implemented)

none

Time = 0.25 (sec) , antiderivative size = 15, normalized size of antiderivative = 0.94 \[ \int \frac {3}{5-4 \cos (x)} \, dx=-\arctan \left (\frac {5 \, \cos \left (x\right ) - 4}{3 \, \sin \left (x\right )}\right ) \]

[In]

integrate(3/(5-4*cos(x)),x, algorithm="fricas")

[Out]

-arctan(1/3*(5*cos(x) - 4)/sin(x))

Sympy [A] (verification not implemented)

Time = 0.18 (sec) , antiderivative size = 22, normalized size of antiderivative = 1.38 \[ \int \frac {3}{5-4 \cos (x)} \, dx=2 \operatorname {atan}{\left (3 \tan {\left (\frac {x}{2} \right )} \right )} + 2 \pi \left \lfloor {\frac {\frac {x}{2} - \frac {\pi }{2}}{\pi }}\right \rfloor \]

[In]

integrate(3/(5-4*cos(x)),x)

[Out]

2*atan(3*tan(x/2)) + 2*pi*floor((x/2 - pi/2)/pi)

Maxima [A] (verification not implemented)

none

Time = 0.30 (sec) , antiderivative size = 13, normalized size of antiderivative = 0.81 \[ \int \frac {3}{5-4 \cos (x)} \, dx=2 \, \arctan \left (\frac {3 \, \sin \left (x\right )}{\cos \left (x\right ) + 1}\right ) \]

[In]

integrate(3/(5-4*cos(x)),x, algorithm="maxima")

[Out]

2*arctan(3*sin(x)/(cos(x) + 1))

Giac [A] (verification not implemented)

none

Time = 0.28 (sec) , antiderivative size = 14, normalized size of antiderivative = 0.88 \[ \int \frac {3}{5-4 \cos (x)} \, dx=x - 2 \, \arctan \left (\frac {\sin \left (x\right )}{\cos \left (x\right ) - 2}\right ) \]

[In]

integrate(3/(5-4*cos(x)),x, algorithm="giac")

[Out]

x - 2*arctan(sin(x)/(cos(x) - 2))

Mupad [B] (verification not implemented)

Time = 0.26 (sec) , antiderivative size = 18, normalized size of antiderivative = 1.12 \[ \int \frac {3}{5-4 \cos (x)} \, dx=x+2\,\mathrm {atan}\left (3\,\mathrm {tan}\left (\frac {x}{2}\right )\right )-2\,\mathrm {atan}\left (\mathrm {tan}\left (\frac {x}{2}\right )\right ) \]

[In]

int(-3/(4*cos(x) - 5),x)

[Out]

x + 2*atan(3*tan(x/2)) - 2*atan(tan(x/2))