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} \]

________________________________________________________________________________________

Rubi [A]  time = 0.03, antiderivative size = 15, normalized size of antiderivative = 1.00, 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 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]

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]

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.01, size = 15, normalized size = 1.00 \[ \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)

________________________________________________________________________________________

IntegrateAlgebraic [F]  time = 0.00, size = 0, normalized size = 0.00 \[ \int \frac {\cos (x)}{a^2+b^2 \sin ^2(x)} \, dx \]

Verification is Not applicable to the result.

[In]

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

[Out]

Could not integrate

________________________________________________________________________________________

fricas [A]  time = 1.06, size = 15, normalized size = 1.00 \[ \frac {\arctan \left (\frac {b \sin \relax (x)}{a}\right )}{a b} \]

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)

________________________________________________________________________________________

giac [A]  time = 0.88, size = 15, normalized size = 1.00 \[ \frac {\arctan \left (\frac {b \sin \relax (x)}{a}\right )}{a b} \]

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)

________________________________________________________________________________________

maple [A]  time = 0.13, size = 16, normalized size = 1.07




method result size



derivativedivides \(\frac {\arctan \left (\frac {b \sin \relax (x )}{a}\right )}{a b}\) \(16\)
default \(\frac {\arctan \left (\frac {b \sin \relax (x )}{a}\right )}{a b}\) \(16\)
risch \(\frac {i \ln \left ({\mathrm e}^{2 i x}-\frac {2 a \,{\mathrm e}^{i x}}{b}-1\right )}{2 b a}-\frac {i \ln \left ({\mathrm e}^{2 i x}+\frac {2 a \,{\mathrm e}^{i x}}{b}-1\right )}{2 b a}\) \(58\)



Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

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

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)

________________________________________________________________________________________

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

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

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

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)), (-1/(b**2*sin(x)), Eq(a, 0)), (sin(x)/a**2, Eq(b, 0)), (atan(b*si
n(x)/a)/(a*b), True))

________________________________________________________________________________________