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

   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 = 12, antiderivative size = 43 \[ \int \frac {1}{6+3 \cos (x)+4 \sin (x)} \, dx=\frac {x}{\sqrt {11}}+\frac {2 \arctan \left (\frac {4 \cos (x)-3 \sin (x)}{6+\sqrt {11}+3 \cos (x)+4 \sin (x)}\right )}{\sqrt {11}} \]

[Out]

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

Rubi [A] (verified)

Time = 0.04 (sec) , antiderivative size = 43, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 3, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.250, Rules used = {3203, 632, 210} \[ \int \frac {1}{6+3 \cos (x)+4 \sin (x)} \, dx=\frac {2 \arctan \left (\frac {4 \cos (x)-3 \sin (x)}{4 \sin (x)+3 \cos (x)+\sqrt {11}+6}\right )}{\sqrt {11}}+\frac {x}{\sqrt {11}} \]

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

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

Rule 632

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 3203

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*} \text {integral}& = 2 \text {Subst}\left (\int \frac {1}{9+8 x+3 x^2} \, dx,x,\tan \left (\frac {x}{2}\right )\right ) \\ & = -\left (4 \text {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 \arctan \left (\frac {4 \cos (x)-3 \sin (x)}{6+\sqrt {11}+3 \cos (x)+4 \sin (x)}\right )}{\sqrt {11}} \\ \end{align*}

Mathematica [A] (verified)

Time = 0.03 (sec) , antiderivative size = 24, normalized size of antiderivative = 0.56 \[ \int \frac {1}{6+3 \cos (x)+4 \sin (x)} \, dx=\frac {2 \arctan \left (\frac {4+3 \tan \left (\frac {x}{2}\right )}{\sqrt {11}}\right )}{\sqrt {11}} \]

[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] (verified)

Time = 0.21 (sec) , antiderivative size = 20, normalized size of antiderivative = 0.47

method result size
default \(\frac {2 \sqrt {11}\, \arctan \left (\frac {\left (6 \tan \left (\frac {x}{2}\right )+8\right ) \sqrt {11}}{22}\right )}{11}\) \(20\)
risch \(\frac {i \sqrt {11}\, \ln \left ({\mathrm e}^{i x}+\frac {18}{25}+\frac {24 i}{25}+\frac {4 i \sqrt {11}}{25}+\frac {3 \sqrt {11}}{25}\right )}{11}-\frac {i \sqrt {11}\, \ln \left ({\mathrm e}^{i x}+\frac {18}{25}+\frac {24 i}{25}-\frac {4 i \sqrt {11}}{25}-\frac {3 \sqrt {11}}{25}\right )}{11}\) \(56\)

[In]

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

[Out]

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

Fricas [A] (verification not implemented)

none

Time = 0.23 (sec) , antiderivative size = 39, normalized size of antiderivative = 0.91 \[ \int \frac {1}{6+3 \cos (x)+4 \sin (x)} \, dx=-\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 ) \]

[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] (verification not implemented)

Time = 0.21 (sec) , antiderivative size = 42, normalized size of antiderivative = 0.98 \[ \int \frac {1}{6+3 \cos (x)+4 \sin (x)} \, dx=\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} \]

[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

Maxima [A] (verification not implemented)

none

Time = 0.30 (sec) , antiderivative size = 23, normalized size of antiderivative = 0.53 \[ \int \frac {1}{6+3 \cos (x)+4 \sin (x)} \, dx=\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 ) \]

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

Giac [A] (verification not implemented)

none

Time = 0.30 (sec) , antiderivative size = 49, normalized size of antiderivative = 1.14 \[ \int \frac {1}{6+3 \cos (x)+4 \sin (x)} \, dx=\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 )} \]

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

Mupad [B] (verification not implemented)

Time = 0.05 (sec) , antiderivative size = 21, normalized size of antiderivative = 0.49 \[ \int \frac {1}{6+3 \cos (x)+4 \sin (x)} \, dx=\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} \]

[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