3.1 \(\int \frac {3}{5-4 \cos (x)} \, dx\)

Optimal. Leaf size=16 \[ x+2 \tan ^{-1}\left (\frac {\sin (x)}{2-\cos (x)}\right ) \]

[Out]

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

________________________________________________________________________________________

Rubi [A]  time = 0.01, antiderivative size = 16, normalized size of antiderivative = 1.00, number of steps used = 2, number of rules used = 2, integrand size = 10, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.200, Rules used = {12, 2657} \[ x+2 \tan ^{-1}\left (\frac {\sin (x)}{2-\cos (x)}\right ) \]

Antiderivative was successfully verified.

[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 2657

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

Rubi steps

\begin {align*} \int \frac {3}{5-4 \cos (x)} \, dx &=3 \int \frac {1}{5-4 \cos (x)} \, dx\\ &=x+2 \tan ^{-1}\left (\frac {\sin (x)}{2-\cos (x)}\right )\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]  time = 0.02, size = 11, normalized size = 0.69 \[ 2 \tan ^{-1}\left (3 \tan \left (\frac {x}{2}\right )\right ) \]

Antiderivative was successfully verified.

[In]

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

[Out]

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

________________________________________________________________________________________

fricas [A]  time = 0.45, size = 15, normalized size = 0.94 \[ -\arctan \left (\frac {5 \, \cos \relax (x) - 4}{3 \, \sin \relax (x)}\right ) \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

giac [A]  time = 1.00, size = 14, normalized size = 0.88 \[ x - 2 \, \arctan \left (\frac {\sin \relax (x)}{\cos \relax (x) - 2}\right ) \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

maple [A]  time = 0.02, size = 10, normalized size = 0.62 \[ 2 \arctan \left (3 \tan \left (\frac {x}{2}\right )\right ) \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

maxima [A]  time = 1.07, size = 13, normalized size = 0.81 \[ 2 \, \arctan \left (\frac {3 \, \sin \relax (x)}{\cos \relax (x) + 1}\right ) \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

mupad [B]  time = 0.27, size = 18, normalized size = 1.12 \[ 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 ) \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

sympy [A]  time = 0.25, size = 22, normalized size = 1.38 \[ 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 \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________