Optimal. Leaf size=200 \[ \frac {a^2 \cos (c+d x) \sin ^{n+1}(c+d x) \, _2F_1\left (-\frac {5}{2},\frac {n+1}{2};\frac {n+3}{2};\sin ^2(c+d x)\right )}{d (n+1) \sqrt {\cos ^2(c+d x)}}+\frac {2 a^2 \cos (c+d x) \sin ^{n+2}(c+d x) \, _2F_1\left (-\frac {5}{2},\frac {n+2}{2};\frac {n+4}{2};\sin ^2(c+d x)\right )}{d (n+2) \sqrt {\cos ^2(c+d x)}}+\frac {a^2 \cos (c+d x) \sin ^{n+3}(c+d x) \, _2F_1\left (-\frac {5}{2},\frac {n+3}{2};\frac {n+5}{2};\sin ^2(c+d x)\right )}{d (n+3) \sqrt {\cos ^2(c+d x)}} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.24, antiderivative size = 200, normalized size of antiderivative = 1.00, number of steps used = 5, number of rules used = 2, integrand size = 29, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.069, Rules used = {2873, 2577} \[ \frac {a^2 \cos (c+d x) \sin ^{n+1}(c+d x) \, _2F_1\left (-\frac {5}{2},\frac {n+1}{2};\frac {n+3}{2};\sin ^2(c+d x)\right )}{d (n+1) \sqrt {\cos ^2(c+d x)}}+\frac {2 a^2 \cos (c+d x) \sin ^{n+2}(c+d x) \, _2F_1\left (-\frac {5}{2},\frac {n+2}{2};\frac {n+4}{2};\sin ^2(c+d x)\right )}{d (n+2) \sqrt {\cos ^2(c+d x)}}+\frac {a^2 \cos (c+d x) \sin ^{n+3}(c+d x) \, _2F_1\left (-\frac {5}{2},\frac {n+3}{2};\frac {n+5}{2};\sin ^2(c+d x)\right )}{d (n+3) \sqrt {\cos ^2(c+d x)}} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 2577
Rule 2873
Rubi steps
\begin {align*} \int \cos ^6(c+d x) \sin ^n(c+d x) (a+a \sin (c+d x))^2 \, dx &=\int \left (a^2 \cos ^6(c+d x) \sin ^n(c+d x)+2 a^2 \cos ^6(c+d x) \sin ^{1+n}(c+d x)+a^2 \cos ^6(c+d x) \sin ^{2+n}(c+d x)\right ) \, dx\\ &=a^2 \int \cos ^6(c+d x) \sin ^n(c+d x) \, dx+a^2 \int \cos ^6(c+d x) \sin ^{2+n}(c+d x) \, dx+\left (2 a^2\right ) \int \cos ^6(c+d x) \sin ^{1+n}(c+d x) \, dx\\ &=\frac {a^2 \cos (c+d x) \, _2F_1\left (-\frac {5}{2},\frac {1+n}{2};\frac {3+n}{2};\sin ^2(c+d x)\right ) \sin ^{1+n}(c+d x)}{d (1+n) \sqrt {\cos ^2(c+d x)}}+\frac {2 a^2 \cos (c+d x) \, _2F_1\left (-\frac {5}{2},\frac {2+n}{2};\frac {4+n}{2};\sin ^2(c+d x)\right ) \sin ^{2+n}(c+d x)}{d (2+n) \sqrt {\cos ^2(c+d x)}}+\frac {a^2 \cos (c+d x) \, _2F_1\left (-\frac {5}{2},\frac {3+n}{2};\frac {5+n}{2};\sin ^2(c+d x)\right ) \sin ^{3+n}(c+d x)}{d (3+n) \sqrt {\cos ^2(c+d x)}}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A] time = 0.29, size = 164, normalized size = 0.82 \[ \frac {a^2 \sqrt {\cos ^2(c+d x)} \sec (c+d x) \sin ^{n+1}(c+d x) \left (\left (n^2+5 n+6\right ) \, _2F_1\left (-\frac {5}{2},\frac {n+1}{2};\frac {n+3}{2};\sin ^2(c+d x)\right )+(n+1) \sin (c+d x) \left (2 (n+3) \, _2F_1\left (-\frac {5}{2},\frac {n+2}{2};\frac {n+4}{2};\sin ^2(c+d x)\right )+(n+2) \sin (c+d x) \, _2F_1\left (-\frac {5}{2},\frac {n+3}{2};\frac {n+5}{2};\sin ^2(c+d x)\right )\right )\right )}{d (n+1) (n+2) (n+3)} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [F] time = 0.85, size = 0, normalized size = 0.00 \[ {\rm integral}\left (-{\left (a^{2} \cos \left (d x + c\right )^{8} - 2 \, a^{2} \cos \left (d x + c\right )^{6} \sin \left (d x + c\right ) - 2 \, a^{2} \cos \left (d x + c\right )^{6}\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 (a \sin \left (d x + c\right ) + a\right )}^{2} \sin \left (d x + c\right )^{n} \cos \left (d x + c\right )^{6}\,{d x} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [F] time = 20.09, size = 0, normalized size = 0.00 \[ \int \left (\cos ^{6}\left (d x +c \right )\right ) \left (\sin ^{n}\left (d x +c \right )\right ) \left (a +a \sin \left (d x +c \right )\right )^{2}\, 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 (a \sin \left (d x + c\right ) + a\right )}^{2} \sin \left (d x + c\right )^{n} \cos \left (d x + c\right )^{6}\,{d x} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [F] time = 0.00, size = -1, normalized size = -0.00 \[ \int {\cos \left (c+d\,x\right )}^6\,{\sin \left (c+d\,x\right )}^n\,{\left (a+a\,\sin \left (c+d\,x\right )\right )}^2 \,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]
________________________________________________________________________________________