Integrand size = 29, antiderivative size = 160 \[ \int \cos ^5(c+d x) \sin ^n(c+d x) (a+a \sin (c+d x))^2 \, dx=\frac {a^2 \sin ^{1+n}(c+d x)}{d (1+n)}+\frac {2 a^2 \sin ^{2+n}(c+d x)}{d (2+n)}-\frac {a^2 \sin ^{3+n}(c+d x)}{d (3+n)}-\frac {4 a^2 \sin ^{4+n}(c+d x)}{d (4+n)}-\frac {a^2 \sin ^{5+n}(c+d x)}{d (5+n)}+\frac {2 a^2 \sin ^{6+n}(c+d x)}{d (6+n)}+\frac {a^2 \sin ^{7+n}(c+d x)}{d (7+n)} \] Output:
a^2*sin(d*x+c)^(1+n)/d/(1+n)+2*a^2*sin(d*x+c)^(2+n)/d/(2+n)-a^2*sin(d*x+c) ^(3+n)/d/(3+n)-4*a^2*sin(d*x+c)^(4+n)/d/(4+n)-a^2*sin(d*x+c)^(5+n)/d/(5+n) +2*a^2*sin(d*x+c)^(6+n)/d/(6+n)+a^2*sin(d*x+c)^(7+n)/d/(7+n)
Time = 0.46 (sec) , antiderivative size = 110, normalized size of antiderivative = 0.69 \[ \int \cos ^5(c+d x) \sin ^n(c+d x) (a+a \sin (c+d x))^2 \, dx=\frac {a^2 \sin ^{1+n}(c+d x) \left (\frac {1}{1+n}+\frac {2 \sin (c+d x)}{2+n}-\frac {\sin ^2(c+d x)}{3+n}-\frac {4 \sin ^3(c+d x)}{4+n}-\frac {\sin ^4(c+d x)}{5+n}+\frac {2 \sin ^5(c+d x)}{6+n}+\frac {\sin ^6(c+d x)}{7+n}\right )}{d} \] Input:
Integrate[Cos[c + d*x]^5*Sin[c + d*x]^n*(a + a*Sin[c + d*x])^2,x]
Output:
(a^2*Sin[c + d*x]^(1 + n)*((1 + n)^(-1) + (2*Sin[c + d*x])/(2 + n) - Sin[c + d*x]^2/(3 + n) - (4*Sin[c + d*x]^3)/(4 + n) - Sin[c + d*x]^4/(5 + n) + (2*Sin[c + d*x]^5)/(6 + n) + Sin[c + d*x]^6/(7 + n)))/d
Time = 0.42 (sec) , antiderivative size = 146, normalized size of antiderivative = 0.91, number of steps used = 5, number of rules used = 4, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.138, Rules used = {3042, 3315, 99, 2009}
Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.
\(\displaystyle \int \cos ^5(c+d x) (a \sin (c+d x)+a)^2 \sin ^n(c+d x) \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \cos (c+d x)^5 (a \sin (c+d x)+a)^2 \sin (c+d x)^ndx\) |
\(\Big \downarrow \) 3315 |
\(\displaystyle \frac {\int \sin ^n(c+d x) (a-a \sin (c+d x))^2 (\sin (c+d x) a+a)^4d(a \sin (c+d x))}{a^5 d}\) |
\(\Big \downarrow \) 99 |
\(\displaystyle \frac {\int \left (a^6 \sin ^n(c+d x)+2 a^6 \sin ^{n+1}(c+d x)-a^6 \sin ^{n+2}(c+d x)-4 a^6 \sin ^{n+3}(c+d x)-a^6 \sin ^{n+4}(c+d x)+2 a^6 \sin ^{n+5}(c+d x)+a^6 \sin ^{n+6}(c+d x)\right )d(a \sin (c+d x))}{a^5 d}\) |
\(\Big \downarrow \) 2009 |
\(\displaystyle \frac {\frac {a^7 \sin ^{n+1}(c+d x)}{n+1}+\frac {2 a^7 \sin ^{n+2}(c+d x)}{n+2}-\frac {a^7 \sin ^{n+3}(c+d x)}{n+3}-\frac {4 a^7 \sin ^{n+4}(c+d x)}{n+4}-\frac {a^7 \sin ^{n+5}(c+d x)}{n+5}+\frac {2 a^7 \sin ^{n+6}(c+d x)}{n+6}+\frac {a^7 \sin ^{n+7}(c+d x)}{n+7}}{a^5 d}\) |
Input:
Int[Cos[c + d*x]^5*Sin[c + d*x]^n*(a + a*Sin[c + d*x])^2,x]
Output:
((a^7*Sin[c + d*x]^(1 + n))/(1 + n) + (2*a^7*Sin[c + d*x]^(2 + n))/(2 + n) - (a^7*Sin[c + d*x]^(3 + n))/(3 + n) - (4*a^7*Sin[c + d*x]^(4 + n))/(4 + n) - (a^7*Sin[c + d*x]^(5 + n))/(5 + n) + (2*a^7*Sin[c + d*x]^(6 + n))/(6 + n) + (a^7*Sin[c + d*x]^(7 + n))/(7 + n))/(a^5*d)
Int[((a_.) + (b_.)*(x_))^(m_)*((c_.) + (d_.)*(x_))^(n_)*((e_.) + (f_.)*(x_) )^(p_), x_] :> Int[ExpandIntegrand[(a + b*x)^m*(c + d*x)^n*(e + f*x)^p, x], x] /; FreeQ[{a, b, c, d, e, f, p}, x] && IntegersQ[m, n] && (IntegerQ[p] | | (GtQ[m, 0] && GeQ[n, -1]))
Int[cos[(e_.) + (f_.)*(x_)]^(p_)*((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_ .)*((c_.) + (d_.)*sin[(e_.) + (f_.)*(x_)])^(n_.), x_Symbol] :> Simp[1/(b^p* f) Subst[Int[(a + x)^(m + (p - 1)/2)*(a - x)^((p - 1)/2)*(c + (d/b)*x)^n, x], x, b*Sin[e + f*x]], x] /; FreeQ[{a, b, e, f, c, d, m, n}, x] && Intege rQ[(p - 1)/2] && EqQ[a^2 - b^2, 0]
Time = 6.82 (sec) , antiderivative size = 215, normalized size of antiderivative = 1.34
method | result | size |
derivativedivides | \(\frac {a^{2} \sin \left (d x +c \right ) {\mathrm e}^{n \ln \left (\sin \left (d x +c \right )\right )}}{d \left (1+n \right )}+\frac {a^{2} \sin \left (d x +c \right )^{7} {\mathrm e}^{n \ln \left (\sin \left (d x +c \right )\right )}}{d \left (7+n \right )}+\frac {2 a^{2} \sin \left (d x +c \right )^{2} {\mathrm e}^{n \ln \left (\sin \left (d x +c \right )\right )}}{d \left (2+n \right )}-\frac {a^{2} \sin \left (d x +c \right )^{3} {\mathrm e}^{n \ln \left (\sin \left (d x +c \right )\right )}}{d \left (3+n \right )}-\frac {4 a^{2} \sin \left (d x +c \right )^{4} {\mathrm e}^{n \ln \left (\sin \left (d x +c \right )\right )}}{d \left (4+n \right )}-\frac {a^{2} \sin \left (d x +c \right )^{5} {\mathrm e}^{n \ln \left (\sin \left (d x +c \right )\right )}}{d \left (5+n \right )}+\frac {2 a^{2} \sin \left (d x +c \right )^{6} {\mathrm e}^{n \ln \left (\sin \left (d x +c \right )\right )}}{d \left (6+n \right )}\) | \(215\) |
default | \(\frac {a^{2} \sin \left (d x +c \right ) {\mathrm e}^{n \ln \left (\sin \left (d x +c \right )\right )}}{d \left (1+n \right )}+\frac {a^{2} \sin \left (d x +c \right )^{7} {\mathrm e}^{n \ln \left (\sin \left (d x +c \right )\right )}}{d \left (7+n \right )}+\frac {2 a^{2} \sin \left (d x +c \right )^{2} {\mathrm e}^{n \ln \left (\sin \left (d x +c \right )\right )}}{d \left (2+n \right )}-\frac {a^{2} \sin \left (d x +c \right )^{3} {\mathrm e}^{n \ln \left (\sin \left (d x +c \right )\right )}}{d \left (3+n \right )}-\frac {4 a^{2} \sin \left (d x +c \right )^{4} {\mathrm e}^{n \ln \left (\sin \left (d x +c \right )\right )}}{d \left (4+n \right )}-\frac {a^{2} \sin \left (d x +c \right )^{5} {\mathrm e}^{n \ln \left (\sin \left (d x +c \right )\right )}}{d \left (5+n \right )}+\frac {2 a^{2} \sin \left (d x +c \right )^{6} {\mathrm e}^{n \ln \left (\sin \left (d x +c \right )\right )}}{d \left (6+n \right )}\) | \(215\) |
parallelrisch | \(\frac {15 \sin \left (d x +c \right )^{n} \left (\frac {4 \left (7+n \right ) \left (5+n \right ) \left (3+n \right ) \left (1+n \right ) \left (n^{2}+6 n -120\right ) \cos \left (2 d x +2 c \right )}{15}-\frac {8 \left (n +12\right ) \left (7+n \right ) \left (5+n \right ) \left (3+n \right ) \left (2+n \right ) \left (1+n \right ) \cos \left (4 d x +4 c \right )}{15}-\frac {4 \left (7+n \right ) \left (5+n \right ) \left (4+n \right ) \left (3+n \right ) \left (2+n \right ) \left (1+n \right ) \cos \left (6 d x +6 c \right )}{15}+\left (4+n \right ) \left (1+n \right ) \left (n^{2}+\frac {224}{15} n +\frac {133}{3}\right ) \left (6+n \right ) \left (2+n \right ) \sin \left (3 d x +3 c \right )+\frac {\left (4+n \right ) \left (1+n \right ) \left (n +\frac {7}{3}\right ) \left (6+n \right ) \left (2+n \right ) \left (3+n \right ) \sin \left (5 d x +5 c \right )}{5}-\frac {\left (6+n \right ) \left (5+n \right ) \left (4+n \right ) \left (3+n \right ) \left (2+n \right ) \left (1+n \right ) \sin \left (7 d x +7 c \right )}{15}+\frac {11 \left (4+n \right ) \left (n^{3}+\frac {211}{11} n^{2}+\frac {1853}{11} n +\frac {4725}{11}\right ) \left (6+n \right ) \left (2+n \right ) \sin \left (d x +c \right )}{15}+\frac {8 \left (7+n \right ) \left (5+n \right ) \left (3+n \right ) \left (1+n \right ) \left (n^{2}+14 n +88\right )}{15}\right ) a^{2}}{64 \left (1+n \right ) \left (2+n \right ) \left (3+n \right ) \left (4+n \right ) \left (7+n \right ) \left (5+n \right ) d \left (6+n \right )}\) | \(282\) |
Input:
int(cos(d*x+c)^5*sin(d*x+c)^n*(a+a*sin(d*x+c))^2,x,method=_RETURNVERBOSE)
Output:
a^2/d/(1+n)*sin(d*x+c)*exp(n*ln(sin(d*x+c)))+a^2/d/(7+n)*sin(d*x+c)^7*exp( n*ln(sin(d*x+c)))+2*a^2/d/(2+n)*sin(d*x+c)^2*exp(n*ln(sin(d*x+c)))-a^2/d/( 3+n)*sin(d*x+c)^3*exp(n*ln(sin(d*x+c)))-4*a^2/d/(4+n)*sin(d*x+c)^4*exp(n*l n(sin(d*x+c)))-a^2/d/(5+n)*sin(d*x+c)^5*exp(n*ln(sin(d*x+c)))+2*a^2/d/(6+n )*sin(d*x+c)^6*exp(n*ln(sin(d*x+c)))
Leaf count of result is larger than twice the leaf count of optimal. 473 vs. \(2 (160) = 320\).
Time = 0.11 (sec) , antiderivative size = 473, normalized size of antiderivative = 2.96 \[ \int \cos ^5(c+d x) \sin ^n(c+d x) (a+a \sin (c+d x))^2 \, dx=-\frac {{\left (2 \, {\left (a^{2} n^{6} + 22 \, a^{2} n^{5} + 190 \, a^{2} n^{4} + 820 \, a^{2} n^{3} + 1849 \, a^{2} n^{2} + 2038 \, a^{2} n + 840 \, a^{2}\right )} \cos \left (d x + c\right )^{6} - 16 \, a^{2} n^{4} - 256 \, a^{2} n^{3} - 2 \, {\left (a^{2} n^{6} + 18 \, a^{2} n^{5} + 118 \, a^{2} n^{4} + 348 \, a^{2} n^{3} + 457 \, a^{2} n^{2} + 210 \, a^{2} n\right )} \cos \left (d x + c\right )^{4} - 1376 \, a^{2} n^{2} - 2816 \, a^{2} n - 8 \, {\left (a^{2} n^{5} + 16 \, a^{2} n^{4} + 86 \, a^{2} n^{3} + 176 \, a^{2} n^{2} + 105 \, a^{2} n\right )} \cos \left (d x + c\right )^{2} - 1680 \, a^{2} + {\left ({\left (a^{2} n^{6} + 21 \, a^{2} n^{5} + 175 \, a^{2} n^{4} + 735 \, a^{2} n^{3} + 1624 \, a^{2} n^{2} + 1764 \, a^{2} n + 720 \, a^{2}\right )} \cos \left (d x + c\right )^{6} - 16 \, a^{2} n^{4} - 256 \, a^{2} n^{3} - 2 \, {\left (a^{2} n^{6} + 20 \, a^{2} n^{5} + 159 \, a^{2} n^{4} + 640 \, a^{2} n^{3} + 1364 \, a^{2} n^{2} + 1440 \, a^{2} n + 576 \, a^{2}\right )} \cos \left (d x + c\right )^{4} - 1472 \, a^{2} n^{2} - 3584 \, a^{2} n - 8 \, {\left (a^{2} n^{5} + 17 \, a^{2} n^{4} + 108 \, a^{2} n^{3} + 316 \, a^{2} n^{2} + 416 \, a^{2} n + 192 \, a^{2}\right )} \cos \left (d x + c\right )^{2} - 3072 \, a^{2}\right )} \sin \left (d x + c\right )\right )} \sin \left (d x + c\right )^{n}}{d n^{7} + 28 \, d n^{6} + 322 \, d n^{5} + 1960 \, d n^{4} + 6769 \, d n^{3} + 13132 \, d n^{2} + 13068 \, d n + 5040 \, d} \] Input:
integrate(cos(d*x+c)^5*sin(d*x+c)^n*(a+a*sin(d*x+c))^2,x, algorithm="frica s")
Output:
-(2*(a^2*n^6 + 22*a^2*n^5 + 190*a^2*n^4 + 820*a^2*n^3 + 1849*a^2*n^2 + 203 8*a^2*n + 840*a^2)*cos(d*x + c)^6 - 16*a^2*n^4 - 256*a^2*n^3 - 2*(a^2*n^6 + 18*a^2*n^5 + 118*a^2*n^4 + 348*a^2*n^3 + 457*a^2*n^2 + 210*a^2*n)*cos(d* x + c)^4 - 1376*a^2*n^2 - 2816*a^2*n - 8*(a^2*n^5 + 16*a^2*n^4 + 86*a^2*n^ 3 + 176*a^2*n^2 + 105*a^2*n)*cos(d*x + c)^2 - 1680*a^2 + ((a^2*n^6 + 21*a^ 2*n^5 + 175*a^2*n^4 + 735*a^2*n^3 + 1624*a^2*n^2 + 1764*a^2*n + 720*a^2)*c os(d*x + c)^6 - 16*a^2*n^4 - 256*a^2*n^3 - 2*(a^2*n^6 + 20*a^2*n^5 + 159*a ^2*n^4 + 640*a^2*n^3 + 1364*a^2*n^2 + 1440*a^2*n + 576*a^2)*cos(d*x + c)^4 - 1472*a^2*n^2 - 3584*a^2*n - 8*(a^2*n^5 + 17*a^2*n^4 + 108*a^2*n^3 + 316 *a^2*n^2 + 416*a^2*n + 192*a^2)*cos(d*x + c)^2 - 3072*a^2)*sin(d*x + c))*s in(d*x + c)^n/(d*n^7 + 28*d*n^6 + 322*d*n^5 + 1960*d*n^4 + 6769*d*n^3 + 13 132*d*n^2 + 13068*d*n + 5040*d)
Leaf count of result is larger than twice the leaf count of optimal. 14997 vs. \(2 (134) = 268\).
Time = 16.53 (sec) , antiderivative size = 14997, normalized size of antiderivative = 93.73 \[ \int \cos ^5(c+d x) \sin ^n(c+d x) (a+a \sin (c+d x))^2 \, dx=\text {Too large to display} \] Input:
integrate(cos(d*x+c)**5*sin(d*x+c)**n*(a+a*sin(d*x+c))**2,x)
Output:
Piecewise((x*(a*sin(c) + a)**2*sin(c)**n*cos(c)**5, Eq(d, 0)), (a**2*log(s in(c + d*x))/d - 16*a**2/(15*d*sin(c + d*x)) + a**2*cos(c + d*x)**2/(2*d*s in(c + d*x)**2) - a**2/(6*d*sin(c + d*x)**2) + 8*a**2*cos(c + d*x)**2/(15* d*sin(c + d*x)**3) - a**2*cos(c + d*x)**4/(4*d*sin(c + d*x)**4) + a**2*cos (c + d*x)**2/(6*d*sin(c + d*x)**4) - 2*a**2*cos(c + d*x)**4/(5*d*sin(c + d *x)**5) - a**2*cos(c + d*x)**4/(6*d*sin(c + d*x)**6), Eq(n, -7)), (2*a**2* log(sin(c + d*x))/d + 8*a**2*sin(c + d*x)/(3*d) + 4*a**2*cos(c + d*x)**2/( 3*d*sin(c + d*x)) - 8*a**2/(15*d*sin(c + d*x)) + a**2*cos(c + d*x)**2/(d*s in(c + d*x)**2) - a**2*cos(c + d*x)**4/(3*d*sin(c + d*x)**3) + 4*a**2*cos( c + d*x)**2/(15*d*sin(c + d*x)**3) - a**2*cos(c + d*x)**4/(2*d*sin(c + d*x )**4) - a**2*cos(c + d*x)**4/(5*d*sin(c + d*x)**5), Eq(n, -6)), (192*a**2* log(tan(c/2 + d*x/2)**2 + 1)*tan(c/2 + d*x/2)**8/(192*d*tan(c/2 + d*x/2)** 8 + 384*d*tan(c/2 + d*x/2)**6 + 192*d*tan(c/2 + d*x/2)**4) + 384*a**2*log( tan(c/2 + d*x/2)**2 + 1)*tan(c/2 + d*x/2)**6/(192*d*tan(c/2 + d*x/2)**8 + 384*d*tan(c/2 + d*x/2)**6 + 192*d*tan(c/2 + d*x/2)**4) + 192*a**2*log(tan( c/2 + d*x/2)**2 + 1)*tan(c/2 + d*x/2)**4/(192*d*tan(c/2 + d*x/2)**8 + 384* d*tan(c/2 + d*x/2)**6 + 192*d*tan(c/2 + d*x/2)**4) - 192*a**2*log(tan(c/2 + d*x/2))*tan(c/2 + d*x/2)**8/(192*d*tan(c/2 + d*x/2)**8 + 384*d*tan(c/2 + d*x/2)**6 + 192*d*tan(c/2 + d*x/2)**4) - 384*a**2*log(tan(c/2 + d*x/2))*t an(c/2 + d*x/2)**6/(192*d*tan(c/2 + d*x/2)**8 + 384*d*tan(c/2 + d*x/2)*...
Time = 0.05 (sec) , antiderivative size = 143, normalized size of antiderivative = 0.89 \[ \int \cos ^5(c+d x) \sin ^n(c+d x) (a+a \sin (c+d x))^2 \, dx=\frac {\frac {a^{2} \sin \left (d x + c\right )^{n + 7}}{n + 7} + \frac {2 \, a^{2} \sin \left (d x + c\right )^{n + 6}}{n + 6} - \frac {a^{2} \sin \left (d x + c\right )^{n + 5}}{n + 5} - \frac {4 \, a^{2} \sin \left (d x + c\right )^{n + 4}}{n + 4} - \frac {a^{2} \sin \left (d x + c\right )^{n + 3}}{n + 3} + \frac {2 \, a^{2} \sin \left (d x + c\right )^{n + 2}}{n + 2} + \frac {a^{2} \sin \left (d x + c\right )^{n + 1}}{n + 1}}{d} \] Input:
integrate(cos(d*x+c)^5*sin(d*x+c)^n*(a+a*sin(d*x+c))^2,x, algorithm="maxim a")
Output:
(a^2*sin(d*x + c)^(n + 7)/(n + 7) + 2*a^2*sin(d*x + c)^(n + 6)/(n + 6) - a ^2*sin(d*x + c)^(n + 5)/(n + 5) - 4*a^2*sin(d*x + c)^(n + 4)/(n + 4) - a^2 *sin(d*x + c)^(n + 3)/(n + 3) + 2*a^2*sin(d*x + c)^(n + 2)/(n + 2) + a^2*s in(d*x + c)^(n + 1)/(n + 1))/d
Time = 0.17 (sec) , antiderivative size = 261, normalized size of antiderivative = 1.63 \[ \int \cos ^5(c+d x) \sin ^n(c+d x) (a+a \sin (c+d x))^2 \, dx=\frac {\frac {a^{2} \sin \left (d x + c\right )^{n} \sin \left (d x + c\right )^{5}}{n + 5} + \frac {a^{2} e^{\left (n \log \left (\sin \left (d x + c\right )\right ) + 2 \, \log \left (\sin \left (d x + c\right )\right )\right )} \sin \left (d x + c\right )^{5}}{n + 7} + \frac {2 \, a^{2} e^{\left (n \log \left (\sin \left (d x + c\right )\right ) + \log \left (\sin \left (d x + c\right )\right )\right )} \sin \left (d x + c\right )^{5}}{n + 6} - \frac {2 \, a^{2} \sin \left (d x + c\right )^{n} \sin \left (d x + c\right )^{3}}{n + 3} - \frac {2 \, a^{2} e^{\left (n \log \left (\sin \left (d x + c\right )\right ) + 2 \, \log \left (\sin \left (d x + c\right )\right )\right )} \sin \left (d x + c\right )^{3}}{n + 5} - \frac {4 \, a^{2} e^{\left (n \log \left (\sin \left (d x + c\right )\right ) + \log \left (\sin \left (d x + c\right )\right )\right )} \sin \left (d x + c\right )^{3}}{n + 4} + \frac {a^{2} \sin \left (d x + c\right )^{n + 3}}{n + 3} + \frac {2 \, a^{2} \sin \left (d x + c\right )^{n + 2}}{n + 2} + \frac {a^{2} \sin \left (d x + c\right )^{n + 1}}{n + 1}}{d} \] Input:
integrate(cos(d*x+c)^5*sin(d*x+c)^n*(a+a*sin(d*x+c))^2,x, algorithm="giac" )
Output:
(a^2*sin(d*x + c)^n*sin(d*x + c)^5/(n + 5) + a^2*e^(n*log(sin(d*x + c)) + 2*log(sin(d*x + c)))*sin(d*x + c)^5/(n + 7) + 2*a^2*e^(n*log(sin(d*x + c)) + log(sin(d*x + c)))*sin(d*x + c)^5/(n + 6) - 2*a^2*sin(d*x + c)^n*sin(d* x + c)^3/(n + 3) - 2*a^2*e^(n*log(sin(d*x + c)) + 2*log(sin(d*x + c)))*sin (d*x + c)^3/(n + 5) - 4*a^2*e^(n*log(sin(d*x + c)) + log(sin(d*x + c)))*si n(d*x + c)^3/(n + 4) + a^2*sin(d*x + c)^(n + 3)/(n + 3) + 2*a^2*sin(d*x + c)^(n + 2)/(n + 2) + a^2*sin(d*x + c)^(n + 1)/(n + 1))/d
Time = 41.72 (sec) , antiderivative size = 819, normalized size of antiderivative = 5.12 \[ \int \cos ^5(c+d x) \sin ^n(c+d x) (a+a \sin (c+d x))^2 \, dx =\text {Too large to display} \] Input:
int(cos(c + d*x)^5*sin(c + d*x)^n*(a + a*sin(c + d*x))^2,x)
Output:
(a^2*sin(c + d*x)^n*(n*16958i + n^2*10137i + n^3*2788i + n^4*398i + n^5*30 i + n^6*1i + 9240i))/(8*d*(n*13068i + n^2*13132i + n^3*6769i + n^4*1960i + n^5*322i + n^6*28i + n^7*1i + 5040i)) - (a^2*sin(c + d*x)^n*sin(7*c + 7*d *x)*(1764*n + 1624*n^2 + 735*n^3 + 175*n^4 + 21*n^5 + n^6 + 720)*1i)/(64*d *(n*13068i + n^2*13132i + n^3*6769i + n^4*1960i + n^5*322i + n^6*28i + n^7 *1i + 5040i)) + (a^2*sin(c + d*x)*sin(c + d*x)^n*(296844*n + 148360*n^2 + 36773*n^3 + 4869*n^4 + 343*n^5 + 11*n^6 + 226800)*1i)/(64*d*(n*13068i + n^ 2*13132i + n^3*6769i + n^4*1960i + n^5*322i + n^6*28i + n^7*1i + 5040i)) - (a^2*sin(c + d*x)^n*cos(6*c + 6*d*x)*(n*2038i + n^2*1849i + n^3*820i + n^ 4*190i + n^5*22i + n^6*1i + 840i))/(16*d*(n*13068i + n^2*13132i + n^3*6769 i + n^4*1960i + n^5*322i + n^6*28i + n^7*1i + 5040i)) - (a^2*sin(c + d*x)^ n*cos(4*c + 4*d*x)*(n*5694i + n^2*4633i + n^3*1764i + n^4*334i + n^5*30i + n^6*1i + 2520i))/(8*d*(n*13068i + n^2*13132i + n^3*6769i + n^4*1960i + n^ 5*322i + n^6*28i + n^7*1i + 5040i)) - (a^2*sin(c + d*x)^n*cos(2*c + 2*d*x) *(n*20490i + n^2*9159i + n^3*1228i - n^4*62i - n^5*22i - n^6*1i + 12600i)) /(16*d*(n*13068i + n^2*13132i + n^3*6769i + n^4*1960i + n^5*322i + n^6*28i + n^7*1i + 5040i)) + (a^2*sin(c + d*x)^n*sin(5*c + 5*d*x)*(2700*n + 2792* n^2 + 1445*n^3 + 397*n^4 + 55*n^5 + 3*n^6 + 1008)*1i)/(64*d*(n*13068i + n^ 2*13132i + n^3*6769i + n^4*1960i + n^5*322i + n^6*28i + n^7*1i + 5040i)) + (a^2*sin(c + d*x)^n*sin(3*c + 3*d*x)*(71932*n + 58568*n^2 + 22569*n^3 ...
\[ \int \cos ^5(c+d x) \sin ^n(c+d x) (a+a \sin (c+d x))^2 \, dx=a^{2} \left (\int \sin \left (d x +c \right )^{n} \cos \left (d x +c \right )^{5} \sin \left (d x +c \right )^{2}d x +2 \left (\int \sin \left (d x +c \right )^{n} \cos \left (d x +c \right )^{5} \sin \left (d x +c \right )d x \right )+\int \sin \left (d x +c \right )^{n} \cos \left (d x +c \right )^{5}d x \right ) \] Input:
int(cos(d*x+c)^5*sin(d*x+c)^n*(a+a*sin(d*x+c))^2,x)
Output:
a**2*(int(sin(c + d*x)**n*cos(c + d*x)**5*sin(c + d*x)**2,x) + 2*int(sin(c + d*x)**n*cos(c + d*x)**5*sin(c + d*x),x) + int(sin(c + d*x)**n*cos(c + d *x)**5,x))