Optimal. Leaf size=15 \[ \frac{\tanh ^{-1}\left (\frac{b \sin (x)}{a}\right )}{a b} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.027777, antiderivative size = 15, normalized size of antiderivative = 1., number of steps used = 2, number of rules used = 2, integrand size = 18, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.111, Rules used = {3190, 208} \[ \frac{\tanh ^{-1}\left (\frac{b \sin (x)}{a}\right )}{a b} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 3190
Rule 208
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{\tanh ^{-1}\left (\frac{b \sin (x)}{a}\right )}{a b}\\ \end{align*}
Mathematica [A] time = 0.0092904, size = 15, normalized size = 1. \[ \frac{\tanh ^{-1}\left (\frac{b \sin (x)}{a}\right )}{a b} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [B] time = 0.011, size = 34, normalized size = 2.3 \begin{align*} -{\frac{\ln \left ( b\sin \left ( x \right ) -a \right ) }{2\,ab}}+{\frac{\ln \left ( b\sin \left ( x \right ) +a \right ) }{2\,ab}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [B] time = 0.929799, size = 45, normalized size = 3. \begin{align*} \frac{\log \left (b \sin \left (x\right ) + a\right )}{2 \, a b} - \frac{\log \left (b \sin \left (x\right ) - a\right )}{2 \, a b} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A] time = 2.1602, size = 70, normalized size = 4.67 \begin{align*} \frac{\log \left (b \sin \left (x\right ) + a\right ) - \log \left (-b \sin \left (x\right ) + a\right )}{2 \, a b} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [A] time = 0.732941, size = 44, normalized size = 2.93 \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{\log{\left (- \frac{a}{b} + \sin{\left (x \right )} \right )}}{2 a b} + \frac{\log{\left (\frac{a}{b} + \sin{\left (x \right )} \right )}}{2 a b} & \text{otherwise} \end{cases} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [B] time = 1.04545, size = 47, normalized size = 3.13 \begin{align*} \frac{\log \left ({\left | b \sin \left (x\right ) + a \right |}\right )}{2 \, a b} - \frac{\log \left ({\left | b \sin \left (x\right ) - a \right |}\right )}{2 \, a b} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]