Optimal. Leaf size=66 \[ -\frac {2 \tan ^5(c+d x)}{5 a^2 d}+\frac {2 \sec ^5(c+d x)}{5 a^2 d}-\frac {\sec ^3(c+d x)}{a^2 d}+\frac {\sec (c+d x)}{a^2 d} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.26, antiderivative size = 66, normalized size of antiderivative = 1.00, number of steps used = 11, number of rules used = 7, integrand size = 27, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.259, Rules used = {2875, 2873, 2606, 14, 2607, 30, 194} \[ -\frac {2 \tan ^5(c+d x)}{5 a^2 d}+\frac {2 \sec ^5(c+d x)}{5 a^2 d}-\frac {\sec ^3(c+d x)}{a^2 d}+\frac {\sec (c+d x)}{a^2 d} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 14
Rule 30
Rule 194
Rule 2606
Rule 2607
Rule 2873
Rule 2875
Rubi steps
\begin {align*} \int \frac {\sin (c+d x) \tan ^2(c+d x)}{(a+a \sin (c+d x))^2} \, dx &=\frac {\int \sec ^3(c+d x) (a-a \sin (c+d x))^2 \tan ^3(c+d x) \, dx}{a^4}\\ &=\frac {\int \left (a^2 \sec ^3(c+d x) \tan ^3(c+d x)-2 a^2 \sec ^2(c+d x) \tan ^4(c+d x)+a^2 \sec (c+d x) \tan ^5(c+d x)\right ) \, dx}{a^4}\\ &=\frac {\int \sec ^3(c+d x) \tan ^3(c+d x) \, dx}{a^2}+\frac {\int \sec (c+d x) \tan ^5(c+d x) \, dx}{a^2}-\frac {2 \int \sec ^2(c+d x) \tan ^4(c+d x) \, dx}{a^2}\\ &=\frac {\operatorname {Subst}\left (\int x^2 \left (-1+x^2\right ) \, dx,x,\sec (c+d x)\right )}{a^2 d}+\frac {\operatorname {Subst}\left (\int \left (-1+x^2\right )^2 \, dx,x,\sec (c+d x)\right )}{a^2 d}-\frac {2 \operatorname {Subst}\left (\int x^4 \, dx,x,\tan (c+d x)\right )}{a^2 d}\\ &=-\frac {2 \tan ^5(c+d x)}{5 a^2 d}+\frac {\operatorname {Subst}\left (\int \left (1-2 x^2+x^4\right ) \, dx,x,\sec (c+d x)\right )}{a^2 d}+\frac {\operatorname {Subst}\left (\int \left (-x^2+x^4\right ) \, dx,x,\sec (c+d x)\right )}{a^2 d}\\ &=\frac {\sec (c+d x)}{a^2 d}-\frac {\sec ^3(c+d x)}{a^2 d}+\frac {2 \sec ^5(c+d x)}{5 a^2 d}-\frac {2 \tan ^5(c+d x)}{5 a^2 d}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A] time = 0.28, size = 84, normalized size = 1.27 \[ \frac {\sec (c+d x) (40 \sin (c+d x)-52 \sin (2 (c+d x))+8 \sin (3 (c+d x))-65 \cos (c+d x)-8 \cos (2 (c+d x))+13 \cos (3 (c+d x))+40)}{80 a^2 d (\sin (c+d x)+1)^2} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 0.48, size = 76, normalized size = 1.15 \[ \frac {\cos \left (d x + c\right )^{2} - 2 \, {\left (\cos \left (d x + c\right )^{2} + 1\right )} \sin \left (d x + c\right ) - 3}{5 \, {\left (a^{2} d \cos \left (d x + c\right )^{3} - 2 \, a^{2} d \cos \left (d x + c\right ) \sin \left (d x + c\right ) - 2 \, a^{2} d \cos \left (d x + c\right )\right )}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [A] time = 0.22, size = 94, normalized size = 1.42 \[ -\frac {\frac {5}{a^{2} {\left (\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - 1\right )}} - \frac {5 \, \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{4} + 30 \, \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} + 80 \, \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + 50 \, \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 11}{a^{2} {\left (\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 1\right )}^{5}}}{20 \, d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 0.43, size = 100, normalized size = 1.52 \[ \frac {-\frac {1}{4 \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )}+\frac {4}{5 \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )^{5}}-\frac {2}{\left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )^{4}}+\frac {1}{\left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )^{3}}+\frac {1}{2 \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )^{2}}+\frac {16}{64 \tan \left (\frac {d x}{2}+\frac {c}{2}\right )+64}}{a^{2} d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [B] time = 0.33, size = 164, normalized size = 2.48 \[ \frac {4 \, {\left (\frac {4 \, \sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1} + \frac {5 \, \sin \left (d x + c\right )^{2}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{2}} + 1\right )}}{5 \, {\left (a^{2} + \frac {4 \, a^{2} \sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1} + \frac {5 \, a^{2} \sin \left (d x + c\right )^{2}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{2}} - \frac {5 \, a^{2} \sin \left (d x + c\right )^{4}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{4}} - \frac {4 \, a^{2} \sin \left (d x + c\right )^{5}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{5}} - \frac {a^{2} \sin \left (d x + c\right )^{6}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{6}}\right )} d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 9.27, size = 111, normalized size = 1.68 \[ \frac {\frac {4\,{\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )}^6}{5}+\frac {16\,{\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )}^5\,\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )}{5}+4\,{\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )}^4\,{\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2}{a^2\,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 )}^5} \]
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]
________________________________________________________________________________________