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]

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

________________________________________________________________________________________

Rubi [A]  time = 0.04, antiderivative size = 43, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 3, integrand size = 12, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.250, 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 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])

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 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]

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.03, 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]

________________________________________________________________________________________

fricas [A]  time = 0.49, size = 39, normalized size = 0.91 \[ -\frac {1}{11} \, \sqrt {11} \arctan \left (-\frac {18 \, \sqrt {11} \cos \relax (x) + 24 \, \sqrt {11} \sin \relax (x) + 25 \, \sqrt {11}}{11 \, {\left (4 \, \cos \relax (x) - 3 \, \sin \relax (x)\right )}}\right ) \]

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)))

________________________________________________________________________________________

giac [A]  time = 0.94, size = 49, normalized size = 1.14 \[ \frac {1}{11} \, \sqrt {11} {\left (x + 2 \, \arctan \left (-\frac {\sqrt {11} \sin \relax (x) - 4 \, \cos \relax (x) - 3 \, \sin \relax (x) - 4}{\sqrt {11} \cos \relax (x) + \sqrt {11} - 3 \, \cos \relax (x) + 4 \, \sin \relax (x) + 3}\right )\right )} \]

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)))

________________________________________________________________________________________

maple [A]  time = 0.05, size = 20, normalized size = 0.47 \[ \frac {2 \sqrt {11}\, \arctan \left (\frac {\left (6 \tan \left (\frac {x}{2}\right )+8\right ) \sqrt {11}}{22}\right )}{11} \]

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 = 0.98, size = 23, normalized size = 0.53 \[ \frac {2}{11} \, \sqrt {11} \arctan \left (\frac {1}{11} \, \sqrt {11} {\left (\frac {3 \, \sin \relax (x)}{\cos \relax (x) + 1} + 4\right )}\right ) \]

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))

________________________________________________________________________________________

mupad [B]  time = 0.05, size = 21, normalized size = 0.49 \[ \frac {2\,\sqrt {11}\,\mathrm {atan}\left (\frac {3\,\sqrt {11}\,\mathrm {tan}\left (\frac {x}{2}\right )}{11}+\frac {4\,\sqrt {11}}{11}\right )}{11} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

(2*11^(1/2)*atan((3*11^(1/2)*tan(x/2))/11 + (4*11^(1/2))/11))/11

________________________________________________________________________________________

sympy [A]  time = 0.52, size = 42, normalized size = 0.98 \[ \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} \]

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

________________________________________________________________________________________