Optimal. Leaf size=18 \[ \frac{\log \left (a^2-b^2 \cos ^2(x)\right )}{b^2} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.0423405, antiderivative size = 22, normalized size of antiderivative = 1.22, number of steps used = 3, number of rules used = 2, integrand size = 20, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.1, Rules used = {12, 260} \[ \frac{\log \left (a^2+b^2 \sin ^2(x)-b^2\right )}{b^2} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 12
Rule 260
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.0131116, 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]
[Out]
________________________________________________________________________________________
Maple [A] time = 0.017, 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]
[Out]
________________________________________________________________________________________
Maxima [A] time = 0.925176, size = 26, normalized size = 1.44 \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]
[Out]
________________________________________________________________________________________
Fricas [A] time = 2.6345, size = 39, normalized size = 2.17 \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]
[Out]
________________________________________________________________________________________
Sympy [A] time = 2.94719, size = 32, normalized size = 1.78 \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]
[Out]
________________________________________________________________________________________
Giac [B] time = 1.09442, size = 165, normalized size = 9.17 \begin{align*} \frac{{\left (a + b\right )} \log \left ({\left | a - b - \frac{a{\left (\cos \left (x\right ) - 1\right )}}{\cos \left (x\right ) + 1} - \frac{b{\left (\cos \left (x\right ) - 1\right )}}{\cos \left (x\right ) + 1} \right |}\right )}{a b^{2} + b^{3}} + \frac{{\left (a - b\right )} \log \left ({\left | -a - b + \frac{a{\left (\cos \left (x\right ) - 1\right )}}{\cos \left (x\right ) + 1} - \frac{b{\left (\cos \left (x\right ) - 1\right )}}{\cos \left (x\right ) + 1} \right |}\right )}{a b^{2} - b^{3}} - \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]
[Out]