Optimal. Leaf size=15 \[ \frac {\tan ^{-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 = 17, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.118, Rules used = {3269, 211}
\begin {gather*} \frac {\text {ArcTan}\left (\frac {b \sin (x)}{a}\right )}{a b} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 211
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 {\tan ^{-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 {\tan ^{-1}\left (\frac {b \sin (x)}{a}\right )}{a b} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.06, size = 16, normalized size = 1.07
method | result | size |
derivativedivides | \(\frac {\arctan \left (\frac {b \sin \left (x \right )}{a}\right )}{a b}\) | \(16\) |
default | \(\frac {\arctan \left (\frac {b \sin \left (x \right )}{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]
[Out]
________________________________________________________________________________________
Maxima [A]
time = 2.53, size = 15, normalized size = 1.00 \begin {gather*} \frac {\arctan \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]
________________________________________________________________________________________
Fricas [A]
time = 1.07, size = 15, normalized size = 1.00 \begin {gather*} \frac {\arctan \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]
________________________________________________________________________________________
Sympy [B] Leaf count of result is larger than twice the leaf count of optimal. 31 vs.
\(2 (10) = 20\).
time = 0.25, size = 31, normalized size = 2.07 \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 {\operatorname {atan}{\left (\frac {b \sin {\left (x \right )}}{a} \right )}}{a b} & \text {otherwise} \end {cases} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A]
time = 0.88, size = 15, normalized size = 1.00 \begin {gather*} \frac {\arctan \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]
________________________________________________________________________________________
Mupad [B]
time = 0.05, size = 15, normalized size = 1.00 \begin {gather*} \frac {\mathrm {atan}\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]
________________________________________________________________________________________