Optimal. Leaf size=15 \[ \frac {\tanh ^{-1}\left (\frac {b \sin (x)}{a}\right )}{a b} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.02, antiderivative size = 15, normalized size of antiderivative = 1.00, 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 = {3269, 214}
\begin {gather*} \frac {\tanh ^{-1}\left (\frac {b \sin (x)}{a}\right )}{a b} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 214
Rule 3269
Rubi steps
\begin {align*} \int \frac {\cos (x)}{a^2-b^2 \sin ^2(x)} \, dx &=\text {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.01, size = 15, normalized size = 1.00 \begin {gather*} \frac {\tanh ^{-1}\left (\frac {b \sin (x)}{a}\right )}{a b} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [B] Leaf count of result is larger than twice the leaf count of optimal. \(32\) vs.
\(2(15)=30\).
time = 0.07, size = 33, normalized size = 2.20
method | result | size |
derivativedivides | \(\frac {\ln \left (a +b \sin \left (x \right )\right )}{2 a b}-\frac {\ln \left (-b \sin \left (x \right )+a \right )}{2 a b}\) | \(33\) |
default | \(\frac {\ln \left (a +b \sin \left (x \right )\right )}{2 a b}-\frac {\ln \left (-b \sin \left (x \right )+a \right )}{2 a b}\) | \(33\) |
norman | \(-\frac {\ln \left (a \left (\tan ^{2}\left (\frac {x}{2}\right )\right )-2 b \tan \left (\frac {x}{2}\right )+a \right )}{2 a b}+\frac {\ln \left (a \left (\tan ^{2}\left (\frac {x}{2}\right )\right )+2 b \tan \left (\frac {x}{2}\right )+a \right )}{2 a b}\) | \(54\) |
risch | \(-\frac {\ln \left ({\mathrm e}^{2 i x}-\frac {2 i a \,{\mathrm e}^{i x}}{b}-1\right )}{2 a b}+\frac {\ln \left ({\mathrm e}^{2 i x}+\frac {2 i a \,{\mathrm e}^{i x}}{b}-1\right )}{2 a b}\) | \(58\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [B] Leaf count of result is larger than twice the leaf count of optimal. 33 vs.
\(2 (15) = 30\).
time = 2.82, size = 33, normalized size = 2.20 \begin {gather*} \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 {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 1.28, size = 26, normalized size = 1.73 \begin {gather*} \frac {\log \left (b \sin \left (x\right ) + a\right ) - \log \left (-b \sin \left (x\right ) + a\right )}{2 \, a b} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [B] Leaf count of result is larger than twice the leaf count of optimal. 44 vs.
\(2 (10) = 20\).
time = 0.26, size = 44, normalized size = 2.93 \begin {gather*} \begin {cases} \frac {\tilde {\infty }}{\sin {\left (x \right )}} & \text {for}\: a = 0 \wedge b = 0 \\\frac {1}{b^{2} \sin {\left (x \right )}} & \text {for}\: a = 0 \\\frac {\sin {\left (x \right )}}{a^{2}} & \text {for}\: b = 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 {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [B] Leaf count of result is larger than twice the leaf count of optimal. 35 vs.
\(2 (15) = 30\).
time = 0.76, size = 35, normalized size = 2.33 \begin {gather*} \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 {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 0.18, size = 15, normalized size = 1.00 \begin {gather*} \frac {\mathrm {atanh}\left (\frac {b\,\sin \left (x\right )}{a}\right )}{a\,b} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________