Optimal. Leaf size=149 \[ \frac{4 \left (8 a^2+b^2\right ) \tan ^{-1}\left (\frac{2 a \tan (c+d x)+b}{\sqrt{4 a^2-b^2}}\right )}{d \left (4 a^2-b^2\right )^{5/2}}+\frac{12 a b \cos (2 c+2 d x)}{d \left (4 a^2-b^2\right )^2 (2 a+b \sin (2 c+2 d x))}+\frac{2 b \cos (2 c+2 d x)}{d \left (4 a^2-b^2\right ) (2 a+b \sin (2 c+2 d x))^2} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.177361, antiderivative size = 149, normalized size of antiderivative = 1., number of steps used = 7, number of rules used = 7, integrand size = 18, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.389, Rules used = {2666, 2664, 2754, 12, 2660, 618, 204} \[ \frac{4 \left (8 a^2+b^2\right ) \tan ^{-1}\left (\frac{2 a \tan (c+d x)+b}{\sqrt{4 a^2-b^2}}\right )}{d \left (4 a^2-b^2\right )^{5/2}}+\frac{12 a b \cos (2 c+2 d x)}{d \left (4 a^2-b^2\right )^2 (2 a+b \sin (2 c+2 d x))}+\frac{2 b \cos (2 c+2 d x)}{d \left (4 a^2-b^2\right ) (2 a+b \sin (2 c+2 d x))^2} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 2666
Rule 2664
Rule 2754
Rule 12
Rule 2660
Rule 618
Rule 204
Rubi steps
\begin{align*} \int \frac{1}{(a+b \cos (c+d x) \sin (c+d x))^3} \, dx &=\int \frac{1}{\left (a+\frac{1}{2} b \sin (2 c+2 d x)\right )^3} \, dx\\ &=\frac{2 b \cos (2 c+2 d x)}{\left (4 a^2-b^2\right ) d (2 a+b \sin (2 c+2 d x))^2}-\frac{2 \int \frac{-2 a+\frac{1}{2} b \sin (2 c+2 d x)}{\left (a+\frac{1}{2} b \sin (2 c+2 d x)\right )^2} \, dx}{4 a^2-b^2}\\ &=\frac{2 b \cos (2 c+2 d x)}{\left (4 a^2-b^2\right ) d (2 a+b \sin (2 c+2 d x))^2}+\frac{12 a b \cos (2 c+2 d x)}{\left (4 a^2-b^2\right )^2 d (2 a+b \sin (2 c+2 d x))}+\frac{8 \int \frac{8 a^2+b^2}{4 \left (a+\frac{1}{2} b \sin (2 c+2 d x)\right )} \, dx}{\left (4 a^2-b^2\right )^2}\\ &=\frac{2 b \cos (2 c+2 d x)}{\left (4 a^2-b^2\right ) d (2 a+b \sin (2 c+2 d x))^2}+\frac{12 a b \cos (2 c+2 d x)}{\left (4 a^2-b^2\right )^2 d (2 a+b \sin (2 c+2 d x))}+\frac{\left (2 \left (8 a^2+b^2\right )\right ) \int \frac{1}{a+\frac{1}{2} b \sin (2 c+2 d x)} \, dx}{\left (4 a^2-b^2\right )^2}\\ &=\frac{2 b \cos (2 c+2 d x)}{\left (4 a^2-b^2\right ) d (2 a+b \sin (2 c+2 d x))^2}+\frac{12 a b \cos (2 c+2 d x)}{\left (4 a^2-b^2\right )^2 d (2 a+b \sin (2 c+2 d x))}+\frac{\left (2 \left (8 a^2+b^2\right )\right ) \operatorname{Subst}\left (\int \frac{1}{a+b x+a x^2} \, dx,x,\tan \left (\frac{1}{2} (2 c+2 d x)\right )\right )}{\left (4 a^2-b^2\right )^2 d}\\ &=\frac{2 b \cos (2 c+2 d x)}{\left (4 a^2-b^2\right ) d (2 a+b \sin (2 c+2 d x))^2}+\frac{12 a b \cos (2 c+2 d x)}{\left (4 a^2-b^2\right )^2 d (2 a+b \sin (2 c+2 d x))}-\frac{\left (4 \left (8 a^2+b^2\right )\right ) \operatorname{Subst}\left (\int \frac{1}{-4 a^2+b^2-x^2} \, dx,x,b+2 a \tan \left (\frac{1}{2} (2 c+2 d x)\right )\right )}{\left (4 a^2-b^2\right )^2 d}\\ &=\frac{4 \left (8 a^2+b^2\right ) \tan ^{-1}\left (\frac{b+2 a \tan (c+d x)}{\sqrt{4 a^2-b^2}}\right )}{\left (4 a^2-b^2\right )^{5/2} d}+\frac{2 b \cos (2 c+2 d x)}{\left (4 a^2-b^2\right ) d (2 a+b \sin (2 c+2 d x))^2}+\frac{12 a b \cos (2 c+2 d x)}{\left (4 a^2-b^2\right )^2 d (2 a+b \sin (2 c+2 d x))}\\ \end{align*}
Mathematica [A] time = 0.950039, size = 120, normalized size = 0.81 \[ \frac{2 \left (\frac{2 \left (8 a^2+b^2\right ) \tan ^{-1}\left (\frac{2 a \tan (c+d x)+b}{\sqrt{4 a^2-b^2}}\right )}{\left (4 a^2-b^2\right )^{5/2}}+\frac{b \cos (2 (c+d x)) \left (16 a^2+6 a b \sin (2 (c+d x))-b^2\right )}{\left (b^2-4 a^2\right )^2 (2 a+b \sin (2 (c+d x)))^2}\right )}{d} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [B] time = 0.148, size = 640, normalized size = 4.3 \begin{align*} \text{result too large to display} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F(-2)] time = 0., size = 0, normalized size = 0. \begin{align*} \text{Exception raised: ValueError} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [B] time = 3.17366, size = 2152, normalized size = 14.44 \begin{align*} \text{result too large to display} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F(-1)] time = 0., size = 0, normalized size = 0. \begin{align*} \text{Timed out} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A] time = 1.14886, size = 340, normalized size = 2.28 \begin{align*} \frac{\frac{8 \,{\left (\pi \left \lfloor \frac{d x + c}{\pi } + \frac{1}{2} \right \rfloor \mathrm{sgn}\left (a\right ) + \arctan \left (\frac{2 \, a \tan \left (d x + c\right ) + b}{\sqrt{4 \, a^{2} - b^{2}}}\right )\right )}{\left (8 \, a^{2} + b^{2}\right )}}{{\left (16 \, a^{4} - 8 \, a^{2} b^{2} + b^{4}\right )} \sqrt{4 \, a^{2} - b^{2}}} + \frac{20 \, a^{3} b^{2} \tan \left (d x + c\right )^{3} - 2 \, a b^{4} \tan \left (d x + c\right )^{3} + 32 \, a^{4} b \tan \left (d x + c\right )^{2} + 14 \, a^{2} b^{3} \tan \left (d x + c\right )^{2} - b^{5} \tan \left (d x + c\right )^{2} + 44 \, a^{3} b^{2} \tan \left (d x + c\right ) - 2 \, a b^{4} \tan \left (d x + c\right ) + 32 \, a^{4} b - 2 \, a^{2} b^{3}}{{\left (16 \, a^{6} - 8 \, a^{4} b^{2} + a^{2} b^{4}\right )}{\left (a \tan \left (d x + c\right )^{2} + b \tan \left (d x + c\right ) + a\right )}^{2}}}{2 \, d} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]