Integrand size = 31, antiderivative size = 129 \[ \int \sec ^8(c+d x) (a+a \sin (c+d x))^2 (A+B \sin (c+d x)) \, dx=\frac {a^2 (5 A-2 B) \sec ^5(c+d x)}{35 d}+\frac {(A+B) \sec ^7(c+d x) (a+a \sin (c+d x))^2}{7 d}+\frac {a^2 (5 A-2 B) \tan (c+d x)}{7 d}+\frac {2 a^2 (5 A-2 B) \tan ^3(c+d x)}{21 d}+\frac {a^2 (5 A-2 B) \tan ^5(c+d x)}{35 d} \] Output:
1/35*a^2*(5*A-2*B)*sec(d*x+c)^5/d+1/7*(A+B)*sec(d*x+c)^7*(a+a*sin(d*x+c))^ 2/d+1/7*a^2*(5*A-2*B)*tan(d*x+c)/d+2/21*a^2*(5*A-2*B)*tan(d*x+c)^3/d+1/35* a^2*(5*A-2*B)*tan(d*x+c)^5/d
Time = 0.40 (sec) , antiderivative size = 130, normalized size of antiderivative = 1.01 \[ \int \sec ^8(c+d x) (a+a \sin (c+d x))^2 (A+B \sin (c+d x)) \, dx=\frac {a^2 \left ((30 A+9 B) \sec ^7(c+d x)+105 A \sec ^6(c+d x) \tan (c+d x)+21 B \sec ^5(c+d x) \tan ^2(c+d x)-35 (5 A-2 B) \sec ^4(c+d x) \tan ^3(c+d x)+28 (5 A-2 B) \sec ^2(c+d x) \tan ^5(c+d x)+8 (-5 A+2 B) \tan ^7(c+d x)\right )}{105 d} \] Input:
Integrate[Sec[c + d*x]^8*(a + a*Sin[c + d*x])^2*(A + B*Sin[c + d*x]),x]
Output:
(a^2*((30*A + 9*B)*Sec[c + d*x]^7 + 105*A*Sec[c + d*x]^6*Tan[c + d*x] + 21 *B*Sec[c + d*x]^5*Tan[c + d*x]^2 - 35*(5*A - 2*B)*Sec[c + d*x]^4*Tan[c + d *x]^3 + 28*(5*A - 2*B)*Sec[c + d*x]^2*Tan[c + d*x]^5 + 8*(-5*A + 2*B)*Tan[ c + d*x]^7))/(105*d)
Time = 0.48 (sec) , antiderivative size = 99, normalized size of antiderivative = 0.77, number of steps used = 8, number of rules used = 7, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.226, Rules used = {3042, 3334, 3042, 3148, 3042, 4254, 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 \sec ^8(c+d x) (a \sin (c+d x)+a)^2 (A+B \sin (c+d x)) \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \frac {(a \sin (c+d x)+a)^2 (A+B \sin (c+d x))}{\cos (c+d x)^8}dx\) |
\(\Big \downarrow \) 3334 |
\(\displaystyle \frac {1}{7} a (5 A-2 B) \int \sec ^6(c+d x) (\sin (c+d x) a+a)dx+\frac {(A+B) \sec ^7(c+d x) (a \sin (c+d x)+a)^2}{7 d}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {1}{7} a (5 A-2 B) \int \frac {\sin (c+d x) a+a}{\cos (c+d x)^6}dx+\frac {(A+B) \sec ^7(c+d x) (a \sin (c+d x)+a)^2}{7 d}\) |
\(\Big \downarrow \) 3148 |
\(\displaystyle \frac {1}{7} a (5 A-2 B) \left (a \int \sec ^6(c+d x)dx+\frac {a \sec ^5(c+d x)}{5 d}\right )+\frac {(A+B) \sec ^7(c+d x) (a \sin (c+d x)+a)^2}{7 d}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {1}{7} a (5 A-2 B) \left (a \int \csc \left (c+d x+\frac {\pi }{2}\right )^6dx+\frac {a \sec ^5(c+d x)}{5 d}\right )+\frac {(A+B) \sec ^7(c+d x) (a \sin (c+d x)+a)^2}{7 d}\) |
\(\Big \downarrow \) 4254 |
\(\displaystyle \frac {1}{7} a (5 A-2 B) \left (\frac {a \sec ^5(c+d x)}{5 d}-\frac {a \int \left (\tan ^4(c+d x)+2 \tan ^2(c+d x)+1\right )d(-\tan (c+d x))}{d}\right )+\frac {(A+B) \sec ^7(c+d x) (a \sin (c+d x)+a)^2}{7 d}\) |
\(\Big \downarrow \) 2009 |
\(\displaystyle \frac {(A+B) \sec ^7(c+d x) (a \sin (c+d x)+a)^2}{7 d}+\frac {1}{7} a (5 A-2 B) \left (\frac {a \sec ^5(c+d x)}{5 d}-\frac {a \left (-\frac {1}{5} \tan ^5(c+d x)-\frac {2}{3} \tan ^3(c+d x)-\tan (c+d x)\right )}{d}\right )\) |
Input:
Int[Sec[c + d*x]^8*(a + a*Sin[c + d*x])^2*(A + B*Sin[c + d*x]),x]
Output:
((A + B)*Sec[c + d*x]^7*(a + a*Sin[c + d*x])^2)/(7*d) + (a*(5*A - 2*B)*((a *Sec[c + d*x]^5)/(5*d) - (a*(-Tan[c + d*x] - (2*Tan[c + d*x]^3)/3 - Tan[c + d*x]^5/5))/d))/7
Int[(cos[(e_.) + (f_.)*(x_)]*(g_.))^(p_)*((a_) + (b_.)*sin[(e_.) + (f_.)*(x _)]), x_Symbol] :> Simp[(-b)*((g*Cos[e + f*x])^(p + 1)/(f*g*(p + 1))), x] + Simp[a Int[(g*Cos[e + f*x])^p, x], x] /; FreeQ[{a, b, e, f, g, p}, x] && (IntegerQ[2*p] || NeQ[a^2 - b^2, 0])
Int[(cos[(e_.) + (f_.)*(x_)]*(g_.))^(p_)*((a_) + (b_.)*sin[(e_.) + (f_.)*(x _)])^(m_.)*((c_.) + (d_.)*sin[(e_.) + (f_.)*(x_)]), x_Symbol] :> Simp[(-(b* c + a*d))*(g*Cos[e + f*x])^(p + 1)*((a + b*Sin[e + f*x])^m/(a*f*g*(p + 1))) , x] + Simp[b*((a*d*m + b*c*(m + p + 1))/(a*g^2*(p + 1))) Int[(g*Cos[e + f*x])^(p + 2)*(a + b*Sin[e + f*x])^(m - 1), x], x] /; FreeQ[{a, b, c, d, e, f, g}, x] && EqQ[a^2 - b^2, 0] && GtQ[m, -1] && LtQ[p, -1]
Int[csc[(c_.) + (d_.)*(x_)]^(n_), x_Symbol] :> Simp[-d^(-1) Subst[Int[Exp andIntegrand[(1 + x^2)^(n/2 - 1), x], x], x, Cot[c + d*x]], x] /; FreeQ[{c, d}, x] && IGtQ[n/2, 0]
Result contains complex when optimal does not.
Time = 1.32 (sec) , antiderivative size = 188, normalized size of antiderivative = 1.46
method | result | size |
risch | \(-\frac {16 \left (70 i A \,a^{2} {\mathrm e}^{4 i \left (d x +c \right )}-28 i B \,a^{2} {\mathrm e}^{4 i \left (d x +c \right )}-6 i B \,a^{2} {\mathrm e}^{2 i \left (d x +c \right )}+15 i A \,a^{2} {\mathrm e}^{2 i \left (d x +c \right )}+2 i B \,a^{2}+40 A \,a^{2} {\mathrm e}^{3 i \left (d x +c \right )}+20 A \,a^{2} {\mathrm e}^{i \left (d x +c \right )}-5 i A \,a^{2}-16 B \,a^{2} {\mathrm e}^{3 i \left (d x +c \right )}+42 B \,a^{2} {\mathrm e}^{5 i \left (d x +c \right )}-8 B \,a^{2} {\mathrm e}^{i \left (d x +c \right )}\right )}{105 \left ({\mathrm e}^{i \left (d x +c \right )}+i\right )^{3} \left ({\mathrm e}^{i \left (d x +c \right )}-i\right )^{7} d}\) | \(188\) |
parallelrisch | \(-\frac {2 \left (A \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{9}+\left (B -2 A \right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{8}+\frac {4 \left (A -B \right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{7}}{3}+\frac {4 \left (2 A +B \right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{6}}{3}+2 \left (-A +\frac {2 B}{5}\right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{5}+\frac {2 \left (-2 A +\frac {B}{5}\right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{4}}{3}+\frac {4 \left (19 A -\frac {17 B}{5}\right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{3}}{21}+\frac {4 \left (-2 A +\frac {11 B}{5}\right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}}{7}+\frac {\left (-A -\frac {12 B}{5}\right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )}{7}+\frac {2 A}{7}+\frac {3 B}{35}\right ) a^{2}}{d \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )^{3} \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )^{7}}\) | \(206\) |
derivativedivides | \(\frac {A \,a^{2} \left (\frac {\sin \left (d x +c \right )^{3}}{7 \cos \left (d x +c \right )^{7}}+\frac {4 \sin \left (d x +c \right )^{3}}{35 \cos \left (d x +c \right )^{5}}+\frac {8 \sin \left (d x +c \right )^{3}}{105 \cos \left (d x +c \right )^{3}}\right )+a^{2} B \left (\frac {\sin \left (d x +c \right )^{4}}{7 \cos \left (d x +c \right )^{7}}+\frac {3 \sin \left (d x +c \right )^{4}}{35 \cos \left (d x +c \right )^{5}}+\frac {\sin \left (d x +c \right )^{4}}{35 \cos \left (d x +c \right )^{3}}-\frac {\sin \left (d x +c \right )^{4}}{35 \cos \left (d x +c \right )}-\frac {\left (2+\sin \left (d x +c \right )^{2}\right ) \cos \left (d x +c \right )}{35}\right )+\frac {2 A \,a^{2}}{7 \cos \left (d x +c \right )^{7}}+2 a^{2} B \left (\frac {\sin \left (d x +c \right )^{3}}{7 \cos \left (d x +c \right )^{7}}+\frac {4 \sin \left (d x +c \right )^{3}}{35 \cos \left (d x +c \right )^{5}}+\frac {8 \sin \left (d x +c \right )^{3}}{105 \cos \left (d x +c \right )^{3}}\right )-A \,a^{2} \left (-\frac {16}{35}-\frac {\sec \left (d x +c \right )^{6}}{7}-\frac {6 \sec \left (d x +c \right )^{4}}{35}-\frac {8 \sec \left (d x +c \right )^{2}}{35}\right ) \tan \left (d x +c \right )+\frac {a^{2} B}{7 \cos \left (d x +c \right )^{7}}}{d}\) | \(295\) |
default | \(\frac {A \,a^{2} \left (\frac {\sin \left (d x +c \right )^{3}}{7 \cos \left (d x +c \right )^{7}}+\frac {4 \sin \left (d x +c \right )^{3}}{35 \cos \left (d x +c \right )^{5}}+\frac {8 \sin \left (d x +c \right )^{3}}{105 \cos \left (d x +c \right )^{3}}\right )+a^{2} B \left (\frac {\sin \left (d x +c \right )^{4}}{7 \cos \left (d x +c \right )^{7}}+\frac {3 \sin \left (d x +c \right )^{4}}{35 \cos \left (d x +c \right )^{5}}+\frac {\sin \left (d x +c \right )^{4}}{35 \cos \left (d x +c \right )^{3}}-\frac {\sin \left (d x +c \right )^{4}}{35 \cos \left (d x +c \right )}-\frac {\left (2+\sin \left (d x +c \right )^{2}\right ) \cos \left (d x +c \right )}{35}\right )+\frac {2 A \,a^{2}}{7 \cos \left (d x +c \right )^{7}}+2 a^{2} B \left (\frac {\sin \left (d x +c \right )^{3}}{7 \cos \left (d x +c \right )^{7}}+\frac {4 \sin \left (d x +c \right )^{3}}{35 \cos \left (d x +c \right )^{5}}+\frac {8 \sin \left (d x +c \right )^{3}}{105 \cos \left (d x +c \right )^{3}}\right )-A \,a^{2} \left (-\frac {16}{35}-\frac {\sec \left (d x +c \right )^{6}}{7}-\frac {6 \sec \left (d x +c \right )^{4}}{35}-\frac {8 \sec \left (d x +c \right )^{2}}{35}\right ) \tan \left (d x +c \right )+\frac {a^{2} B}{7 \cos \left (d x +c \right )^{7}}}{d}\) | \(295\) |
Input:
int(sec(d*x+c)^8*(a+a*sin(d*x+c))^2*(A+B*sin(d*x+c)),x,method=_RETURNVERBO SE)
Output:
-16/105*(70*I*A*a^2*exp(4*I*(d*x+c))-28*I*B*a^2*exp(4*I*(d*x+c))-6*I*B*a^2 *exp(2*I*(d*x+c))+15*I*A*a^2*exp(2*I*(d*x+c))+2*I*B*a^2+40*A*a^2*exp(3*I*( d*x+c))+20*A*a^2*exp(I*(d*x+c))-5*I*A*a^2-16*B*a^2*exp(3*I*(d*x+c))+42*B*a ^2*exp(5*I*(d*x+c))-8*B*a^2*exp(I*(d*x+c)))/(exp(I*(d*x+c))+I)^3/(exp(I*(d *x+c))-I)^7/d
Time = 0.08 (sec) , antiderivative size = 157, normalized size of antiderivative = 1.22 \[ \int \sec ^8(c+d x) (a+a \sin (c+d x))^2 (A+B \sin (c+d x)) \, dx=-\frac {16 \, {\left (5 \, A - 2 \, B\right )} a^{2} \cos \left (d x + c\right )^{4} - 8 \, {\left (5 \, A - 2 \, B\right )} a^{2} \cos \left (d x + c\right )^{2} - 5 \, {\left (2 \, A - 5 \, B\right )} a^{2} - {\left (8 \, {\left (5 \, A - 2 \, B\right )} a^{2} \cos \left (d x + c\right )^{4} - 12 \, {\left (5 \, A - 2 \, B\right )} a^{2} \cos \left (d x + c\right )^{2} - 5 \, {\left (5 \, A - 2 \, B\right )} a^{2}\right )} \sin \left (d x + c\right )}{105 \, {\left (d \cos \left (d x + c\right )^{5} + 2 \, d \cos \left (d x + c\right )^{3} \sin \left (d x + c\right ) - 2 \, d \cos \left (d x + c\right )^{3}\right )}} \] Input:
integrate(sec(d*x+c)^8*(a+a*sin(d*x+c))^2*(A+B*sin(d*x+c)),x, algorithm="f ricas")
Output:
-1/105*(16*(5*A - 2*B)*a^2*cos(d*x + c)^4 - 8*(5*A - 2*B)*a^2*cos(d*x + c) ^2 - 5*(2*A - 5*B)*a^2 - (8*(5*A - 2*B)*a^2*cos(d*x + c)^4 - 12*(5*A - 2*B )*a^2*cos(d*x + c)^2 - 5*(5*A - 2*B)*a^2)*sin(d*x + c))/(d*cos(d*x + c)^5 + 2*d*cos(d*x + c)^3*sin(d*x + c) - 2*d*cos(d*x + c)^3)
Timed out. \[ \int \sec ^8(c+d x) (a+a \sin (c+d x))^2 (A+B \sin (c+d x)) \, dx=\text {Timed out} \] Input:
integrate(sec(d*x+c)**8*(a+a*sin(d*x+c))**2*(A+B*sin(d*x+c)),x)
Output:
Timed out
Time = 0.04 (sec) , antiderivative size = 178, normalized size of antiderivative = 1.38 \[ \int \sec ^8(c+d x) (a+a \sin (c+d x))^2 (A+B \sin (c+d x)) \, dx=\frac {{\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 )} A a^{2} + 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 a^{2} + 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 a^{2} - \frac {3 \, {\left (7 \, \cos \left (d x + c\right )^{2} - 5\right )} B a^{2}}{\cos \left (d x + c\right )^{7}} + \frac {30 \, A a^{2}}{\cos \left (d x + c\right )^{7}} + \frac {15 \, B a^{2}}{\cos \left (d x + c\right )^{7}}}{105 \, d} \] Input:
integrate(sec(d*x+c)^8*(a+a*sin(d*x+c))^2*(A+B*sin(d*x+c)),x, algorithm="m axima")
Output:
1/105*((15*tan(d*x + c)^7 + 42*tan(d*x + c)^5 + 35*tan(d*x + c)^3)*A*a^2 + 3*(5*tan(d*x + c)^7 + 21*tan(d*x + c)^5 + 35*tan(d*x + c)^3 + 35*tan(d*x + c))*A*a^2 + 2*(15*tan(d*x + c)^7 + 42*tan(d*x + c)^5 + 35*tan(d*x + c)^3 )*B*a^2 - 3*(7*cos(d*x + c)^2 - 5)*B*a^2/cos(d*x + c)^7 + 30*A*a^2/cos(d*x + c)^7 + 15*B*a^2/cos(d*x + c)^7)/d
Leaf count of result is larger than twice the leaf count of optimal. 325 vs. \(2 (119) = 238\).
Time = 0.19 (sec) , antiderivative size = 325, normalized size of antiderivative = 2.52 \[ \int \sec ^8(c+d x) (a+a \sin (c+d x))^2 (A+B \sin (c+d x)) \, dx=-\frac {\frac {35 \, {\left (9 \, A a^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} - 6 \, B a^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + 15 \, A a^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - 9 \, B a^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 8 \, A a^{2} - 5 \, B a^{2}\right )}}{{\left (\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 1\right )}^{3}} + \frac {1365 \, A a^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{6} + 210 \, B a^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{6} - 5775 \, A a^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{5} - 105 \, B a^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{5} + 12250 \, A a^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{4} - 175 \, B a^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{4} - 14350 \, A a^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} + 910 \, B a^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} + 10185 \, A a^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} - 756 \, B a^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} - 3955 \, A a^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 427 \, B a^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 760 \, A a^{2} - 31 \, B a^{2}}{{\left (\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - 1\right )}^{7}}}{840 \, d} \] Input:
integrate(sec(d*x+c)^8*(a+a*sin(d*x+c))^2*(A+B*sin(d*x+c)),x, algorithm="g iac")
Output:
-1/840*(35*(9*A*a^2*tan(1/2*d*x + 1/2*c)^2 - 6*B*a^2*tan(1/2*d*x + 1/2*c)^ 2 + 15*A*a^2*tan(1/2*d*x + 1/2*c) - 9*B*a^2*tan(1/2*d*x + 1/2*c) + 8*A*a^2 - 5*B*a^2)/(tan(1/2*d*x + 1/2*c) + 1)^3 + (1365*A*a^2*tan(1/2*d*x + 1/2*c )^6 + 210*B*a^2*tan(1/2*d*x + 1/2*c)^6 - 5775*A*a^2*tan(1/2*d*x + 1/2*c)^5 - 105*B*a^2*tan(1/2*d*x + 1/2*c)^5 + 12250*A*a^2*tan(1/2*d*x + 1/2*c)^4 - 175*B*a^2*tan(1/2*d*x + 1/2*c)^4 - 14350*A*a^2*tan(1/2*d*x + 1/2*c)^3 + 9 10*B*a^2*tan(1/2*d*x + 1/2*c)^3 + 10185*A*a^2*tan(1/2*d*x + 1/2*c)^2 - 756 *B*a^2*tan(1/2*d*x + 1/2*c)^2 - 3955*A*a^2*tan(1/2*d*x + 1/2*c) + 427*B*a^ 2*tan(1/2*d*x + 1/2*c) + 760*A*a^2 - 31*B*a^2)/(tan(1/2*d*x + 1/2*c) - 1)^ 7)/d
Time = 38.51 (sec) , antiderivative size = 274, normalized size of antiderivative = 2.12 \[ \int \sec ^8(c+d x) (a+a \sin (c+d x))^2 (A+B \sin (c+d x)) \, dx=-\frac {a^2\,\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )\,\left (\frac {25\,A\,\cos \left (\frac {5\,c}{2}+\frac {5\,d\,x}{2}\right )}{4}-\frac {105\,A\,\cos \left (\frac {3\,c}{2}+\frac {3\,d\,x}{2}\right )}{4}-\frac {95\,A\,\cos \left (\frac {7\,c}{2}+\frac {7\,d\,x}{2}\right )}{8}+\frac {15\,A\,\cos \left (\frac {9\,c}{2}+\frac {9\,d\,x}{2}\right )}{8}-21\,B\,\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )+\frac {105\,B\,\cos \left (\frac {3\,c}{2}+\frac {3\,d\,x}{2}\right )}{8}-\frac {41\,B\,\cos \left (\frac {5\,c}{2}+\frac {5\,d\,x}{2}\right )}{8}+\frac {55\,B\,\cos \left (\frac {7\,c}{2}+\frac {7\,d\,x}{2}\right )}{16}+\frac {9\,B\,\cos \left (\frac {9\,c}{2}+\frac {9\,d\,x}{2}\right )}{16}-\frac {125\,A\,\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )}{2}+\frac {55\,A\,\sin \left (\frac {3\,c}{2}+\frac {3\,d\,x}{2}\right )}{2}-\frac {25\,A\,\sin \left (\frac {5\,c}{2}+\frac {5\,d\,x}{2}\right )}{2}+5\,A\,\sin \left (\frac {7\,c}{2}+\frac {7\,d\,x}{2}\right )+\frac {5\,A\,\sin \left (\frac {9\,c}{2}+\frac {9\,d\,x}{2}\right )}{2}+\frac {37\,B\,\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )}{4}+\frac {19\,B\,\sin \left (\frac {3\,c}{2}+\frac {3\,d\,x}{2}\right )}{4}-\frac {B\,\sin \left (\frac {5\,c}{2}+\frac {5\,d\,x}{2}\right )}{4}+\frac {13\,B\,\sin \left (\frac {7\,c}{2}+\frac {7\,d\,x}{2}\right )}{4}-B\,\sin \left (\frac {9\,c}{2}+\frac {9\,d\,x}{2}\right )\right )}{1680\,d\,{\cos \left (\frac {c}{2}-\frac {\pi }{4}+\frac {d\,x}{2}\right )}^3\,{\cos \left (\frac {c}{2}+\frac {\pi }{4}+\frac {d\,x}{2}\right )}^7} \] Input:
int(((A + B*sin(c + d*x))*(a + a*sin(c + d*x))^2)/cos(c + d*x)^8,x)
Output:
-(a^2*cos(c/2 + (d*x)/2)*((25*A*cos((5*c)/2 + (5*d*x)/2))/4 - (105*A*cos(( 3*c)/2 + (3*d*x)/2))/4 - (95*A*cos((7*c)/2 + (7*d*x)/2))/8 + (15*A*cos((9* c)/2 + (9*d*x)/2))/8 - 21*B*cos(c/2 + (d*x)/2) + (105*B*cos((3*c)/2 + (3*d *x)/2))/8 - (41*B*cos((5*c)/2 + (5*d*x)/2))/8 + (55*B*cos((7*c)/2 + (7*d*x )/2))/16 + (9*B*cos((9*c)/2 + (9*d*x)/2))/16 - (125*A*sin(c/2 + (d*x)/2))/ 2 + (55*A*sin((3*c)/2 + (3*d*x)/2))/2 - (25*A*sin((5*c)/2 + (5*d*x)/2))/2 + 5*A*sin((7*c)/2 + (7*d*x)/2) + (5*A*sin((9*c)/2 + (9*d*x)/2))/2 + (37*B* sin(c/2 + (d*x)/2))/4 + (19*B*sin((3*c)/2 + (3*d*x)/2))/4 - (B*sin((5*c)/2 + (5*d*x)/2))/4 + (13*B*sin((7*c)/2 + (7*d*x)/2))/4 - B*sin((9*c)/2 + (9* d*x)/2)))/(1680*d*cos(c/2 - pi/4 + (d*x)/2)^3*cos(c/2 + pi/4 + (d*x)/2)^7)
Time = 0.18 (sec) , antiderivative size = 275, normalized size of antiderivative = 2.13 \[ \int \sec ^8(c+d x) (a+a \sin (c+d x))^2 (A+B \sin (c+d x)) \, dx=\frac {a^{2} \left (-45 \cos \left (d x +c \right ) \sin \left (d x +c \right )^{4} a +18 \cos \left (d x +c \right ) \sin \left (d x +c \right )^{4} b +90 \cos \left (d x +c \right ) \sin \left (d x +c \right )^{3} a -36 \cos \left (d x +c \right ) \sin \left (d x +c \right )^{3} b -90 \cos \left (d x +c \right ) \sin \left (d x +c \right ) a +36 \cos \left (d x +c \right ) \sin \left (d x +c \right ) b +45 \cos \left (d x +c \right ) a -18 \cos \left (d x +c \right ) b +80 \sin \left (d x +c \right )^{5} a -32 \sin \left (d x +c \right )^{5} b -160 \sin \left (d x +c \right )^{4} a +64 \sin \left (d x +c \right )^{4} b -40 \sin \left (d x +c \right )^{3} a +16 \sin \left (d x +c \right )^{3} b +240 \sin \left (d x +c \right )^{2} a -96 \sin \left (d x +c \right )^{2} b -90 \sin \left (d x +c \right ) a +36 \sin \left (d x +c \right ) b -60 a -18 b \right )}{210 \cos \left (d x +c \right ) d \left (\sin \left (d x +c \right )^{4}-2 \sin \left (d x +c \right )^{3}+2 \sin \left (d x +c \right )-1\right )} \] Input:
int(sec(d*x+c)^8*(a+a*sin(d*x+c))^2*(A+B*sin(d*x+c)),x)
Output:
(a**2*( - 45*cos(c + d*x)*sin(c + d*x)**4*a + 18*cos(c + d*x)*sin(c + d*x) **4*b + 90*cos(c + d*x)*sin(c + d*x)**3*a - 36*cos(c + d*x)*sin(c + d*x)** 3*b - 90*cos(c + d*x)*sin(c + d*x)*a + 36*cos(c + d*x)*sin(c + d*x)*b + 45 *cos(c + d*x)*a - 18*cos(c + d*x)*b + 80*sin(c + d*x)**5*a - 32*sin(c + d* x)**5*b - 160*sin(c + d*x)**4*a + 64*sin(c + d*x)**4*b - 40*sin(c + d*x)** 3*a + 16*sin(c + d*x)**3*b + 240*sin(c + d*x)**2*a - 96*sin(c + d*x)**2*b - 90*sin(c + d*x)*a + 36*sin(c + d*x)*b - 60*a - 18*b))/(210*cos(c + d*x)* d*(sin(c + d*x)**4 - 2*sin(c + d*x)**3 + 2*sin(c + d*x) - 1))