Optimal. Leaf size=129 \[ \frac {\left (6 a^2-b^2\right ) \tan ^5(c+d x)}{35 d}+\frac {2 \left (6 a^2-b^2\right ) \tan ^3(c+d x)}{21 d}+\frac {\left (6 a^2-b^2\right ) \tan (c+d x)}{7 d}+\frac {a b \sec ^5(c+d x)}{7 d}+\frac {\sec ^7(c+d x) (a \sin (c+d x)+b) (a+b \sin (c+d x))}{7 d} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.12, antiderivative size = 129, normalized size of antiderivative = 1.00, number of steps used = 4, number of rules used = 3, integrand size = 21, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.143, Rules used = {2691, 2669, 3767} \[ \frac {\left (6 a^2-b^2\right ) \tan ^5(c+d x)}{35 d}+\frac {2 \left (6 a^2-b^2\right ) \tan ^3(c+d x)}{21 d}+\frac {\left (6 a^2-b^2\right ) \tan (c+d x)}{7 d}+\frac {a b \sec ^5(c+d x)}{7 d}+\frac {\sec ^7(c+d x) (a \sin (c+d x)+b) (a+b \sin (c+d x))}{7 d} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 2669
Rule 2691
Rule 3767
Rubi steps
\begin {align*} \int \sec ^8(c+d x) (a+b \sin (c+d x))^2 \, dx &=\frac {\sec ^7(c+d x) (b+a \sin (c+d x)) (a+b \sin (c+d x))}{7 d}-\frac {1}{7} \int \sec ^6(c+d x) \left (-6 a^2+b^2-5 a b \sin (c+d x)\right ) \, dx\\ &=\frac {a b \sec ^5(c+d x)}{7 d}+\frac {\sec ^7(c+d x) (b+a \sin (c+d x)) (a+b \sin (c+d x))}{7 d}-\frac {1}{7} \left (-6 a^2+b^2\right ) \int \sec ^6(c+d x) \, dx\\ &=\frac {a b \sec ^5(c+d x)}{7 d}+\frac {\sec ^7(c+d x) (b+a \sin (c+d x)) (a+b \sin (c+d x))}{7 d}-\frac {\left (6 a^2-b^2\right ) \operatorname {Subst}\left (\int \left (1+2 x^2+x^4\right ) \, dx,x,-\tan (c+d x)\right )}{7 d}\\ &=\frac {a b \sec ^5(c+d x)}{7 d}+\frac {\sec ^7(c+d x) (b+a \sin (c+d x)) (a+b \sin (c+d x))}{7 d}+\frac {\left (6 a^2-b^2\right ) \tan (c+d x)}{7 d}+\frac {2 \left (6 a^2-b^2\right ) \tan ^3(c+d x)}{21 d}+\frac {\left (6 a^2-b^2\right ) \tan ^5(c+d x)}{35 d}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A] time = 0.81, size = 110, normalized size = 0.85 \[ \frac {\sec ^7(c+d x) \left (105 \left (2 a^2+b^2\right ) \sin (c+d x)+21 \left (6 a^2-b^2\right ) \sin (3 (c+d x))+42 a^2 \sin (5 (c+d x))+6 a^2 \sin (7 (c+d x))+240 a b-7 b^2 \sin (5 (c+d x))-b^2 \sin (7 (c+d x))\right )}{840 d} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 0.45, size = 99, normalized size = 0.77 \[ \frac {30 \, a b + {\left (8 \, {\left (6 \, a^{2} - b^{2}\right )} \cos \left (d x + c\right )^{6} + 4 \, {\left (6 \, a^{2} - b^{2}\right )} \cos \left (d x + c\right )^{4} + 3 \, {\left (6 \, a^{2} - b^{2}\right )} \cos \left (d x + c\right )^{2} + 15 \, a^{2} + 15 \, b^{2}\right )} \sin \left (d x + c\right )}{105 \, d \cos \left (d x + c\right )^{7}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [B] time = 0.40, size = 260, normalized size = 2.02 \[ -\frac {2 \, {\left (105 \, a^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{13} + 210 \, a b \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{12} - 210 \, a^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{11} + 140 \, b^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{11} + 903 \, a^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{9} + 112 \, b^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{9} + 1050 \, a b \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{8} - 636 \, a^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{7} + 456 \, b^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{7} + 903 \, a^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{5} + 112 \, b^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{5} + 630 \, a b \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{4} - 210 \, a^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} + 140 \, b^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} + 105 \, a^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 30 \, a b\right )}}{105 \, {\left (\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} - 1\right )}^{7} d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 0.30, size = 120, normalized size = 0.93 \[ \frac {-a^{2} \left (-\frac {16}{35}-\frac {\left (\sec ^{6}\left (d x +c \right )\right )}{7}-\frac {6 \left (\sec ^{4}\left (d x +c \right )\right )}{35}-\frac {8 \left (\sec ^{2}\left (d x +c \right )\right )}{35}\right ) \tan \left (d x +c \right )+\frac {2 a b}{7 \cos \left (d x +c \right )^{7}}+b^{2} \left (\frac {\sin ^{3}\left (d x +c \right )}{7 \cos \left (d x +c \right )^{7}}+\frac {4 \left (\sin ^{3}\left (d x +c \right )\right )}{35 \cos \left (d x +c \right )^{5}}+\frac {8 \left (\sin ^{3}\left (d x +c \right )\right )}{105 \cos \left (d x +c \right )^{3}}\right )}{d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [A] time = 0.32, size = 97, normalized size = 0.75 \[ \frac {3 \, {\left (5 \, \tan \left (d x + c\right )^{7} + 21 \, \tan \left (d x + c\right )^{5} + 35 \, \tan \left (d x + c\right )^{3} + 35 \, \tan \left (d x + c\right )\right )} a^{2} + {\left (15 \, \tan \left (d x + c\right )^{7} + 42 \, \tan \left (d x + c\right )^{5} + 35 \, \tan \left (d x + c\right )^{3}\right )} b^{2} + \frac {30 \, a b}{\cos \left (d x + c\right )^{7}}}{105 \, d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 5.55, size = 135, normalized size = 1.05 \[ \frac {\frac {2\,a\,b}{7}+\frac {a^2\,\sin \left (c+d\,x\right )}{7}+\frac {b^2\,\sin \left (c+d\,x\right )}{7}+{\cos \left (c+d\,x\right )}^2\,\left (\frac {6\,a^2\,\sin \left (c+d\,x\right )}{35}-\frac {b^2\,\sin \left (c+d\,x\right )}{35}\right )+{\cos \left (c+d\,x\right )}^4\,\left (\frac {8\,a^2\,\sin \left (c+d\,x\right )}{35}-\frac {4\,b^2\,\sin \left (c+d\,x\right )}{105}\right )+{\cos \left (c+d\,x\right )}^6\,\left (\frac {16\,a^2\,\sin \left (c+d\,x\right )}{35}-\frac {8\,b^2\,\sin \left (c+d\,x\right )}{105}\right )}{d\,{\cos \left (c+d\,x\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]
________________________________________________________________________________________