\(\int \sec ^6(c+d x) (a+b \sin (c+d x))^2 \, dx\) [395]

Optimal result
Mathematica [A] (verified)
Rubi [A] (verified)
Maple [A] (verified)
Fricas [A] (verification not implemented)
Sympy [F(-1)]
Maxima [A] (verification not implemented)
Giac [A] (verification not implemented)
Mupad [B] (verification not implemented)
Reduce [B] (verification not implemented)

Optimal result

Integrand size = 21, antiderivative size = 103 \[ \int \sec ^6(c+d x) (a+b \sin (c+d x))^2 \, dx=\frac {a b \sec ^3(c+d x)}{5 d}+\frac {\sec ^5(c+d x) (b+a \sin (c+d x)) (a+b \sin (c+d x))}{5 d}+\frac {\left (4 a^2-b^2\right ) \tan (c+d x)}{5 d}+\frac {\left (4 a^2-b^2\right ) \tan ^3(c+d x)}{15 d} \] Output:

1/5*a*b*sec(d*x+c)^3/d+1/5*sec(d*x+c)^5*(b+a*sin(d*x+c))*(a+b*sin(d*x+c))/ 
d+1/5*(4*a^2-b^2)*tan(d*x+c)/d+1/15*(4*a^2-b^2)*tan(d*x+c)^3/d
 

Mathematica [A] (verified)

Time = 0.49 (sec) , antiderivative size = 84, normalized size of antiderivative = 0.82 \[ \int \sec ^6(c+d x) (a+b \sin (c+d x))^2 \, dx=\frac {\sec ^5(c+d x) \left (48 a b+20 \left (2 a^2+b^2\right ) \sin (c+d x)+5 \left (4 a^2-b^2\right ) \sin (3 (c+d x))+4 a^2 \sin (5 (c+d x))-b^2 \sin (5 (c+d x))\right )}{120 d} \] Input:

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

Output:

(Sec[c + d*x]^5*(48*a*b + 20*(2*a^2 + b^2)*Sin[c + d*x] + 5*(4*a^2 - b^2)* 
Sin[3*(c + d*x)] + 4*a^2*Sin[5*(c + d*x)] - b^2*Sin[5*(c + d*x)]))/(120*d)
 

Rubi [A] (verified)

Time = 0.47 (sec) , antiderivative size = 92, normalized size of antiderivative = 0.89, number of steps used = 9, number of rules used = 8, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.381, Rules used = {3042, 3170, 25, 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 ^6(c+d x) (a+b \sin (c+d x))^2 \, dx\)

\(\Big \downarrow \) 3042

\(\displaystyle \int \frac {(a+b \sin (c+d x))^2}{\cos (c+d x)^6}dx\)

\(\Big \downarrow \) 3170

\(\displaystyle \frac {\sec ^5(c+d x) (a \sin (c+d x)+b) (a+b \sin (c+d x))}{5 d}-\frac {1}{5} \int -\sec ^4(c+d x) \left (4 a^2+3 b \sin (c+d x) a-b^2\right )dx\)

\(\Big \downarrow \) 25

\(\displaystyle \frac {1}{5} \int \sec ^4(c+d x) \left (4 a^2+3 b \sin (c+d x) a-b^2\right )dx+\frac {\sec ^5(c+d x) (a \sin (c+d x)+b) (a+b \sin (c+d x))}{5 d}\)

\(\Big \downarrow \) 3042

\(\displaystyle \frac {1}{5} \int \frac {4 a^2+3 b \sin (c+d x) a-b^2}{\cos (c+d x)^4}dx+\frac {\sec ^5(c+d x) (a \sin (c+d x)+b) (a+b \sin (c+d x))}{5 d}\)

\(\Big \downarrow \) 3148

\(\displaystyle \frac {1}{5} \left (\left (4 a^2-b^2\right ) \int \sec ^4(c+d x)dx+\frac {a b \sec ^3(c+d x)}{d}\right )+\frac {\sec ^5(c+d x) (a \sin (c+d x)+b) (a+b \sin (c+d x))}{5 d}\)

\(\Big \downarrow \) 3042

\(\displaystyle \frac {1}{5} \left (\left (4 a^2-b^2\right ) \int \csc \left (c+d x+\frac {\pi }{2}\right )^4dx+\frac {a b \sec ^3(c+d x)}{d}\right )+\frac {\sec ^5(c+d x) (a \sin (c+d x)+b) (a+b \sin (c+d x))}{5 d}\)

\(\Big \downarrow \) 4254

\(\displaystyle \frac {1}{5} \left (\frac {a b \sec ^3(c+d x)}{d}-\frac {\left (4 a^2-b^2\right ) \int \left (\tan ^2(c+d x)+1\right )d(-\tan (c+d x))}{d}\right )+\frac {\sec ^5(c+d x) (a \sin (c+d x)+b) (a+b \sin (c+d x))}{5 d}\)

\(\Big \downarrow \) 2009

\(\displaystyle \frac {1}{5} \left (\frac {a b \sec ^3(c+d x)}{d}-\frac {\left (4 a^2-b^2\right ) \left (-\frac {1}{3} \tan ^3(c+d x)-\tan (c+d x)\right )}{d}\right )+\frac {\sec ^5(c+d x) (a \sin (c+d x)+b) (a+b \sin (c+d x))}{5 d}\)

Input:

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

Output:

(Sec[c + d*x]^5*(b + a*Sin[c + d*x])*(a + b*Sin[c + d*x]))/(5*d) + ((a*b*S 
ec[c + d*x]^3)/d - ((4*a^2 - b^2)*(-Tan[c + d*x] - Tan[c + d*x]^3/3))/d)/5
 

Defintions of rubi rules used

rule 25
Int[-(Fx_), x_Symbol] :> Simp[Identity[-1]   Int[Fx, x], x]
 

rule 2009
Int[u_, x_Symbol] :> Simp[IntSum[u, x], x] /; SumQ[u]
 

rule 3042
Int[u_, x_Symbol] :> Int[DeactivateTrig[u, x], x] /; FunctionOfTrigOfLinear 
Q[u, x]
 

rule 3148
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])
 

rule 3170
Int[(cos[(e_.) + (f_.)*(x_)]*(g_.))^(p_)*((a_) + (b_.)*sin[(e_.) + (f_.)*(x 
_)])^(m_), x_Symbol] :> Simp[(-(g*Cos[e + f*x])^(p + 1))*(a + b*Sin[e + f*x 
])^(m - 1)*((b + a*Sin[e + f*x])/(f*g*(p + 1))), x] + Simp[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 4254
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]
 
Maple [A] (verified)

Time = 0.50 (sec) , antiderivative size = 92, normalized size of antiderivative = 0.89

method result size
derivativedivides \(\frac {-a^{2} \left (-\frac {8}{15}-\frac {\sec \left (d x +c \right )^{4}}{5}-\frac {4 \sec \left (d x +c \right )^{2}}{15}\right ) \tan \left (d x +c \right )+\frac {2 a b}{5 \cos \left (d x +c \right )^{5}}+b^{2} \left (\frac {\sin \left (d x +c \right )^{3}}{5 \cos \left (d x +c \right )^{5}}+\frac {2 \sin \left (d x +c \right )^{3}}{15 \cos \left (d x +c \right )^{3}}\right )}{d}\) \(92\)
default \(\frac {-a^{2} \left (-\frac {8}{15}-\frac {\sec \left (d x +c \right )^{4}}{5}-\frac {4 \sec \left (d x +c \right )^{2}}{15}\right ) \tan \left (d x +c \right )+\frac {2 a b}{5 \cos \left (d x +c \right )^{5}}+b^{2} \left (\frac {\sin \left (d x +c \right )^{3}}{5 \cos \left (d x +c \right )^{5}}+\frac {2 \sin \left (d x +c \right )^{3}}{15 \cos \left (d x +c \right )^{3}}\right )}{d}\) \(92\)
risch \(-\frac {4 i \left (48 i a b \,{\mathrm e}^{5 i \left (d x +c \right )}+15 b^{2} {\mathrm e}^{6 i \left (d x +c \right )}-40 a^{2} {\mathrm e}^{4 i \left (d x +c \right )}-5 b^{2} {\mathrm e}^{4 i \left (d x +c \right )}-20 a^{2} {\mathrm e}^{2 i \left (d x +c \right )}+5 b^{2} {\mathrm e}^{2 i \left (d x +c \right )}-4 a^{2}+b^{2}\right )}{15 d \left ({\mathrm e}^{2 i \left (d x +c \right )}+1\right )^{5}}\) \(113\)
parallelrisch \(\frac {-2 a^{2} \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{9}-4 \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{8} a b +\frac {8 \left (a^{2}-b^{2}\right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{7}}{3}+\frac {4 \left (-29 a^{2}-4 b^{2}\right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{5}}{15}-8 \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{4} a b +\frac {8 \left (a^{2}-b^{2}\right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{3}}{3}-2 a^{2} \tan \left (\frac {d x}{2}+\frac {c}{2}\right )-\frac {4 a b}{5}}{d \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )^{5} \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )^{5}}\) \(165\)
norman \(\frac {-\frac {4 a b}{5 d}-\frac {2 a^{2} \tan \left (\frac {d x}{2}+\frac {c}{2}\right )}{d}-\frac {2 a^{2} \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{13}}{d}-\frac {4 \left (a^{2}+2 b^{2}\right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{3}}{3 d}-\frac {4 \left (a^{2}+2 b^{2}\right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{11}}{3 d}-\frac {2 \left (11 a^{2}+16 b^{2}\right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{5}}{5 d}-\frac {2 \left (11 a^{2}+16 b^{2}\right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{9}}{5 d}-\frac {8 \left (19 a^{2}+14 b^{2}\right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{7}}{15 d}-\frac {4 a b \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{12}}{d}-\frac {8 a b \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}}{5 d}-\frac {8 a b \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{10}}{d}-\frac {12 a b \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{8}}{d}-\frac {16 a b \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{6}}{d}-\frac {44 a b \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{4}}{5 d}}{\left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}-1\right )^{5} \left (1+\tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}\right )^{2}}\) \(315\)

Input:

int(sec(d*x+c)^6*(a+b*sin(d*x+c))^2,x,method=_RETURNVERBOSE)
 

Output:

1/d*(-a^2*(-8/15-1/5*sec(d*x+c)^4-4/15*sec(d*x+c)^2)*tan(d*x+c)+2/5*a*b/co 
s(d*x+c)^5+b^2*(1/5*sin(d*x+c)^3/cos(d*x+c)^5+2/15*sin(d*x+c)^3/cos(d*x+c) 
^3))
 

Fricas [A] (verification not implemented)

Time = 0.09 (sec) , antiderivative size = 77, normalized size of antiderivative = 0.75 \[ \int \sec ^6(c+d x) (a+b \sin (c+d x))^2 \, dx=\frac {6 \, a b + {\left (2 \, {\left (4 \, a^{2} - b^{2}\right )} \cos \left (d x + c\right )^{4} + {\left (4 \, a^{2} - b^{2}\right )} \cos \left (d x + c\right )^{2} + 3 \, a^{2} + 3 \, b^{2}\right )} \sin \left (d x + c\right )}{15 \, d \cos \left (d x + c\right )^{5}} \] Input:

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

Output:

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

Sympy [F(-1)]

Timed out. \[ \int \sec ^6(c+d x) (a+b \sin (c+d x))^2 \, dx=\text {Timed out} \] Input:

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

Output:

Timed out
 

Maxima [A] (verification not implemented)

Time = 0.03 (sec) , antiderivative size = 76, normalized size of antiderivative = 0.74 \[ \int \sec ^6(c+d x) (a+b \sin (c+d x))^2 \, dx=\frac {{\left (3 \, \tan \left (d x + c\right )^{5} + 10 \, \tan \left (d x + c\right )^{3} + 15 \, \tan \left (d x + c\right )\right )} a^{2} + {\left (3 \, \tan \left (d x + c\right )^{5} + 5 \, \tan \left (d x + c\right )^{3}\right )} b^{2} + \frac {6 \, a b}{\cos \left (d x + c\right )^{5}}}{15 \, d} \] Input:

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

Output:

1/15*((3*tan(d*x + c)^5 + 10*tan(d*x + c)^3 + 15*tan(d*x + c))*a^2 + (3*ta 
n(d*x + c)^5 + 5*tan(d*x + c)^3)*b^2 + 6*a*b/cos(d*x + c)^5)/d
 

Giac [A] (verification not implemented)

Time = 0.14 (sec) , antiderivative size = 181, normalized size of antiderivative = 1.76 \[ \int \sec ^6(c+d x) (a+b \sin (c+d x))^2 \, dx=-\frac {2 \, {\left (15 \, a^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{9} + 30 \, a b \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{8} - 20 \, a^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{7} + 20 \, b^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{7} + 58 \, a^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{5} + 8 \, b^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{5} + 60 \, a b \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{4} - 20 \, a^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} + 20 \, b^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} + 15 \, a^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 6 \, a b\right )}}{15 \, {\left (\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} - 1\right )}^{5} d} \] Input:

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

Output:

-2/15*(15*a^2*tan(1/2*d*x + 1/2*c)^9 + 30*a*b*tan(1/2*d*x + 1/2*c)^8 - 20* 
a^2*tan(1/2*d*x + 1/2*c)^7 + 20*b^2*tan(1/2*d*x + 1/2*c)^7 + 58*a^2*tan(1/ 
2*d*x + 1/2*c)^5 + 8*b^2*tan(1/2*d*x + 1/2*c)^5 + 60*a*b*tan(1/2*d*x + 1/2 
*c)^4 - 20*a^2*tan(1/2*d*x + 1/2*c)^3 + 20*b^2*tan(1/2*d*x + 1/2*c)^3 + 15 
*a^2*tan(1/2*d*x + 1/2*c) + 6*a*b)/((tan(1/2*d*x + 1/2*c)^2 - 1)^5*d)
 

Mupad [B] (verification not implemented)

Time = 16.07 (sec) , antiderivative size = 103, normalized size of antiderivative = 1.00 \[ \int \sec ^6(c+d x) (a+b \sin (c+d x))^2 \, dx=\frac {\frac {2\,a\,b}{5}+\frac {a^2\,\sin \left (c+d\,x\right )}{5}+\frac {b^2\,\sin \left (c+d\,x\right )}{5}+{\cos \left (c+d\,x\right )}^2\,\left (\frac {4\,a^2\,\sin \left (c+d\,x\right )}{15}-\frac {b^2\,\sin \left (c+d\,x\right )}{15}\right )+{\cos \left (c+d\,x\right )}^4\,\left (\frac {8\,a^2\,\sin \left (c+d\,x\right )}{15}-\frac {2\,b^2\,\sin \left (c+d\,x\right )}{15}\right )}{d\,{\cos \left (c+d\,x\right )}^5} \] Input:

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

Output:

((2*a*b)/5 + (a^2*sin(c + d*x))/5 + (b^2*sin(c + d*x))/5 + cos(c + d*x)^2* 
((4*a^2*sin(c + d*x))/15 - (b^2*sin(c + d*x))/15) + cos(c + d*x)^4*((8*a^2 
*sin(c + d*x))/15 - (2*b^2*sin(c + d*x))/15))/(d*cos(c + d*x)^5)
 

Reduce [B] (verification not implemented)

Time = 0.17 (sec) , antiderivative size = 149, normalized size of antiderivative = 1.45 \[ \int \sec ^6(c+d x) (a+b \sin (c+d x))^2 \, dx=\frac {-6 \cos \left (d x +c \right ) \sin \left (d x +c \right )^{4} a b +12 \cos \left (d x +c \right ) \sin \left (d x +c \right )^{2} a b -6 \cos \left (d x +c \right ) a b +8 \sin \left (d x +c \right )^{5} a^{2}-2 \sin \left (d x +c \right )^{5} b^{2}-20 \sin \left (d x +c \right )^{3} a^{2}+5 \sin \left (d x +c \right )^{3} b^{2}+15 \sin \left (d x +c \right ) a^{2}+6 a b}{15 \cos \left (d x +c \right ) d \left (\sin \left (d x +c \right )^{4}-2 \sin \left (d x +c \right )^{2}+1\right )} \] Input:

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

Output:

( - 6*cos(c + d*x)*sin(c + d*x)**4*a*b + 12*cos(c + d*x)*sin(c + d*x)**2*a 
*b - 6*cos(c + d*x)*a*b + 8*sin(c + d*x)**5*a**2 - 2*sin(c + d*x)**5*b**2 
- 20*sin(c + d*x)**3*a**2 + 5*sin(c + d*x)**3*b**2 + 15*sin(c + d*x)*a**2 
+ 6*a*b)/(15*cos(c + d*x)*d*(sin(c + d*x)**4 - 2*sin(c + d*x)**2 + 1))