3.26 \(\int \sec ^8(c+d x) (a+a \sin (c+d x))^2 \, dx\)

Optimal. Leaf size=82 \[ \frac {a^2 \tan ^5(c+d x)}{7 d}+\frac {10 a^2 \tan ^3(c+d x)}{21 d}+\frac {5 a^2 \tan (c+d x)}{7 d}+\frac {2 \sec ^7(c+d x) \left (a^2 \sin (c+d x)+a^2\right )}{7 d} \]

[Out]

2/7*sec(d*x+c)^7*(a^2+a^2*sin(d*x+c))/d+5/7*a^2*tan(d*x+c)/d+10/21*a^2*tan(d*x+c)^3/d+1/7*a^2*tan(d*x+c)^5/d

________________________________________________________________________________________

Rubi [A]  time = 0.06, antiderivative size = 82, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 2, integrand size = 21, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.095, Rules used = {2676, 3767} \[ \frac {a^2 \tan ^5(c+d x)}{7 d}+\frac {10 a^2 \tan ^3(c+d x)}{21 d}+\frac {5 a^2 \tan (c+d x)}{7 d}+\frac {2 \sec ^7(c+d x) \left (a^2 \sin (c+d x)+a^2\right )}{7 d} \]

Antiderivative was successfully verified.

[In]

Int[Sec[c + d*x]^8*(a + a*Sin[c + d*x])^2,x]

[Out]

(2*Sec[c + d*x]^7*(a^2 + a^2*Sin[c + d*x]))/(7*d) + (5*a^2*Tan[c + d*x])/(7*d) + (10*a^2*Tan[c + d*x]^3)/(21*d
) + (a^2*Tan[c + d*x]^5)/(7*d)

Rule 2676

Int[(cos[(e_.) + (f_.)*(x_)]*(g_.))^(p_)*((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_), x_Symbol] :> Simp[(-2*b*
(g*Cos[e + f*x])^(p + 1)*(a + b*Sin[e + f*x])^(m - 1))/(f*g*(p + 1)), x] + Dist[(b^2*(2*m + p - 1))/(g^2*(p +
1)), Int[(g*Cos[e + f*x])^(p + 2)*(a + b*Sin[e + f*x])^(m - 2), x], x] /; FreeQ[{a, b, e, f, g}, x] && EqQ[a^2
 - b^2, 0] && GtQ[m, 1] && LtQ[p, -1] && IntegersQ[2*m, 2*p]

Rule 3767

Int[csc[(c_.) + (d_.)*(x_)]^(n_), x_Symbol] :> -Dist[d^(-1), Subst[Int[ExpandIntegrand[(1 + x^2)^(n/2 - 1), x]
, x], x, Cot[c + d*x]], x] /; FreeQ[{c, d}, x] && IGtQ[n/2, 0]

Rubi steps

\begin {align*} \int \sec ^8(c+d x) (a+a \sin (c+d x))^2 \, dx &=\frac {2 \sec ^7(c+d x) \left (a^2+a^2 \sin (c+d x)\right )}{7 d}+\frac {1}{7} \left (5 a^2\right ) \int \sec ^6(c+d x) \, dx\\ &=\frac {2 \sec ^7(c+d x) \left (a^2+a^2 \sin (c+d x)\right )}{7 d}-\frac {\left (5 a^2\right ) \operatorname {Subst}\left (\int \left (1+2 x^2+x^4\right ) \, dx,x,-\tan (c+d x)\right )}{7 d}\\ &=\frac {2 \sec ^7(c+d x) \left (a^2+a^2 \sin (c+d x)\right )}{7 d}+\frac {5 a^2 \tan (c+d x)}{7 d}+\frac {10 a^2 \tan ^3(c+d x)}{21 d}+\frac {a^2 \tan ^5(c+d x)}{7 d}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]  time = 0.02, size = 110, normalized size = 1.34 \[ -\frac {8 a^2 \tan ^7(c+d x)}{21 d}+\frac {2 a^2 \sec ^7(c+d x)}{7 d}+\frac {a^2 \tan (c+d x) \sec ^6(c+d x)}{d}-\frac {5 a^2 \tan ^3(c+d x) \sec ^4(c+d x)}{3 d}+\frac {4 a^2 \tan ^5(c+d x) \sec ^2(c+d x)}{3 d} \]

Antiderivative was successfully verified.

[In]

Integrate[Sec[c + d*x]^8*(a + a*Sin[c + d*x])^2,x]

[Out]

(2*a^2*Sec[c + d*x]^7)/(7*d) + (a^2*Sec[c + d*x]^6*Tan[c + d*x])/d - (5*a^2*Sec[c + d*x]^4*Tan[c + d*x]^3)/(3*
d) + (4*a^2*Sec[c + d*x]^2*Tan[c + d*x]^5)/(3*d) - (8*a^2*Tan[c + d*x]^7)/(21*d)

________________________________________________________________________________________

fricas [A]  time = 0.60, size = 115, normalized size = 1.40 \[ -\frac {16 \, a^{2} \cos \left (d x + c\right )^{4} - 8 \, a^{2} \cos \left (d x + c\right )^{2} - 2 \, a^{2} - {\left (8 \, a^{2} \cos \left (d x + c\right )^{4} - 12 \, a^{2} \cos \left (d x + c\right )^{2} - 5 \, a^{2}\right )} \sin \left (d x + c\right )}{21 \, {\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 )}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sec(d*x+c)^8*(a+a*sin(d*x+c))^2,x, algorithm="fricas")

[Out]

-1/21*(16*a^2*cos(d*x + c)^4 - 8*a^2*cos(d*x + c)^2 - 2*a^2 - (8*a^2*cos(d*x + c)^4 - 12*a^2*cos(d*x + c)^2 -
5*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)

________________________________________________________________________________________

giac [B]  time = 0.65, size = 171, normalized size = 2.09 \[ -\frac {\frac {7 \, {\left (9 \, a^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + 15 \, a^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 8 \, a^{2}\right )}}{{\left (\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 1\right )}^{3}} + \frac {273 \, a^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{6} - 1155 \, a^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{5} + 2450 \, a^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{4} - 2870 \, a^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} + 2037 \, a^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} - 791 \, a^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 152 \, a^{2}}{{\left (\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - 1\right )}^{7}}}{168 \, d} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sec(d*x+c)^8*(a+a*sin(d*x+c))^2,x, algorithm="giac")

[Out]

-1/168*(7*(9*a^2*tan(1/2*d*x + 1/2*c)^2 + 15*a^2*tan(1/2*d*x + 1/2*c) + 8*a^2)/(tan(1/2*d*x + 1/2*c) + 1)^3 +
(273*a^2*tan(1/2*d*x + 1/2*c)^6 - 1155*a^2*tan(1/2*d*x + 1/2*c)^5 + 2450*a^2*tan(1/2*d*x + 1/2*c)^4 - 2870*a^2
*tan(1/2*d*x + 1/2*c)^3 + 2037*a^2*tan(1/2*d*x + 1/2*c)^2 - 791*a^2*tan(1/2*d*x + 1/2*c) + 152*a^2)/(tan(1/2*d
*x + 1/2*c) - 1)^7)/d

________________________________________________________________________________________

maple [A]  time = 0.24, size = 121, normalized size = 1.48 \[ \frac {a^{2} \left (\frac {\sin ^{3}\left (d x +c \right )}{7 \cos \left (d x +c \right )^{7}}+\frac {4 \left (\sin ^{3}\left (d x +c \right )\right )}{35 \cos \left (d x +c \right )^{5}}+\frac {8 \left (\sin ^{3}\left (d x +c \right )\right )}{105 \cos \left (d x +c \right )^{3}}\right )+\frac {2 a^{2}}{7 \cos \left (d x +c \right )^{7}}-a^{2} \left (-\frac {16}{35}-\frac {\left (\sec ^{6}\left (d x +c \right )\right )}{7}-\frac {6 \left (\sec ^{4}\left (d x +c \right )\right )}{35}-\frac {8 \left (\sec ^{2}\left (d x +c \right )\right )}{35}\right ) \tan \left (d x +c \right )}{d} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(sec(d*x+c)^8*(a+a*sin(d*x+c))^2,x)

[Out]

1/d*(a^2*(1/7*sin(d*x+c)^3/cos(d*x+c)^7+4/35*sin(d*x+c)^3/cos(d*x+c)^5+8/105*sin(d*x+c)^3/cos(d*x+c)^3)+2/7*a^
2/cos(d*x+c)^7-a^2*(-16/35-1/7*sec(d*x+c)^6-6/35*sec(d*x+c)^4-8/35*sec(d*x+c)^2)*tan(d*x+c))

________________________________________________________________________________________

maxima [A]  time = 0.33, size = 98, normalized size = 1.20 \[ \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^{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^{2} + \frac {30 \, a^{2}}{\cos \left (d x + c\right )^{7}}}{105 \, d} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sec(d*x+c)^8*(a+a*sin(d*x+c))^2,x, algorithm="maxima")

[Out]

1/105*((15*tan(d*x + c)^7 + 42*tan(d*x + c)^5 + 35*tan(d*x + c)^3)*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^2 + 30*a^2/cos(d*x + c)^7)/d

________________________________________________________________________________________

mupad [B]  time = 5.07, size = 276, normalized size = 3.37 \[ \frac {2\,a^2\,\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )\,\left (6\,{\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )}^9-3\,{\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )}^8\,\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )-24\,{\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )}^7\,{\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2+76\,{\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )}^6\,{\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )}^3-28\,{\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )}^5\,{\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )}^4-42\,{\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )}^4\,{\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )}^5+56\,{\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )}^3\,{\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )}^6+28\,{\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2\,{\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )}^7-42\,\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )\,{\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )}^8+21\,{\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )}^9\right )}{21\,d\,{\left (\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )-\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )\right )}^7\,{\left (\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )+\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )\right )}^3} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((a + a*sin(c + d*x))^2/cos(c + d*x)^8,x)

[Out]

(2*a^2*cos(c/2 + (d*x)/2)*(6*cos(c/2 + (d*x)/2)^9 + 21*sin(c/2 + (d*x)/2)^9 - 42*cos(c/2 + (d*x)/2)*sin(c/2 +
(d*x)/2)^8 - 3*cos(c/2 + (d*x)/2)^8*sin(c/2 + (d*x)/2) + 28*cos(c/2 + (d*x)/2)^2*sin(c/2 + (d*x)/2)^7 + 56*cos
(c/2 + (d*x)/2)^3*sin(c/2 + (d*x)/2)^6 - 42*cos(c/2 + (d*x)/2)^4*sin(c/2 + (d*x)/2)^5 - 28*cos(c/2 + (d*x)/2)^
5*sin(c/2 + (d*x)/2)^4 + 76*cos(c/2 + (d*x)/2)^6*sin(c/2 + (d*x)/2)^3 - 24*cos(c/2 + (d*x)/2)^7*sin(c/2 + (d*x
)/2)^2))/(21*d*(cos(c/2 + (d*x)/2) - sin(c/2 + (d*x)/2))^7*(cos(c/2 + (d*x)/2) + sin(c/2 + (d*x)/2))^3)

________________________________________________________________________________________

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]

integrate(sec(d*x+c)**8*(a+a*sin(d*x+c))**2,x)

[Out]

Timed out

________________________________________________________________________________________