Optimal. Leaf size=102 \[ \frac {4 \tan ^7(c+d x)}{7 a^3 d}+\frac {\tan ^5(c+d x)}{5 a^3 d}-\frac {4 \sec ^7(c+d x)}{7 a^3 d}+\frac {9 \sec ^5(c+d x)}{5 a^3 d}-\frac {2 \sec ^3(c+d x)}{a^3 d}+\frac {\sec (c+d x)}{a^3 d} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.33, antiderivative size = 102, normalized size of antiderivative = 1.00, number of steps used = 14, number of rules used = 8, integrand size = 29, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.276, Rules used = {2875, 2873, 2607, 14, 2606, 270, 30, 194} \[ \frac {4 \tan ^7(c+d x)}{7 a^3 d}+\frac {\tan ^5(c+d x)}{5 a^3 d}-\frac {4 \sec ^7(c+d x)}{7 a^3 d}+\frac {9 \sec ^5(c+d x)}{5 a^3 d}-\frac {2 \sec ^3(c+d x)}{a^3 d}+\frac {\sec (c+d x)}{a^3 d} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 14
Rule 30
Rule 194
Rule 270
Rule 2606
Rule 2607
Rule 2873
Rule 2875
Rubi steps
\begin {align*} \int \frac {\sin ^2(c+d x) \tan ^2(c+d x)}{(a+a \sin (c+d x))^3} \, dx &=\frac {\int \sec ^4(c+d x) (a-a \sin (c+d x))^3 \tan ^4(c+d x) \, dx}{a^6}\\ &=\frac {\int \left (a^3 \sec ^4(c+d x) \tan ^4(c+d x)-3 a^3 \sec ^3(c+d x) \tan ^5(c+d x)+3 a^3 \sec ^2(c+d x) \tan ^6(c+d x)-a^3 \sec (c+d x) \tan ^7(c+d x)\right ) \, dx}{a^6}\\ &=\frac {\int \sec ^4(c+d x) \tan ^4(c+d x) \, dx}{a^3}-\frac {\int \sec (c+d x) \tan ^7(c+d x) \, dx}{a^3}-\frac {3 \int \sec ^3(c+d x) \tan ^5(c+d x) \, dx}{a^3}+\frac {3 \int \sec ^2(c+d x) \tan ^6(c+d x) \, dx}{a^3}\\ &=-\frac {\operatorname {Subst}\left (\int \left (-1+x^2\right )^3 \, dx,x,\sec (c+d x)\right )}{a^3 d}+\frac {\operatorname {Subst}\left (\int x^4 \left (1+x^2\right ) \, dx,x,\tan (c+d x)\right )}{a^3 d}+\frac {3 \operatorname {Subst}\left (\int x^6 \, dx,x,\tan (c+d x)\right )}{a^3 d}-\frac {3 \operatorname {Subst}\left (\int x^2 \left (-1+x^2\right )^2 \, dx,x,\sec (c+d x)\right )}{a^3 d}\\ &=\frac {3 \tan ^7(c+d x)}{7 a^3 d}-\frac {\operatorname {Subst}\left (\int \left (-1+3 x^2-3 x^4+x^6\right ) \, dx,x,\sec (c+d x)\right )}{a^3 d}+\frac {\operatorname {Subst}\left (\int \left (x^4+x^6\right ) \, dx,x,\tan (c+d x)\right )}{a^3 d}-\frac {3 \operatorname {Subst}\left (\int \left (x^2-2 x^4+x^6\right ) \, dx,x,\sec (c+d x)\right )}{a^3 d}\\ &=\frac {\sec (c+d x)}{a^3 d}-\frac {2 \sec ^3(c+d x)}{a^3 d}+\frac {9 \sec ^5(c+d x)}{5 a^3 d}-\frac {4 \sec ^7(c+d x)}{7 a^3 d}+\frac {\tan ^5(c+d x)}{5 a^3 d}+\frac {4 \tan ^7(c+d x)}{7 a^3 d}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A] time = 0.50, size = 104, normalized size = 1.02 \[ \frac {\sec (c+d x) (1344 \sin (c+d x)-1946 \sin (2 (c+d x))+64 \sin (3 (c+d x))+139 \sin (4 (c+d x))-1946 \cos (c+d x)-224 \cos (2 (c+d x))+834 \cos (3 (c+d x))-104 \cos (4 (c+d x))+840)}{2240 a^3 d (\sin (c+d x)+1)^3} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 0.42, size = 104, normalized size = 1.02 \[ \frac {13 \, \cos \left (d x + c\right )^{4} - 6 \, \cos \left (d x + c\right )^{2} - 4 \, {\left (\cos \left (d x + c\right )^{2} + 5\right )} \sin \left (d x + c\right ) - 15}{35 \, {\left (3 \, a^{3} d \cos \left (d x + c\right )^{3} - 4 \, a^{3} d \cos \left (d x + c\right ) + {\left (a^{3} d \cos \left (d x + c\right )^{3} - 4 \, a^{3} d \cos \left (d x + c\right )\right )} \sin \left (d x + c\right )\right )}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [A] time = 0.26, size = 120, normalized size = 1.18 \[ -\frac {\frac {35}{a^{3} {\left (\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - 1\right )}} - \frac {35 \, \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{6} + 280 \, \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{5} + 1015 \, \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{4} + 2240 \, \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} + 1673 \, \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + 616 \, \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 93}{a^{3} {\left (\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 1\right )}^{7}}}{280 \, d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 0.50, size = 130, normalized size = 1.27 \[ \frac {-\frac {1}{8 \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )}-\frac {8}{7 \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )^{7}}+\frac {4}{\left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )^{6}}-\frac {22}{5 \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )^{5}}+\frac {1}{\left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )^{4}}+\frac {1}{2 \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )^{3}}+\frac {1}{4 \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )^{2}}+\frac {32}{256 \tan \left (\frac {d x}{2}+\frac {c}{2}\right )+256}}{d \,a^{3}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [B] time = 0.34, size = 230, normalized size = 2.25 \[ \frac {16 \, {\left (\frac {6 \, \sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1} + \frac {14 \, \sin \left (d x + c\right )^{2}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{2}} + \frac {14 \, \sin \left (d x + c\right )^{3}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{3}} + 1\right )}}{35 \, {\left (a^{3} + \frac {6 \, a^{3} \sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1} + \frac {14 \, a^{3} \sin \left (d x + c\right )^{2}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{2}} + \frac {14 \, a^{3} \sin \left (d x + c\right )^{3}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{3}} - \frac {14 \, a^{3} \sin \left (d x + c\right )^{5}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{5}} - \frac {14 \, a^{3} \sin \left (d x + c\right )^{6}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{6}} - \frac {6 \, a^{3} \sin \left (d x + c\right )^{7}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{7}} - \frac {a^{3} \sin \left (d x + c\right )^{8}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{8}}\right )} d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 9.69, size = 135, normalized size = 1.32 \[ \frac {\frac {16\,{\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )}^8}{35}+\frac {96\,{\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )}^7\,\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )}{35}+\frac {32\,{\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )}^6\,{\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2}{5}+\frac {32\,{\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )}^5\,{\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )}^3}{5}}{a^3\,d\,\left (\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )-\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )\right )\,{\left (\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )+\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )\right )}^7} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [F(-1)] time = 0.00, size = 0, normalized size = 0.00 \[ \text {Timed out} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________