Optimal. Leaf size=186 \[ \frac {a \left (a^2 (3-n)-3 b^2 (n+1)\right ) \sin ^{n+1}(c+d x) \, _2F_1\left (2,\frac {n+1}{2};\frac {n+3}{2};\sin ^2(c+d x)\right )}{4 d (n+1)}+\frac {b \left (3 a^2 (2-n)-b^2 (n+2)\right ) \sin ^{n+2}(c+d x) \, _2F_1\left (2,\frac {n+2}{2};\frac {n+4}{2};\sin ^2(c+d x)\right )}{4 d (n+2)}+\frac {\sec ^4(c+d x) \sin ^{n+1}(c+d x) \left (b \left (3 a^2+b^2\right ) \sin (c+d x)+a \left (a^2+3 b^2\right )\right )}{4 d} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.30, antiderivative size = 186, normalized size of antiderivative = 1.00, number of steps used = 5, number of rules used = 4, integrand size = 29, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.138, Rules used = {2837, 1806, 808, 364} \[ \frac {a \left (a^2 (3-n)-3 b^2 (n+1)\right ) \sin ^{n+1}(c+d x) \, _2F_1\left (2,\frac {n+1}{2};\frac {n+3}{2};\sin ^2(c+d x)\right )}{4 d (n+1)}+\frac {b \left (3 a^2 (2-n)-b^2 (n+2)\right ) \sin ^{n+2}(c+d x) \, _2F_1\left (2,\frac {n+2}{2};\frac {n+4}{2};\sin ^2(c+d x)\right )}{4 d (n+2)}+\frac {\sec ^4(c+d x) \sin ^{n+1}(c+d x) \left (b \left (3 a^2+b^2\right ) \sin (c+d x)+a \left (a^2+3 b^2\right )\right )}{4 d} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 364
Rule 808
Rule 1806
Rule 2837
Rubi steps
\begin {align*} \int \sec ^5(c+d x) \sin ^n(c+d x) (a+b \sin (c+d x))^3 \, dx &=\frac {b^5 \operatorname {Subst}\left (\int \frac {\left (\frac {x}{b}\right )^n (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) \sin ^{1+n}(c+d x) \left (a \left (a^2+3 b^2\right )+b \left (3 a^2+b^2\right ) \sin (c+d x)\right )}{4 d}-\frac {b^3 \operatorname {Subst}\left (\int \frac {\left (\frac {x}{b}\right )^n \left (-a \left (a^2 (3-n)-3 b^2 (1+n)\right )-\left (3 a^2 (2-n)-b^2 (2+n)\right ) x\right )}{\left (b^2-x^2\right )^2} \, dx,x,b \sin (c+d x)\right )}{4 d}\\ &=\frac {\sec ^4(c+d x) \sin ^{1+n}(c+d x) \left (a \left (a^2+3 b^2\right )+b \left (3 a^2+b^2\right ) \sin (c+d x)\right )}{4 d}+\frac {\left (a b^3 \left (a^2 (3-n)-3 b^2 (1+n)\right )\right ) \operatorname {Subst}\left (\int \frac {\left (\frac {x}{b}\right )^n}{\left (b^2-x^2\right )^2} \, dx,x,b \sin (c+d x)\right )}{4 d}+\frac {\left (b^4 \left (3 a^2 (2-n)-b^2 (2+n)\right )\right ) \operatorname {Subst}\left (\int \frac {\left (\frac {x}{b}\right )^{1+n}}{\left (b^2-x^2\right )^2} \, dx,x,b \sin (c+d x)\right )}{4 d}\\ &=\frac {a \left (a^2 (3-n)-3 b^2 (1+n)\right ) \, _2F_1\left (2,\frac {1+n}{2};\frac {3+n}{2};\sin ^2(c+d x)\right ) \sin ^{1+n}(c+d x)}{4 d (1+n)}+\frac {b \left (3 a^2 (2-n)-b^2 (2+n)\right ) \, _2F_1\left (2,\frac {2+n}{2};\frac {4+n}{2};\sin ^2(c+d x)\right ) \sin ^{2+n}(c+d x)}{4 d (2+n)}+\frac {\sec ^4(c+d x) \sin ^{1+n}(c+d x) \left (a \left (a^2+3 b^2\right )+b \left (3 a^2+b^2\right ) \sin (c+d x)\right )}{4 d}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A] time = 0.16, size = 158, normalized size = 0.85 \[ \frac {\sin ^{n+1}(c+d x) \left (6 a (a+b) (a-b) \, _2F_1\left (1,\frac {n+1}{2};\frac {n+3}{2};\sin ^2(c+d x)\right )+2 (a-b)^3 \, _2F_1(3,n+1;n+2;-\sin (c+d x))+3 (a+b) (a-b)^2 \, _2F_1(2,n+1;n+2;-\sin (c+d x))+3 (a+b)^2 (a-b) \, _2F_1(2,n+1;n+2;\sin (c+d x))+2 (a+b)^3 \, _2F_1(3,n+1;n+2;\sin (c+d x))\right )}{16 d (n+1)} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [F] time = 0.46, size = 0, normalized size = 0.00 \[ {\rm integral}\left (-{\left ({\left (b^{3} \cos \left (d x + c\right )^{2} - 3 \, a^{2} b - b^{3}\right )} \sec \left (d x + c\right )^{5} \sin \left (d x + c\right ) + {\left (3 \, a b^{2} \cos \left (d x + c\right )^{2} - a^{3} - 3 \, a b^{2}\right )} \sec \left (d x + c\right )^{5}\right )} \sin \left (d x + c\right )^{n}, x\right ) \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [F] time = 0.00, size = 0, normalized size = 0.00 \[ \int {\left (b \sin \left (d x + c\right ) + a\right )}^{3} \sin \left (d x + c\right )^{n} \sec \left (d x + c\right )^{5}\,{d x} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [F] time = 5.23, size = 0, normalized size = 0.00 \[ \int \left (\sec ^{5}\left (d x +c \right )\right ) \left (\sin ^{n}\left (d x +c \right )\right ) \left (a +b \sin \left (d x +c \right )\right )^{3}\, dx \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [F] time = 0.00, size = 0, normalized size = 0.00 \[ \int {\left (b \sin \left (d x + c\right ) + a\right )}^{3} \sin \left (d x + c\right )^{n} \sec \left (d x + c\right )^{5}\,{d x} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [F] time = 0.00, size = -1, normalized size = -0.01 \[ \int \frac {{\sin \left (c+d\,x\right )}^n\,{\left (a+b\,\sin \left (c+d\,x\right )\right )}^3}{{\cos \left (c+d\,x\right )}^5} \,d x \]
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]
________________________________________________________________________________________