3.378 \(\int \frac{1}{4-3 \cos ^2(x)+5 \sin ^2(x)} \, dx\)

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

[Out]

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

________________________________________________________________________________________

Rubi [A]  time = 0.021039, antiderivative size = 27, normalized size of antiderivative = 1., number of steps used = 2, number of rules used = 1, integrand size = 16, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.062, Rules used = {203} \[ \frac{x}{3}+\frac{1}{3} \tan ^{-1}\left (\frac{2 \sin (x) \cos (x)}{2 \sin ^2(x)+1}\right ) \]

Antiderivative was successfully verified.

[In]

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

[Out]

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

Rule 203

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

Rubi steps

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

Mathematica [A]  time = 0.0214716, size = 9, normalized size = 0.33 \[ \frac{1}{3} \tan ^{-1}(3 \tan (x)) \]

Antiderivative was successfully verified.

[In]

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

[Out]

ArcTan[3*Tan[x]]/3

________________________________________________________________________________________

Maple [A]  time = 0.026, size = 8, normalized size = 0.3 \begin{align*}{\frac{\arctan \left ( 3\,\tan \left ( x \right ) \right ) }{3}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(1/(4-3*cos(x)^2+5*sin(x)^2),x)

[Out]

1/3*arctan(3*tan(x))

________________________________________________________________________________________

Maxima [A]  time = 1.41616, size = 9, normalized size = 0.33 \begin{align*} \frac{1}{3} \, \arctan \left (3 \, \tan \left (x\right )\right ) \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(1/(4-3*cos(x)^2+5*sin(x)^2),x, algorithm="maxima")

[Out]

1/3*arctan(3*tan(x))

________________________________________________________________________________________

Fricas [A]  time = 2.14946, size = 70, normalized size = 2.59 \begin{align*} -\frac{1}{6} \, \arctan \left (\frac{10 \, \cos \left (x\right )^{2} - 9}{6 \, \cos \left (x\right ) \sin \left (x\right )}\right ) \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(1/(4-3*cos(x)^2+5*sin(x)^2),x, algorithm="fricas")

[Out]

-1/6*arctan(1/6*(10*cos(x)^2 - 9)/(cos(x)*sin(x)))

________________________________________________________________________________________

Sympy [B]  time = 14.4745, size = 148, normalized size = 5.48 \begin{align*} \frac{\operatorname{atan}{\left (\frac{\tan{\left (\frac{x}{2} \right )}}{\sqrt{17 - 12 \sqrt{2}}} \right )} + \pi \left \lfloor{\frac{\frac{x}{2} - \frac{\pi }{2}}{\pi }}\right \rfloor }{6 \sqrt{2} \sqrt{17 - 12 \sqrt{2}} + 9 \sqrt{17 - 12 \sqrt{2}}} + \frac{\sqrt{17 - 12 \sqrt{2}} \sqrt{12 \sqrt{2} + 17} \left (\operatorname{atan}{\left (\frac{\tan{\left (\frac{x}{2} \right )}}{\sqrt{12 \sqrt{2} + 17}} \right )} + \pi \left \lfloor{\frac{\frac{x}{2} - \frac{\pi }{2}}{\pi }}\right \rfloor \right )}{6 \sqrt{2} \sqrt{17 - 12 \sqrt{2}} + 9 \sqrt{17 - 12 \sqrt{2}}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(1/(4-3*cos(x)**2+5*sin(x)**2),x)

[Out]

(atan(tan(x/2)/sqrt(17 - 12*sqrt(2))) + pi*floor((x/2 - pi/2)/pi))/(6*sqrt(2)*sqrt(17 - 12*sqrt(2)) + 9*sqrt(1
7 - 12*sqrt(2))) + sqrt(17 - 12*sqrt(2))*sqrt(12*sqrt(2) + 17)*(atan(tan(x/2)/sqrt(12*sqrt(2) + 17)) + pi*floo
r((x/2 - pi/2)/pi))/(6*sqrt(2)*sqrt(17 - 12*sqrt(2)) + 9*sqrt(17 - 12*sqrt(2)))

________________________________________________________________________________________

Giac [A]  time = 1.1132, size = 27, normalized size = 1. \begin{align*} \frac{1}{3} \, x - \frac{1}{3} \, \arctan \left (\frac{\sin \left (2 \, x\right )}{\cos \left (2 \, x\right ) - 2}\right ) \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(1/(4-3*cos(x)^2+5*sin(x)^2),x, algorithm="giac")

[Out]

1/3*x - 1/3*arctan(sin(2*x)/(cos(2*x) - 2))