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

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

[Out]

1/7*a*b*sec(d*x+c)^5/d+1/7*sec(d*x+c)^7*(b+a*sin(d*x+c))*(a+b*sin(d*x+c))/d+1/7*(6*a^2-b^2)*tan(d*x+c)/d+2/21*
(6*a^2-b^2)*tan(d*x+c)^3/d+1/35*(6*a^2-b^2)*tan(d*x+c)^5/d

________________________________________________________________________________________

Rubi [A]  time = 0.12, antiderivative size = 129, normalized size of antiderivative = 1.00, number of steps used = 4, number of rules used = 3, integrand size = 21, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.143, Rules used = {2691, 2669, 3767} \[ \frac {\left (6 a^2-b^2\right ) \tan ^5(c+d x)}{35 d}+\frac {2 \left (6 a^2-b^2\right ) \tan ^3(c+d x)}{21 d}+\frac {\left (6 a^2-b^2\right ) \tan (c+d x)}{7 d}+\frac {a b \sec ^5(c+d x)}{7 d}+\frac {\sec ^7(c+d x) (a \sin (c+d x)+b) (a+b \sin (c+d x))}{7 d} \]

Antiderivative was successfully verified.

[In]

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

[Out]

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

Rule 2669

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] + Dist[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])

Rule 2691

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

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+b \sin (c+d x))^2 \, dx &=\frac {\sec ^7(c+d x) (b+a \sin (c+d x)) (a+b \sin (c+d x))}{7 d}-\frac {1}{7} \int \sec ^6(c+d x) \left (-6 a^2+b^2-5 a b \sin (c+d x)\right ) \, dx\\ &=\frac {a b \sec ^5(c+d x)}{7 d}+\frac {\sec ^7(c+d x) (b+a \sin (c+d x)) (a+b \sin (c+d x))}{7 d}-\frac {1}{7} \left (-6 a^2+b^2\right ) \int \sec ^6(c+d x) \, dx\\ &=\frac {a b \sec ^5(c+d x)}{7 d}+\frac {\sec ^7(c+d x) (b+a \sin (c+d x)) (a+b \sin (c+d x))}{7 d}-\frac {\left (6 a^2-b^2\right ) \operatorname {Subst}\left (\int \left (1+2 x^2+x^4\right ) \, dx,x,-\tan (c+d x)\right )}{7 d}\\ &=\frac {a b \sec ^5(c+d x)}{7 d}+\frac {\sec ^7(c+d x) (b+a \sin (c+d x)) (a+b \sin (c+d x))}{7 d}+\frac {\left (6 a^2-b^2\right ) \tan (c+d x)}{7 d}+\frac {2 \left (6 a^2-b^2\right ) \tan ^3(c+d x)}{21 d}+\frac {\left (6 a^2-b^2\right ) \tan ^5(c+d x)}{35 d}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]  time = 0.81, size = 110, normalized size = 0.85 \[ \frac {\sec ^7(c+d x) \left (105 \left (2 a^2+b^2\right ) \sin (c+d x)+21 \left (6 a^2-b^2\right ) \sin (3 (c+d x))+42 a^2 \sin (5 (c+d x))+6 a^2 \sin (7 (c+d x))+240 a b-7 b^2 \sin (5 (c+d x))-b^2 \sin (7 (c+d x))\right )}{840 d} \]

Antiderivative was successfully verified.

[In]

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

[Out]

(Sec[c + d*x]^7*(240*a*b + 105*(2*a^2 + b^2)*Sin[c + d*x] + 21*(6*a^2 - b^2)*Sin[3*(c + d*x)] + 42*a^2*Sin[5*(
c + d*x)] - 7*b^2*Sin[5*(c + d*x)] + 6*a^2*Sin[7*(c + d*x)] - b^2*Sin[7*(c + d*x)]))/(840*d)

________________________________________________________________________________________

fricas [A]  time = 0.45, size = 99, normalized size = 0.77 \[ \frac {30 \, a b + {\left (8 \, {\left (6 \, a^{2} - b^{2}\right )} \cos \left (d x + c\right )^{6} + 4 \, {\left (6 \, a^{2} - b^{2}\right )} \cos \left (d x + c\right )^{4} + 3 \, {\left (6 \, a^{2} - b^{2}\right )} \cos \left (d x + c\right )^{2} + 15 \, a^{2} + 15 \, b^{2}\right )} \sin \left (d x + c\right )}{105 \, d \cos \left (d x + c\right )^{7}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

1/105*(30*a*b + (8*(6*a^2 - b^2)*cos(d*x + c)^6 + 4*(6*a^2 - b^2)*cos(d*x + c)^4 + 3*(6*a^2 - b^2)*cos(d*x + c
)^2 + 15*a^2 + 15*b^2)*sin(d*x + c))/(d*cos(d*x + c)^7)

________________________________________________________________________________________

giac [B]  time = 0.40, size = 260, normalized size = 2.02 \[ -\frac {2 \, {\left (105 \, a^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{13} + 210 \, a b \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{12} - 210 \, a^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{11} + 140 \, b^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{11} + 903 \, a^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{9} + 112 \, b^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{9} + 1050 \, a b \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{8} - 636 \, a^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{7} + 456 \, b^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{7} + 903 \, a^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{5} + 112 \, b^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{5} + 630 \, a b \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{4} - 210 \, a^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} + 140 \, b^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} + 105 \, a^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 30 \, a b\right )}}{105 \, {\left (\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} - 1\right )}^{7} d} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

-2/105*(105*a^2*tan(1/2*d*x + 1/2*c)^13 + 210*a*b*tan(1/2*d*x + 1/2*c)^12 - 210*a^2*tan(1/2*d*x + 1/2*c)^11 +
140*b^2*tan(1/2*d*x + 1/2*c)^11 + 903*a^2*tan(1/2*d*x + 1/2*c)^9 + 112*b^2*tan(1/2*d*x + 1/2*c)^9 + 1050*a*b*t
an(1/2*d*x + 1/2*c)^8 - 636*a^2*tan(1/2*d*x + 1/2*c)^7 + 456*b^2*tan(1/2*d*x + 1/2*c)^7 + 903*a^2*tan(1/2*d*x
+ 1/2*c)^5 + 112*b^2*tan(1/2*d*x + 1/2*c)^5 + 630*a*b*tan(1/2*d*x + 1/2*c)^4 - 210*a^2*tan(1/2*d*x + 1/2*c)^3
+ 140*b^2*tan(1/2*d*x + 1/2*c)^3 + 105*a^2*tan(1/2*d*x + 1/2*c) + 30*a*b)/((tan(1/2*d*x + 1/2*c)^2 - 1)^7*d)

________________________________________________________________________________________

maple [A]  time = 0.30, size = 120, normalized size = 0.93 \[ \frac {-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 )+\frac {2 a b}{7 \cos \left (d x +c \right )^{7}}+b^{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 )}{d} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

1/d*(-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)+2/7*a*b/cos(d*x+c)^7+b^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))

________________________________________________________________________________________

maxima [A]  time = 0.32, size = 97, normalized size = 0.75 \[ \frac {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} + {\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^{2} + \frac {30 \, a b}{\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+b*sin(d*x+c))^2,x, algorithm="maxima")

[Out]

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

________________________________________________________________________________________

mupad [B]  time = 5.55, size = 135, normalized size = 1.05 \[ \frac {\frac {2\,a\,b}{7}+\frac {a^2\,\sin \left (c+d\,x\right )}{7}+\frac {b^2\,\sin \left (c+d\,x\right )}{7}+{\cos \left (c+d\,x\right )}^2\,\left (\frac {6\,a^2\,\sin \left (c+d\,x\right )}{35}-\frac {b^2\,\sin \left (c+d\,x\right )}{35}\right )+{\cos \left (c+d\,x\right )}^4\,\left (\frac {8\,a^2\,\sin \left (c+d\,x\right )}{35}-\frac {4\,b^2\,\sin \left (c+d\,x\right )}{105}\right )+{\cos \left (c+d\,x\right )}^6\,\left (\frac {16\,a^2\,\sin \left (c+d\,x\right )}{35}-\frac {8\,b^2\,\sin \left (c+d\,x\right )}{105}\right )}{d\,{\cos \left (c+d\,x\right )}^7} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

((2*a*b)/7 + (a^2*sin(c + d*x))/7 + (b^2*sin(c + d*x))/7 + cos(c + d*x)^2*((6*a^2*sin(c + d*x))/35 - (b^2*sin(
c + d*x))/35) + cos(c + d*x)^4*((8*a^2*sin(c + d*x))/35 - (4*b^2*sin(c + d*x))/105) + cos(c + d*x)^6*((16*a^2*
sin(c + d*x))/35 - (8*b^2*sin(c + d*x))/105))/(d*cos(c + d*x)^7)

________________________________________________________________________________________

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+b*sin(d*x+c))**2,x)

[Out]

Timed out

________________________________________________________________________________________