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

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

[Out]

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

________________________________________________________________________________________

Rubi [A]  time = 0.0260214, antiderivative size = 15, normalized size of antiderivative = 1., number of steps used = 2, number of rules used = 2, integrand size = 17, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.118, Rules used = {3190, 205} \[ \frac{\tan ^{-1}\left (\frac{b \sin (x)}{a}\right )}{a b} \]

Antiderivative was successfully verified.

[In]

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

[Out]

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

Rule 3190

Int[cos[(e_.) + (f_.)*(x_)]^(m_.)*((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)]^2)^(p_.), x_Symbol] :> With[{ff = Free
Factors[Sin[e + f*x], x]}, Dist[ff/f, Subst[Int[(1 - ff^2*x^2)^((m - 1)/2)*(a + b*ff^2*x^2)^p, x], x, Sin[e +
f*x]/ff], x]] /; FreeQ[{a, b, e, f, p}, x] && IntegerQ[(m - 1)/2]

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{\cos (x)}{a^2+b^2 \sin ^2(x)} \, dx &=\operatorname{Subst}\left (\int \frac{1}{a^2+b^2 x^2} \, dx,x,\sin (x)\right )\\ &=\frac{\tan ^{-1}\left (\frac{b \sin (x)}{a}\right )}{a b}\\ \end{align*}

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

Antiderivative was successfully verified.

[In]

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

[Out]

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

________________________________________________________________________________________

Maple [A]  time = 0.013, size = 16, normalized size = 1.1 \begin{align*}{\frac{1}{ab}\arctan \left ({\frac{b\sin \left ( x \right ) }{a}} \right ) } \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

Maxima [A]  time = 1.4175, size = 20, normalized size = 1.33 \begin{align*} \frac{\arctan \left (\frac{b \sin \left (x\right )}{a}\right )}{a b} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

Fricas [A]  time = 2.09921, size = 35, normalized size = 2.33 \begin{align*} \frac{\arctan \left (\frac{b \sin \left (x\right )}{a}\right )}{a b} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

Sympy [A]  time = 0.715625, size = 31, normalized size = 2.07 \begin{align*} \begin{cases} \frac{\tilde{\infty }}{\sin{\left (x \right )}} & \text{for}\: a = 0 \wedge b = 0 \\\frac{\sin{\left (x \right )}}{a^{2}} & \text{for}\: b = 0 \\- \frac{1}{b^{2} \sin{\left (x \right )}} & \text{for}\: a = 0 \\\frac{\operatorname{atan}{\left (\frac{b \sin{\left (x \right )}}{a} \right )}}{a b} & \text{otherwise} \end{cases} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

Piecewise((zoo/sin(x), Eq(a, 0) & Eq(b, 0)), (sin(x)/a**2, Eq(b, 0)), (-1/(b**2*sin(x)), Eq(a, 0)), (atan(b*si
n(x)/a)/(a*b), True))

________________________________________________________________________________________

Giac [A]  time = 1.05471, size = 20, normalized size = 1.33 \begin{align*} \frac{\arctan \left (\frac{b \sin \left (x\right )}{a}\right )}{a b} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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