Optimal. Leaf size=142 \[ -\frac {3 b (a+b) (3 a+5 b) \log (1-\sin (c+d x))}{16 d}+\frac {3 b (3 a-5 b) (a-b) \log (\sin (c+d x)+1)}{16 d}+\frac {\sec ^4(c+d x) (a+b \sin (c+d x))^3}{4 d}-\frac {\sec ^2(c+d x) (a+b \sin (c+d x))^2 (4 a+7 b \sin (c+d x))}{8 d}-\frac {15 b^3 \sin (c+d x)}{8 d} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.30, antiderivative size = 142, normalized size of antiderivative = 1.00, number of steps used = 8, number of rules used = 6, integrand size = 29, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.207, Rules used = {2837, 12, 1645, 774, 633, 31} \[ -\frac {3 b (a+b) (3 a+5 b) \log (1-\sin (c+d x))}{16 d}+\frac {3 b (3 a-5 b) (a-b) \log (\sin (c+d x)+1)}{16 d}+\frac {\sec ^4(c+d x) (a+b \sin (c+d x))^3}{4 d}-\frac {\sec ^2(c+d x) (a+b \sin (c+d x))^2 (4 a+7 b \sin (c+d x))}{8 d}-\frac {15 b^3 \sin (c+d x)}{8 d} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 12
Rule 31
Rule 633
Rule 774
Rule 1645
Rule 2837
Rubi steps
\begin {align*} \int \sec ^2(c+d x) (a+b \sin (c+d x))^3 \tan ^3(c+d x) \, dx &=\frac {b^5 \operatorname {Subst}\left (\int \frac {x^3 (a+x)^3}{b^3 \left (b^2-x^2\right )^3} \, dx,x,b \sin (c+d x)\right )}{d}\\ &=\frac {b^2 \operatorname {Subst}\left (\int \frac {x^3 (a+x)^3}{\left (b^2-x^2\right )^3} \, dx,x,b \sin (c+d x)\right )}{d}\\ &=\frac {\sec ^4(c+d x) (a+b \sin (c+d x))^3}{4 d}+\frac {\operatorname {Subst}\left (\int \frac {(a+x)^2 \left (-3 b^4-4 a b^2 x-4 b^2 x^2\right )}{\left (b^2-x^2\right )^2} \, dx,x,b \sin (c+d x)\right )}{4 d}\\ &=\frac {\sec ^4(c+d x) (a+b \sin (c+d x))^3}{4 d}-\frac {\sec ^2(c+d x) (a+b \sin (c+d x))^2 (4 a+7 b \sin (c+d x))}{8 d}+\frac {\operatorname {Subst}\left (\int \frac {(a+x) \left (9 a b^4+15 b^4 x\right )}{b^2-x^2} \, dx,x,b \sin (c+d x)\right )}{8 b^2 d}\\ &=-\frac {15 b^3 \sin (c+d x)}{8 d}+\frac {\sec ^4(c+d x) (a+b \sin (c+d x))^3}{4 d}-\frac {\sec ^2(c+d x) (a+b \sin (c+d x))^2 (4 a+7 b \sin (c+d x))}{8 d}-\frac {\operatorname {Subst}\left (\int \frac {-9 a^2 b^4-15 b^6-24 a b^4 x}{b^2-x^2} \, dx,x,b \sin (c+d x)\right )}{8 b^2 d}\\ &=-\frac {15 b^3 \sin (c+d x)}{8 d}+\frac {\sec ^4(c+d x) (a+b \sin (c+d x))^3}{4 d}-\frac {\sec ^2(c+d x) (a+b \sin (c+d x))^2 (4 a+7 b \sin (c+d x))}{8 d}-\frac {(3 (3 a-5 b) (a-b) b) \operatorname {Subst}\left (\int \frac {1}{-b-x} \, dx,x,b \sin (c+d x)\right )}{16 d}+\frac {(3 b (a+b) (3 a+5 b)) \operatorname {Subst}\left (\int \frac {1}{b-x} \, dx,x,b \sin (c+d x)\right )}{16 d}\\ &=-\frac {3 b (a+b) (3 a+5 b) \log (1-\sin (c+d x))}{16 d}+\frac {3 (3 a-5 b) (a-b) b \log (1+\sin (c+d x))}{16 d}-\frac {15 b^3 \sin (c+d x)}{8 d}+\frac {\sec ^4(c+d x) (a+b \sin (c+d x))^3}{4 d}-\frac {\sec ^2(c+d x) (a+b \sin (c+d x))^2 (4 a+7 b \sin (c+d x))}{8 d}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A] time = 0.44, size = 147, normalized size = 1.04 \[ \frac {\frac {(a-b)^3}{(\sin (c+d x)+1)^2}-\frac {3 (a-3 b) (a-b)^2}{\sin (c+d x)+1}+\frac {3 (a+b)^2 (a+3 b)}{\sin (c+d x)-1}+\frac {(a+b)^3}{(\sin (c+d x)-1)^2}+3 b (3 a-5 b) (a-b) \log (\sin (c+d x)+1)-3 b (a+b) (3 a+5 b) \log (1-\sin (c+d x))-16 b^3 \sin (c+d x)}{16 d} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 0.47, size = 176, normalized size = 1.24 \[ \frac {3 \, {\left (3 \, a^{2} b - 8 \, a b^{2} + 5 \, b^{3}\right )} \cos \left (d x + c\right )^{4} \log \left (\sin \left (d x + c\right ) + 1\right ) - 3 \, {\left (3 \, a^{2} b + 8 \, a b^{2} + 5 \, b^{3}\right )} \cos \left (d x + c\right )^{4} \log \left (-\sin \left (d x + c\right ) + 1\right ) + 4 \, a^{3} + 12 \, a b^{2} - 8 \, {\left (a^{3} + 6 \, a b^{2}\right )} \cos \left (d x + c\right )^{2} - 2 \, {\left (8 \, b^{3} \cos \left (d x + c\right )^{4} - 6 \, a^{2} b - 2 \, b^{3} + 3 \, {\left (5 \, a^{2} b + 3 \, b^{3}\right )} \cos \left (d x + c\right )^{2}\right )} \sin \left (d x + c\right )}{16 \, d \cos \left (d x + c\right )^{4}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [A] time = 0.29, size = 188, normalized size = 1.32 \[ -\frac {16 \, b^{3} \sin \left (d x + c\right ) - 3 \, {\left (3 \, a^{2} b - 8 \, a b^{2} + 5 \, b^{3}\right )} \log \left ({\left | \sin \left (d x + c\right ) + 1 \right |}\right ) + 3 \, {\left (3 \, a^{2} b + 8 \, a b^{2} + 5 \, b^{3}\right )} \log \left ({\left | \sin \left (d x + c\right ) - 1 \right |}\right ) - \frac {2 \, {\left (18 \, a b^{2} \sin \left (d x + c\right )^{4} + 15 \, a^{2} b \sin \left (d x + c\right )^{3} + 9 \, b^{3} \sin \left (d x + c\right )^{3} + 4 \, a^{3} \sin \left (d x + c\right )^{2} - 12 \, a b^{2} \sin \left (d x + c\right )^{2} - 9 \, a^{2} b \sin \left (d x + c\right ) - 7 \, b^{3} \sin \left (d x + c\right ) - 2 \, a^{3}\right )}}{{\left (\sin \left (d x + c\right )^{2} - 1\right )}^{2}}}{16 \, d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [B] time = 0.32, size = 297, normalized size = 2.09 \[ \frac {a^{3} \left (\sin ^{4}\left (d x +c \right )\right )}{4 d \cos \left (d x +c \right )^{4}}+\frac {3 a^{2} b \left (\sin ^{5}\left (d x +c \right )\right )}{4 d \cos \left (d x +c \right )^{4}}-\frac {3 a^{2} b \left (\sin ^{5}\left (d x +c \right )\right )}{8 d \cos \left (d x +c \right )^{2}}-\frac {3 a^{2} b \left (\sin ^{3}\left (d x +c \right )\right )}{8 d}-\frac {9 a^{2} b \sin \left (d x +c \right )}{8 d}+\frac {9 a^{2} b \ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )}{8 d}+\frac {3 a \,b^{2} \left (\tan ^{4}\left (d x +c \right )\right )}{4 d}-\frac {3 a \,b^{2} \left (\tan ^{2}\left (d x +c \right )\right )}{2 d}-\frac {3 a \,b^{2} \ln \left (\cos \left (d x +c \right )\right )}{d}+\frac {b^{3} \left (\sin ^{7}\left (d x +c \right )\right )}{4 d \cos \left (d x +c \right )^{4}}-\frac {3 b^{3} \left (\sin ^{7}\left (d x +c \right )\right )}{8 d \cos \left (d x +c \right )^{2}}-\frac {3 \left (\sin ^{5}\left (d x +c \right )\right ) b^{3}}{8 d}-\frac {5 b^{3} \left (\sin ^{3}\left (d x +c \right )\right )}{8 d}-\frac {15 b^{3} \sin \left (d x +c \right )}{8 d}+\frac {15 b^{3} \ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )}{8 d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [A] time = 0.34, size = 173, normalized size = 1.22 \[ -\frac {16 \, b^{3} \sin \left (d x + c\right ) - 3 \, {\left (3 \, a^{2} b - 8 \, a b^{2} + 5 \, b^{3}\right )} \log \left (\sin \left (d x + c\right ) + 1\right ) + 3 \, {\left (3 \, a^{2} b + 8 \, a b^{2} + 5 \, b^{3}\right )} \log \left (\sin \left (d x + c\right ) - 1\right ) - \frac {2 \, {\left (3 \, {\left (5 \, a^{2} b + 3 \, b^{3}\right )} \sin \left (d x + c\right )^{3} - 2 \, a^{3} - 18 \, a b^{2} + 4 \, {\left (a^{3} + 6 \, a b^{2}\right )} \sin \left (d x + c\right )^{2} - {\left (9 \, a^{2} b + 7 \, b^{3}\right )} \sin \left (d x + c\right )\right )}}{\sin \left (d x + c\right )^{4} - 2 \, \sin \left (d x + c\right )^{2} + 1}}{16 \, d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 12.09, size = 356, normalized size = 2.51 \[ \frac {{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^4\,\left (4\,a^3+18\,a\,b^2\right )-\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )\,\left (\frac {9\,a^2\,b}{4}+\frac {15\,b^3}{4}\right )+{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^6\,\left (4\,a^3+18\,a\,b^2\right )+{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^3\,\left (6\,a^2\,b+10\,b^3\right )+{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^7\,\left (6\,a^2\,b+10\,b^3\right )-{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^9\,\left (\frac {9\,a^2\,b}{4}+\frac {15\,b^3}{4}\right )+{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^5\,\left (\frac {33\,a^2\,b}{2}-\frac {9\,b^3}{2}\right )-6\,a\,b^2\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2-6\,a\,b^2\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^8}{d\,\left ({\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^{10}-3\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^8+2\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^6+2\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^4-3\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2+1\right )}+\frac {3\,a\,b^2\,\ln \left ({\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2+1\right )}{d}-\frac {3\,b\,\ln \left (\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )-1\right )\,\left (a+b\right )\,\left (3\,a+5\,b\right )}{8\,d}+\frac {3\,b\,\ln \left (\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )+1\right )\,\left (a-b\right )\,\left (3\,a-5\,b\right )}{8\,d} \]
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]
________________________________________________________________________________________