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

Optimal. Leaf size=18 \[ -\frac{\log \left (a^2+b^2 \cos ^2(x)\right )}{b^2} \]

[Out]

-(Log[a^2 + b^2*Cos[x]^2]/b^2)

________________________________________________________________________________________

Rubi [A]  time = 0.0404996, antiderivative size = 22, normalized size of antiderivative = 1.22, number of steps used = 3, number of rules used = 2, integrand size = 19, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.105, Rules used = {12, 260} \[ -\frac{\log \left (a^2-b^2 \sin ^2(x)+b^2\right )}{b^2} \]

Antiderivative was successfully verified.

[In]

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

[Out]

-(Log[a^2 + b^2 - b^2*Sin[x]^2]/b^2)

Rule 12

Int[(a_)*(u_), x_Symbol] :> Dist[a, Int[u, x], x] /; FreeQ[a, x] &&  !MatchQ[u, (b_)*(v_) /; FreeQ[b, x]]

Rule 260

Int[(x_)^(m_.)/((a_) + (b_.)*(x_)^(n_)), x_Symbol] :> Simp[Log[RemoveContent[a + b*x^n, x]]/(b*n), x] /; FreeQ
[{a, b, m, n}, x] && EqQ[m, n - 1]

Rubi steps

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

Mathematica [A]  time = 0.0150171, size = 22, normalized size = 1.22 \[ -\frac{\log \left (a^2-b^2 \sin ^2(x)+b^2\right )}{b^2} \]

Antiderivative was successfully verified.

[In]

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

[Out]

-(Log[a^2 + b^2 - b^2*Sin[x]^2]/b^2)

________________________________________________________________________________________

Maple [A]  time = 0.016, size = 19, normalized size = 1.1 \begin{align*} -{\frac{\ln \left ({a}^{2}+{b}^{2} \left ( \cos \left ( x \right ) \right ) ^{2} \right ) }{{b}^{2}}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

-ln(a^2+b^2*cos(x)^2)/b^2

________________________________________________________________________________________

Maxima [A]  time = 0.928581, size = 24, normalized size = 1.33 \begin{align*} -\frac{\log \left (b^{2} \cos \left (x\right )^{2} + a^{2}\right )}{b^{2}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

-log(b^2*cos(x)^2 + a^2)/b^2

________________________________________________________________________________________

Fricas [A]  time = 2.37374, size = 41, normalized size = 2.28 \begin{align*} -\frac{\log \left (b^{2} \cos \left (x\right )^{2} + a^{2}\right )}{b^{2}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

-log(b^2*cos(x)^2 + a^2)/b^2

________________________________________________________________________________________

Sympy [A]  time = 3.0342, size = 34, normalized size = 1.89 \begin{align*} 2 \left (\begin{cases} - \frac{\cos ^{2}{\left (x \right )}}{2 a^{2}} & \text{for}\: b^{2} = 0 \\- \frac{\log{\left (a^{2} + b^{2} \cos ^{2}{\left (x \right )} \right )}}{2 b^{2}} & \text{otherwise} \end{cases}\right ) \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

2*Piecewise((-cos(x)**2/(2*a**2), Eq(b**2, 0)), (-log(a**2 + b**2*cos(x)**2)/(2*b**2), True))

________________________________________________________________________________________

Giac [B]  time = 1.07439, size = 130, normalized size = 7.22 \begin{align*} -\frac{\log \left (a^{2} + b^{2} - \frac{2 \, a^{2}{\left (\cos \left (x\right ) - 1\right )}}{\cos \left (x\right ) + 1} + \frac{2 \, b^{2}{\left (\cos \left (x\right ) - 1\right )}}{\cos \left (x\right ) + 1} + \frac{a^{2}{\left (\cos \left (x\right ) - 1\right )}^{2}}{{\left (\cos \left (x\right ) + 1\right )}^{2}} + \frac{b^{2}{\left (\cos \left (x\right ) - 1\right )}^{2}}{{\left (\cos \left (x\right ) + 1\right )}^{2}}\right )}{b^{2}} + \frac{2 \, \log \left (-\frac{\cos \left (x\right ) - 1}{\cos \left (x\right ) + 1} + 1\right )}{b^{2}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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