Optimal. Leaf size=51 \[ \frac{a^2-b^2}{2 b^3 (a+b \sin (x))^2}-\frac{2 a}{b^3 (a+b \sin (x))}-\frac{\log (a+b \sin (x))}{b^3} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.0751398, antiderivative size = 51, normalized size of antiderivative = 1., number of steps used = 4, number of rules used = 3, integrand size = 11, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.273, Rules used = {4391, 2668, 697} \[ \frac{a^2-b^2}{2 b^3 (a+b \sin (x))^2}-\frac{2 a}{b^3 (a+b \sin (x))}-\frac{\log (a+b \sin (x))}{b^3} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 4391
Rule 2668
Rule 697
Rubi steps
\begin{align*} \int \frac{1}{(a \sec (x)+b \tan (x))^3} \, dx &=\int \frac{\cos ^3(x)}{(a+b \sin (x))^3} \, dx\\ &=\frac{\operatorname{Subst}\left (\int \frac{b^2-x^2}{(a+x)^3} \, dx,x,b \sin (x)\right )}{b^3}\\ &=\frac{\operatorname{Subst}\left (\int \left (\frac{1}{-a-x}+\frac{-a^2+b^2}{(a+x)^3}+\frac{2 a}{(a+x)^2}\right ) \, dx,x,b \sin (x)\right )}{b^3}\\ &=-\frac{\log (a+b \sin (x))}{b^3}+\frac{a^2-b^2}{2 b^3 (a+b \sin (x))^2}-\frac{2 a}{b^3 (a+b \sin (x))}\\ \end{align*}
Mathematica [A] time = 0.165935, size = 40, normalized size = 0.78 \[ -\frac{\frac{3 a^2+4 a b \sin (x)+b^2}{2 (a+b \sin (x))^2}+\log (a+b \sin (x))}{b^3} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A] time = 0.085, size = 57, normalized size = 1.1 \begin{align*} -{\frac{\ln \left ( a+b\sin \left ( x \right ) \right ) }{{b}^{3}}}-2\,{\frac{a}{{b}^{3} \left ( a+b\sin \left ( x \right ) \right ) }}+{\frac{{a}^{2}}{2\,{b}^{3} \left ( a+b\sin \left ( x \right ) \right ) ^{2}}}-{\frac{1}{2\,b \left ( a+b\sin \left ( x \right ) \right ) ^{2}}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [B] time = 1.56461, size = 271, normalized size = 5.31 \begin{align*} \frac{2 \,{\left (\frac{{\left (a^{3} + a b^{2}\right )} \sin \left (x\right )}{\cos \left (x\right ) + 1} + \frac{{\left (3 \, a^{2} b + b^{3}\right )} \sin \left (x\right )^{2}}{{\left (\cos \left (x\right ) + 1\right )}^{2}} + \frac{{\left (a^{3} + a b^{2}\right )} \sin \left (x\right )^{3}}{{\left (\cos \left (x\right ) + 1\right )}^{3}}\right )}}{a^{4} b^{2} + \frac{4 \, a^{3} b^{3} \sin \left (x\right )}{\cos \left (x\right ) + 1} + \frac{4 \, a^{3} b^{3} \sin \left (x\right )^{3}}{{\left (\cos \left (x\right ) + 1\right )}^{3}} + \frac{a^{4} b^{2} \sin \left (x\right )^{4}}{{\left (\cos \left (x\right ) + 1\right )}^{4}} + \frac{2 \,{\left (a^{4} b^{2} + 2 \, a^{2} b^{4}\right )} \sin \left (x\right )^{2}}{{\left (\cos \left (x\right ) + 1\right )}^{2}}} - \frac{\log \left (a + \frac{2 \, b \sin \left (x\right )}{\cos \left (x\right ) + 1} + \frac{a \sin \left (x\right )^{2}}{{\left (\cos \left (x\right ) + 1\right )}^{2}}\right )}{b^{3}} + \frac{\log \left (\frac{\sin \left (x\right )^{2}}{{\left (\cos \left (x\right ) + 1\right )}^{2}} + 1\right )}{b^{3}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A] time = 2.44208, size = 197, normalized size = 3.86 \begin{align*} \frac{4 \, a b \sin \left (x\right ) + 3 \, a^{2} + b^{2} - 2 \,{\left (b^{2} \cos \left (x\right )^{2} - 2 \, a b \sin \left (x\right ) - a^{2} - b^{2}\right )} \log \left (b \sin \left (x\right ) + a\right )}{2 \,{\left (b^{5} \cos \left (x\right )^{2} - 2 \, a b^{4} \sin \left (x\right ) - a^{2} b^{3} - b^{5}\right )}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [A] time = 4.61103, size = 508, normalized size = 9.96 \begin{align*} \text{result too large to display} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A] time = 1.15079, size = 58, normalized size = 1.14 \begin{align*} -\frac{\log \left ({\left | b \sin \left (x\right ) + a \right |}\right )}{b^{3}} + \frac{3 \, b \sin \left (x\right )^{2} + 2 \, a \sin \left (x\right ) - b}{2 \,{\left (b \sin \left (x\right ) + a\right )}^{2} b^{2}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]