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

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

[Out]

1/3*x+1/3*arctan(2*cos(x)*sin(x)/(1+2*sin(x)^2))

________________________________________________________________________________________

Rubi [A]
time = 0.02, antiderivative size = 27, normalized size of antiderivative = 1.00, 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 = {209} \begin {gather*} \frac {1}{3} \text {ArcTan}\left (\frac {2 \sin (x) \cos (x)}{2 \sin ^2(x)+1}\right )+\frac {x}{3} \end {gather*}

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 209

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(1/(Rt[a, 2]*Rt[b, 2]))*ArcTan[Rt[b, 2]*(x/Rt[a, 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 &=\text {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.02, size = 9, normalized size = 0.33 \begin {gather*} \frac {1}{3} \tan ^{-1}(3 \tan (x)) \end {gather*}

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.06, size = 8, normalized size = 0.30

method result size
default \(\frac {\arctan \left (3 \tan \left (x \right )\right )}{3}\) \(8\)
risch \(-\frac {i \ln \left ({\mathrm e}^{2 i x}-\frac {1}{2}\right )}{6}+\frac {i \ln \left ({\mathrm e}^{2 i x}-2\right )}{6}\) \(24\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

Maxima [A]
time = 3.37, size = 7, normalized size = 0.26 \begin {gather*} \frac {1}{3} \, \arctan \left (3 \, \tan \left (x\right )\right ) \end {gather*}

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 = 1.27, size = 21, normalized size = 0.78 \begin {gather*} -\frac {1}{6} \, \arctan \left (\frac {10 \, \cos \left (x\right )^{2} - 9}{6 \, \cos \left (x\right ) \sin \left (x\right )}\right ) \end {gather*}

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] Leaf count of result is larger than twice the leaf count of optimal. 219 vs. \(2 (22) = 44\).
time = 4.84, size = 219, normalized size = 8.11 \begin {gather*} \frac {4478554083 \sqrt {17 - 12 \sqrt {2}} \left (\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 \right )}{2305195203 + 1630019160 \sqrt {2}} + \frac {3166815962 \sqrt {2} \sqrt {17 - 12 \sqrt {2}} \left (\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 \right )}{2305195203 + 1630019160 \sqrt {2}} + \frac {131836323 \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 )}{2305195203 + 1630019160 \sqrt {2}} + \frac {93222358 \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 )}{2305195203 + 1630019160 \sqrt {2}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

4478554083*sqrt(17 - 12*sqrt(2))*(atan(tan(x/2)/sqrt(17 - 12*sqrt(2))) + pi*floor((x/2 - pi/2)/pi))/(230519520
3 + 1630019160*sqrt(2)) + 3166815962*sqrt(2)*sqrt(17 - 12*sqrt(2))*(atan(tan(x/2)/sqrt(17 - 12*sqrt(2))) + pi*
floor((x/2 - pi/2)/pi))/(2305195203 + 1630019160*sqrt(2)) + 131836323*sqrt(12*sqrt(2) + 17)*(atan(tan(x/2)/sqr
t(12*sqrt(2) + 17)) + pi*floor((x/2 - pi/2)/pi))/(2305195203 + 1630019160*sqrt(2)) + 93222358*sqrt(2)*sqrt(12*
sqrt(2) + 17)*(atan(tan(x/2)/sqrt(12*sqrt(2) + 17)) + pi*floor((x/2 - pi/2)/pi))/(2305195203 + 1630019160*sqrt
(2))

________________________________________________________________________________________

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

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

________________________________________________________________________________________

Mupad [B]
time = 0.28, size = 16, normalized size = 0.59 \begin {gather*} \frac {x}{3}-\frac {\mathrm {atan}\left (\mathrm {tan}\left (x\right )\right )}{3}+\frac {\mathrm {atan}\left (3\,\mathrm {tan}\left (x\right )\right )}{3} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

x/3 - atan(tan(x))/3 + atan(3*tan(x))/3

________________________________________________________________________________________