3.7 \(\int \frac {3}{5+4 \sin (x)} \, dx\)

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

[Out]

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

________________________________________________________________________________________

Rubi [A]  time = 0.01, antiderivative size = 14, 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 {\cos (x)}{\sin (x)+2}\right ) \]

Antiderivative was successfully verified.

[In]

Int[3/(5 + 4*Sin[x]),x]

[Out]

x + 2*ArcTan[Cos[x]/(2 + Sin[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 \sin (x)} \, dx &=3 \int \frac {1}{5+4 \sin (x)} \, dx\\ &=x+2 \tan ^{-1}\left (\frac {\cos (x)}{2+\sin (x)}\right )\\ \end {align*}

________________________________________________________________________________________

Mathematica [B]  time = 0.02, size = 79, normalized size = 5.64 \[ 3 \left (\frac {1}{3} \tan ^{-1}\left (\frac {2 \sin \left (\frac {x}{2}\right )+\cos \left (\frac {x}{2}\right )}{\sin \left (\frac {x}{2}\right )+2 \cos \left (\frac {x}{2}\right )}\right )-\frac {1}{3} \tan ^{-1}\left (\frac {\sin \left (\frac {x}{2}\right )+2 \cos \left (\frac {x}{2}\right )}{2 \sin \left (\frac {x}{2}\right )+\cos \left (\frac {x}{2}\right )}\right )\right ) \]

Antiderivative was successfully verified.

[In]

Integrate[3/(5 + 4*Sin[x]),x]

[Out]

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

________________________________________________________________________________________

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

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(3/(5+4*sin(x)),x, algorithm="fricas")

[Out]

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

________________________________________________________________________________________

giac [A]  time = 1.14, size = 25, normalized size = 1.79 \[ x + 2 \, \arctan \left (-\frac {2 \, \cos \relax (x) + \sin \relax (x) + 2}{\cos \relax (x) - 2 \, \sin \relax (x) - 4}\right ) \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(3/(5+4*sin(x)),x, algorithm="giac")

[Out]

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

________________________________________________________________________________________

maple [A]  time = 0.03, size = 12, normalized size = 0.86 \[ 2 \arctan \left (\frac {5 \tan \left (\frac {x}{2}\right )}{3}+\frac {4}{3}\right ) \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(3/(5+4*sin(x)),x)

[Out]

2*arctan(5/3*tan(1/2*x)+4/3)

________________________________________________________________________________________

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

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(3/(5+4*sin(x)),x, algorithm="maxima")

[Out]

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

________________________________________________________________________________________

mupad [B]  time = 0.22, size = 20, normalized size = 1.43 \[ x+2\,\mathrm {atan}\left (\frac {5\,\mathrm {tan}\left (\frac {x}{2}\right )}{3}+\frac {4}{3}\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*sin(x) + 5),x)

[Out]

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

________________________________________________________________________________________

sympy [B]  time = 0.27, size = 27, normalized size = 1.93 \[ 2 \operatorname {atan}{\left (\frac {5 \tan {\left (\frac {x}{2} \right )}}{3} + \frac {4}{3} \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*sin(x)),x)

[Out]

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

________________________________________________________________________________________