3.7 \(\int \frac{1}{6+3 \cos (x)+4 \sin (x)} \, dx\)

Optimal. Leaf size=43 \[ \frac{x}{\sqrt{11}}+\frac{2 \tan ^{-1}\left (\frac{4 \cos (x)-3 \sin (x)}{4 \sin (x)+3 \cos (x)+\sqrt{11}+6}\right )}{\sqrt{11}} \]

[Out]

x/Sqrt[11] + (2*ArcTan[(4*Cos[x] - 3*Sin[x])/(6 + Sqrt[11] + 3*Cos[x] + 4*Sin[x])])/Sqrt[11]

________________________________________________________________________________________

Rubi [A]  time = 0.040102, antiderivative size = 43, normalized size of antiderivative = 1., number of steps used = 3, number of rules used = 3, integrand size = 12, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.25, Rules used = {3124, 618, 204} \[ \frac{x}{\sqrt{11}}+\frac{2 \tan ^{-1}\left (\frac{4 \cos (x)-3 \sin (x)}{4 \sin (x)+3 \cos (x)+\sqrt{11}+6}\right )}{\sqrt{11}} \]

Antiderivative was successfully verified.

[In]

Int[(6 + 3*Cos[x] + 4*Sin[x])^(-1),x]

[Out]

x/Sqrt[11] + (2*ArcTan[(4*Cos[x] - 3*Sin[x])/(6 + Sqrt[11] + 3*Cos[x] + 4*Sin[x])])/Sqrt[11]

Rule 3124

Int[(cos[(d_.) + (e_.)*(x_)]*(b_.) + (a_) + (c_.)*sin[(d_.) + (e_.)*(x_)])^(-1), x_Symbol] :> Module[{f = Free
Factors[Tan[(d + e*x)/2], x]}, Dist[(2*f)/e, Subst[Int[1/(a + b + 2*c*f*x + (a - b)*f^2*x^2), x], x, Tan[(d +
e*x)/2]/f], x]] /; FreeQ[{a, b, c, d, e}, x] && NeQ[a^2 - b^2 - c^2, 0]

Rule 618

Int[((a_.) + (b_.)*(x_) + (c_.)*(x_)^2)^(-1), x_Symbol] :> Dist[-2, Subst[Int[1/Simp[b^2 - 4*a*c - x^2, x], x]
, x, b + 2*c*x], x] /; FreeQ[{a, b, c}, x] && NeQ[b^2 - 4*a*c, 0]

Rule 204

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> -Simp[ArcTan[(Rt[-b, 2]*x)/Rt[-a, 2]]/(Rt[-a, 2]*Rt[-b, 2]), x] /
; FreeQ[{a, b}, x] && PosQ[a/b] && (LtQ[a, 0] || LtQ[b, 0])

Rubi steps

\begin{align*} \int \frac{1}{6+3 \cos (x)+4 \sin (x)} \, dx &=2 \operatorname{Subst}\left (\int \frac{1}{9+8 x+3 x^2} \, dx,x,\tan \left (\frac{x}{2}\right )\right )\\ &=-\left (4 \operatorname{Subst}\left (\int \frac{1}{-44-x^2} \, dx,x,8+6 \tan \left (\frac{x}{2}\right )\right )\right )\\ &=\frac{x}{\sqrt{11}}+\frac{2 \tan ^{-1}\left (\frac{4 \cos (x)-3 \sin (x)}{6+\sqrt{11}+3 \cos (x)+4 \sin (x)}\right )}{\sqrt{11}}\\ \end{align*}

Mathematica [A]  time = 0.026355, size = 24, normalized size = 0.56 \[ \frac{2 \tan ^{-1}\left (\frac{3 \tan \left (\frac{x}{2}\right )+4}{\sqrt{11}}\right )}{\sqrt{11}} \]

Antiderivative was successfully verified.

[In]

Integrate[(6 + 3*Cos[x] + 4*Sin[x])^(-1),x]

[Out]

(2*ArcTan[(4 + 3*Tan[x/2])/Sqrt[11]])/Sqrt[11]

________________________________________________________________________________________

Maple [A]  time = 0.03, size = 20, normalized size = 0.5 \begin{align*}{\frac{2\,\sqrt{11}}{11}\arctan \left ({\frac{\sqrt{11}}{22} \left ( 6\,\tan \left ( x/2 \right ) +8 \right ) } \right ) } \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(1/(6+3*cos(x)+4*sin(x)),x)

[Out]

2/11*11^(1/2)*arctan(1/22*(6*tan(1/2*x)+8)*11^(1/2))

________________________________________________________________________________________

Maxima [A]  time = 1.42151, size = 31, normalized size = 0.72 \begin{align*} \frac{2}{11} \, \sqrt{11} \arctan \left (\frac{1}{11} \, \sqrt{11}{\left (\frac{3 \, \sin \left (x\right )}{\cos \left (x\right ) + 1} + 4\right )}\right ) \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(1/(6+3*cos(x)+4*sin(x)),x, algorithm="maxima")

[Out]

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

________________________________________________________________________________________

Fricas [A]  time = 1.89124, size = 146, normalized size = 3.4 \begin{align*} -\frac{1}{11} \, \sqrt{11} \arctan \left (-\frac{18 \, \sqrt{11} \cos \left (x\right ) + 24 \, \sqrt{11} \sin \left (x\right ) + 25 \, \sqrt{11}}{11 \,{\left (4 \, \cos \left (x\right ) - 3 \, \sin \left (x\right )\right )}}\right ) \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(1/(6+3*cos(x)+4*sin(x)),x, algorithm="fricas")

[Out]

-1/11*sqrt(11)*arctan(-1/11*(18*sqrt(11)*cos(x) + 24*sqrt(11)*sin(x) + 25*sqrt(11))/(4*cos(x) - 3*sin(x)))

________________________________________________________________________________________

Sympy [A]  time = 0.516389, size = 42, normalized size = 0.98 \begin{align*} \frac{2 \sqrt{11} \left (\operatorname{atan}{\left (\frac{3 \sqrt{11} \tan{\left (\frac{x}{2} \right )}}{11} + \frac{4 \sqrt{11}}{11} \right )} + \pi \left \lfloor{\frac{\frac{x}{2} - \frac{\pi }{2}}{\pi }}\right \rfloor \right )}{11} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(1/(6+3*cos(x)+4*sin(x)),x)

[Out]

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

________________________________________________________________________________________

Giac [A]  time = 1.09596, size = 66, normalized size = 1.53 \begin{align*} \frac{1}{11} \, \sqrt{11}{\left (x + 2 \, \arctan \left (-\frac{\sqrt{11} \sin \left (x\right ) - 4 \, \cos \left (x\right ) - 3 \, \sin \left (x\right ) - 4}{\sqrt{11} \cos \left (x\right ) + \sqrt{11} - 3 \, \cos \left (x\right ) + 4 \, \sin \left (x\right ) + 3}\right )\right )} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(1/(6+3*cos(x)+4*sin(x)),x, algorithm="giac")

[Out]

1/11*sqrt(11)*(x + 2*arctan(-(sqrt(11)*sin(x) - 4*cos(x) - 3*sin(x) - 4)/(sqrt(11)*cos(x) + sqrt(11) - 3*cos(x
) + 4*sin(x) + 3)))