3.145 \(\int \frac {1}{b^2 \cos ^2(x)+a^2 \sin ^2(x)} \, dx\)

Optimal. Leaf size=15 \[ \frac {\tan ^{-1}\left (\frac {a \tan (x)}{b}\right )}{a b} \]

[Out]

arctan(a*tan(x)/b)/a/b

________________________________________________________________________________________

Rubi [A]  time = 0.02, antiderivative size = 15, normalized size of antiderivative = 1.00, number of steps used = 2, number of rules used = 1, integrand size = 19, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.053, Rules used = {205} \[ \frac {\tan ^{-1}\left (\frac {a \tan (x)}{b}\right )}{a b} \]

Antiderivative was successfully verified.

[In]

Int[(b^2*Cos[x]^2 + a^2*Sin[x]^2)^(-1),x]

[Out]

ArcTan[(a*Tan[x])/b]/(a*b)

Rule 205

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

Rubi steps

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

________________________________________________________________________________________

Mathematica [A]  time = 0.05, size = 15, normalized size = 1.00 \[ \frac {\tan ^{-1}\left (\frac {a \tan (x)}{b}\right )}{a b} \]

Antiderivative was successfully verified.

[In]

Integrate[(b^2*Cos[x]^2 + a^2*Sin[x]^2)^(-1),x]

[Out]

ArcTan[(a*Tan[x])/b]/(a*b)

________________________________________________________________________________________

fricas [B]  time = 0.45, size = 43, normalized size = 2.87 \[ -\frac {\arctan \left (\frac {{\left (a^{2} + b^{2}\right )} \cos \relax (x)^{2} - a^{2}}{2 \, a b \cos \relax (x) \sin \relax (x)}\right )}{2 \, a b} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(1/(b^2*cos(x)^2+a^2*sin(x)^2),x, algorithm="fricas")

[Out]

-1/2*arctan(1/2*((a^2 + b^2)*cos(x)^2 - a^2)/(a*b*cos(x)*sin(x)))/(a*b)

________________________________________________________________________________________

giac [A]  time = 0.02, size = 26, normalized size = 1.73 \[ \frac {\pi \left \lfloor \frac {x}{\pi } + \frac {1}{2} \right \rfloor + \arctan \left (\frac {a \tan \relax (x)}{b}\right )}{a b} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(1/(b^2*cos(x)^2+a^2*sin(x)^2),x, algorithm="giac")

[Out]

(pi*floor(x/pi + 1/2) + arctan(a*tan(x)/b))/(a*b)

________________________________________________________________________________________

maple [A]  time = 0.07, size = 16, normalized size = 1.07 \[ \frac {\arctan \left (\frac {a \tan \relax (x )}{b}\right )}{a b} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(1/(b^2*cos(x)^2+a^2*sin(x)^2),x)

[Out]

arctan(a*tan(x)/b)/a/b

________________________________________________________________________________________

maxima [A]  time = 1.14, size = 15, normalized size = 1.00 \[ \frac {\arctan \left (\frac {a \tan \relax (x)}{b}\right )}{a b} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(1/(b^2*cos(x)^2+a^2*sin(x)^2),x, algorithm="maxima")

[Out]

arctan(a*tan(x)/b)/(a*b)

________________________________________________________________________________________

mupad [B]  time = 0.46, size = 15, normalized size = 1.00 \[ \frac {\mathrm {atan}\left (\frac {a\,\mathrm {tan}\relax (x)}{b}\right )}{a\,b} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(1/(b^2*cos(x)^2 + a^2*sin(x)^2),x)

[Out]

atan((a*tan(x))/b)/(a*b)

________________________________________________________________________________________

sympy [F(-1)]  time = 0.00, size = 0, normalized size = 0.00 \[ \text {Timed out} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(1/(b**2*cos(x)**2+a**2*sin(x)**2),x)

[Out]

Timed out

________________________________________________________________________________________