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

Optimal. Leaf size=43 \[ \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}} \]

[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]
time = 0.03, 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 = {3203, 632, 210} \begin {gather*} \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}} \end {gather*}

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 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*} \int \frac {1}{6+3 \cos (x)+4 \sin (x)} \, dx &=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 \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.02, size = 24, normalized size = 0.56 \begin {gather*} \frac {2 \tan ^{-1}\left (\frac {4+3 \tan \left (\frac {x}{2}\right )}{\sqrt {11}}\right )}{\sqrt {11}} \end {gather*}

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]

________________________________________________________________________________________

Mathics [C] Result contains higher order function than in optimal. Order 9 vs. order 3 in optimal.
time = 2.21, size = 31, normalized size = 0.72 \begin {gather*} \frac {2 \sqrt {11} \left (\text {Pi} \text {Floor}\left [-\frac {1}{2}+\frac {x}{2 \text {Pi}}\right ]+\text {ArcTan}\left [\frac {\sqrt {11} \left (4+3 \text {Tan}\left [\frac {x}{2}\right ]\right )}{11}\right ]\right )}{11} \end {gather*}

Warning: Unable to verify antiderivative.

[In]

mathics('Integrate[1/(6 + 3*Cos[x] + 4*Sin[x]),x]')

[Out]

2 Sqrt[11] (Pi Floor[-1 / 2 + x / (2 Pi)] + ArcTan[Sqrt[11] (4 + 3 Tan[x / 2]) / 11]) / 11

________________________________________________________________________________________

Maple [A]
time = 0.08, size = 20, normalized size = 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\)

Verification of antiderivative is not currently implemented for this CAS.

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

________________________________________________________________________________________

Maxima [A]
time = 0.33, size = 23, normalized size = 0.53 \begin {gather*} \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 {gather*}

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 = 0.32, size = 39, normalized size = 0.91 \begin {gather*} -\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 {gather*}

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.21, size = 42, normalized size = 0.98 \begin {gather*} \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 {gather*}

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 = 0.00, size = 62, normalized size = 1.44 \begin {gather*} \frac {2\cdot 2 \left (\arctan \left (\frac {-\sqrt {11} \sin x+4 \cos x+3 \sin x+4}{\sqrt {11} \cos x+\sqrt {11}-3 \cos x+4 \sin x+3}\right )+\frac {x}{2}\right )}{2 \sqrt {11}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[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]
time = 0.05, size = 21, normalized size = 0.49 \begin {gather*} \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} \end {gather*}

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

________________________________________________________________________________________