Integrand size = 23, antiderivative size = 96 \[ \int \sec ^6(c+d x) \left (a+b \tan ^2(c+d x)\right )^2 \, dx=\frac {a^2 \tan (c+d x)}{d}+\frac {2 a (a+b) \tan ^3(c+d x)}{3 d}+\frac {\left (a^2+4 a b+b^2\right ) \tan ^5(c+d x)}{5 d}+\frac {2 b (a+b) \tan ^7(c+d x)}{7 d}+\frac {b^2 \tan ^9(c+d x)}{9 d} \] Output:
a^2*tan(d*x+c)/d+2/3*a*(a+b)*tan(d*x+c)^3/d+1/5*(a^2+4*a*b+b^2)*tan(d*x+c) ^5/d+2/7*b*(a+b)*tan(d*x+c)^7/d+1/9*b^2*tan(d*x+c)^9/d
Time = 0.93 (sec) , antiderivative size = 106, normalized size of antiderivative = 1.10 \[ \int \sec ^6(c+d x) \left (a+b \tan ^2(c+d x)\right )^2 \, dx=\frac {\left (8 \left (21 a^2-6 a b+b^2\right )+4 \left (21 a^2-6 a b+b^2\right ) \sec ^2(c+d x)+3 \left (21 a^2-6 a b+b^2\right ) \sec ^4(c+d x)+10 (9 a-5 b) b \sec ^6(c+d x)+35 b^2 \sec ^8(c+d x)\right ) \tan (c+d x)}{315 d} \] Input:
Integrate[Sec[c + d*x]^6*(a + b*Tan[c + d*x]^2)^2,x]
Output:
((8*(21*a^2 - 6*a*b + b^2) + 4*(21*a^2 - 6*a*b + b^2)*Sec[c + d*x]^2 + 3*( 21*a^2 - 6*a*b + b^2)*Sec[c + d*x]^4 + 10*(9*a - 5*b)*b*Sec[c + d*x]^6 + 3 5*b^2*Sec[c + d*x]^8)*Tan[c + d*x])/(315*d)
Time = 0.27 (sec) , antiderivative size = 85, normalized size of antiderivative = 0.89, number of steps used = 5, number of rules used = 4, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.174, Rules used = {3042, 4158, 290, 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) \left (a+b \tan ^2(c+d x)\right )^2 \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \sec (c+d x)^6 \left (a+b \tan (c+d x)^2\right )^2dx\) |
\(\Big \downarrow \) 4158 |
\(\displaystyle \frac {\int \left (\tan ^2(c+d x)+1\right )^2 \left (b \tan ^2(c+d x)+a\right )^2d\tan (c+d x)}{d}\) |
\(\Big \downarrow \) 290 |
\(\displaystyle \frac {\int \left (b^2 \tan ^8(c+d x)+2 b (a+b) \tan ^6(c+d x)+\left (a^2+4 b a+b^2\right ) \tan ^4(c+d x)+2 a (a+b) \tan ^2(c+d x)+a^2\right )d\tan (c+d x)}{d}\) |
\(\Big \downarrow \) 2009 |
\(\displaystyle \frac {\frac {1}{5} \left (a^2+4 a b+b^2\right ) \tan ^5(c+d x)+a^2 \tan (c+d x)+\frac {2}{7} b (a+b) \tan ^7(c+d x)+\frac {2}{3} a (a+b) \tan ^3(c+d x)+\frac {1}{9} b^2 \tan ^9(c+d x)}{d}\) |
Input:
Int[Sec[c + d*x]^6*(a + b*Tan[c + d*x]^2)^2,x]
Output:
(a^2*Tan[c + d*x] + (2*a*(a + b)*Tan[c + d*x]^3)/3 + ((a^2 + 4*a*b + b^2)* Tan[c + d*x]^5)/5 + (2*b*(a + b)*Tan[c + d*x]^7)/7 + (b^2*Tan[c + d*x]^9)/ 9)/d
Int[((a_) + (b_.)*(x_)^2)^(p_.)*((c_) + (d_.)*(x_)^2)^(q_.), x_Symbol] :> I nt[ExpandIntegrand[(a + b*x^2)^p*(c + d*x^2)^q, x], x] /; FreeQ[{a, b, c, d }, x] && NeQ[b*c - a*d, 0] && IGtQ[p, 0] && IGtQ[q, 0]
Int[sec[(e_.) + (f_.)*(x_)]^(m_)*((a_) + (b_.)*((c_.)*tan[(e_.) + (f_.)*(x_ )])^(n_))^(p_.), x_Symbol] :> With[{ff = FreeFactors[Tan[e + f*x], x]}, Sim p[ff/(c^(m - 1)*f) Subst[Int[(c^2 + ff^2*x^2)^(m/2 - 1)*(a + b*(ff*x)^n)^ p, x], x, c*(Tan[e + f*x]/ff)], x]] /; FreeQ[{a, b, c, e, f, n, p}, x] && I ntegerQ[m/2] && (IntegersQ[n, p] || IGtQ[m, 0] || IGtQ[p, 0] || EqQ[n^2, 4] || EqQ[n^2, 16])
Time = 28.79 (sec) , antiderivative size = 157, normalized size of antiderivative = 1.64
method | result | size |
derivativedivides | \(\frac {b^{2} \left (\frac {\sin \left (d x +c \right )^{5}}{9 \cos \left (d x +c \right )^{9}}+\frac {4 \sin \left (d x +c \right )^{5}}{63 \cos \left (d x +c \right )^{7}}+\frac {8 \sin \left (d x +c \right )^{5}}{315 \cos \left (d x +c \right )^{5}}\right )+2 a 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^{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 )}{d}\) | \(157\) |
default | \(\frac {b^{2} \left (\frac {\sin \left (d x +c \right )^{5}}{9 \cos \left (d x +c \right )^{9}}+\frac {4 \sin \left (d x +c \right )^{5}}{63 \cos \left (d x +c \right )^{7}}+\frac {8 \sin \left (d x +c \right )^{5}}{315 \cos \left (d x +c \right )^{5}}\right )+2 a 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^{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 )}{d}\) | \(157\) |
risch | \(\frac {16 i \left (210 a^{2} {\mathrm e}^{12 i \left (d x +c \right )}-420 a b \,{\mathrm e}^{12 i \left (d x +c \right )}+210 b^{2} {\mathrm e}^{12 i \left (d x +c \right )}+945 a^{2} {\mathrm e}^{10 i \left (d x +c \right )}-630 a b \,{\mathrm e}^{10 i \left (d x +c \right )}-315 b^{2} {\mathrm e}^{10 i \left (d x +c \right )}+1701 a^{2} {\mathrm e}^{8 i \left (d x +c \right )}-126 a b \,{\mathrm e}^{8 i \left (d x +c \right )}+441 b^{2} {\mathrm e}^{8 i \left (d x +c \right )}+1554 a^{2} {\mathrm e}^{6 i \left (d x +c \right )}-84 a b \,{\mathrm e}^{6 i \left (d x +c \right )}-126 b^{2} {\mathrm e}^{6 i \left (d x +c \right )}+756 a^{2} {\mathrm e}^{4 i \left (d x +c \right )}-216 \,{\mathrm e}^{4 i \left (d x +c \right )} a b +36 b^{2} {\mathrm e}^{4 i \left (d x +c \right )}+189 a^{2} {\mathrm e}^{2 i \left (d x +c \right )}-54 a b \,{\mathrm e}^{2 i \left (d x +c \right )}+9 b^{2} {\mathrm e}^{2 i \left (d x +c \right )}+21 a^{2}-6 a b +b^{2}\right )}{315 d \left ({\mathrm e}^{2 i \left (d x +c \right )}+1\right )^{9}}\) | \(279\) |
Input:
int(sec(d*x+c)^6*(a+b*tan(d*x+c)^2)^2,x,method=_RETURNVERBOSE)
Output:
1/d*(b^2*(1/9*sin(d*x+c)^5/cos(d*x+c)^9+4/63*sin(d*x+c)^5/cos(d*x+c)^7+8/3 15*sin(d*x+c)^5/cos(d*x+c)^5)+2*a*b*(1/7*sin(d*x+c)^3/cos(d*x+c)^7+4/35*si n(d*x+c)^3/cos(d*x+c)^5+8/105*sin(d*x+c)^3/cos(d*x+c)^3)-a^2*(-8/15-1/5*se c(d*x+c)^4-4/15*sec(d*x+c)^2)*tan(d*x+c))
Time = 0.10 (sec) , antiderivative size = 114, normalized size of antiderivative = 1.19 \[ \int \sec ^6(c+d x) \left (a+b \tan ^2(c+d x)\right )^2 \, dx=\frac {{\left (8 \, {\left (21 \, a^{2} - 6 \, a b + b^{2}\right )} \cos \left (d x + c\right )^{8} + 4 \, {\left (21 \, a^{2} - 6 \, a b + b^{2}\right )} \cos \left (d x + c\right )^{6} + 3 \, {\left (21 \, a^{2} - 6 \, a b + b^{2}\right )} \cos \left (d x + c\right )^{4} + 10 \, {\left (9 \, a b - 5 \, b^{2}\right )} \cos \left (d x + c\right )^{2} + 35 \, b^{2}\right )} \sin \left (d x + c\right )}{315 \, d \cos \left (d x + c\right )^{9}} \] Input:
integrate(sec(d*x+c)^6*(a+b*tan(d*x+c)^2)^2,x, algorithm="fricas")
Output:
1/315*(8*(21*a^2 - 6*a*b + b^2)*cos(d*x + c)^8 + 4*(21*a^2 - 6*a*b + b^2)* cos(d*x + c)^6 + 3*(21*a^2 - 6*a*b + b^2)*cos(d*x + c)^4 + 10*(9*a*b - 5*b ^2)*cos(d*x + c)^2 + 35*b^2)*sin(d*x + c)/(d*cos(d*x + c)^9)
\[ \int \sec ^6(c+d x) \left (a+b \tan ^2(c+d x)\right )^2 \, dx=\int \left (a + b \tan ^{2}{\left (c + d x \right )}\right )^{2} \sec ^{6}{\left (c + d x \right )}\, dx \] Input:
integrate(sec(d*x+c)**6*(a+b*tan(d*x+c)**2)**2,x)
Output:
Integral((a + b*tan(c + d*x)**2)**2*sec(c + d*x)**6, x)
Time = 0.03 (sec) , antiderivative size = 85, normalized size of antiderivative = 0.89 \[ \int \sec ^6(c+d x) \left (a+b \tan ^2(c+d x)\right )^2 \, dx=\frac {35 \, b^{2} \tan \left (d x + c\right )^{9} + 90 \, {\left (a b + b^{2}\right )} \tan \left (d x + c\right )^{7} + 63 \, {\left (a^{2} + 4 \, a b + b^{2}\right )} \tan \left (d x + c\right )^{5} + 210 \, {\left (a^{2} + a b\right )} \tan \left (d x + c\right )^{3} + 315 \, a^{2} \tan \left (d x + c\right )}{315 \, d} \] Input:
integrate(sec(d*x+c)^6*(a+b*tan(d*x+c)^2)^2,x, algorithm="maxima")
Output:
1/315*(35*b^2*tan(d*x + c)^9 + 90*(a*b + b^2)*tan(d*x + c)^7 + 63*(a^2 + 4 *a*b + b^2)*tan(d*x + c)^5 + 210*(a^2 + a*b)*tan(d*x + c)^3 + 315*a^2*tan( d*x + c))/d
Time = 0.44 (sec) , antiderivative size = 118, normalized size of antiderivative = 1.23 \[ \int \sec ^6(c+d x) \left (a+b \tan ^2(c+d x)\right )^2 \, dx=\frac {35 \, b^{2} \tan \left (d x + c\right )^{9} + 90 \, a b \tan \left (d x + c\right )^{7} + 90 \, b^{2} \tan \left (d x + c\right )^{7} + 63 \, a^{2} \tan \left (d x + c\right )^{5} + 252 \, a b \tan \left (d x + c\right )^{5} + 63 \, b^{2} \tan \left (d x + c\right )^{5} + 210 \, a^{2} \tan \left (d x + c\right )^{3} + 210 \, a b \tan \left (d x + c\right )^{3} + 315 \, a^{2} \tan \left (d x + c\right )}{315 \, d} \] Input:
integrate(sec(d*x+c)^6*(a+b*tan(d*x+c)^2)^2,x, algorithm="giac")
Output:
1/315*(35*b^2*tan(d*x + c)^9 + 90*a*b*tan(d*x + c)^7 + 90*b^2*tan(d*x + c) ^7 + 63*a^2*tan(d*x + c)^5 + 252*a*b*tan(d*x + c)^5 + 63*b^2*tan(d*x + c)^ 5 + 210*a^2*tan(d*x + c)^3 + 210*a*b*tan(d*x + c)^3 + 315*a^2*tan(d*x + c) )/d
Time = 8.15 (sec) , antiderivative size = 80, normalized size of antiderivative = 0.83 \[ \int \sec ^6(c+d x) \left (a+b \tan ^2(c+d x)\right )^2 \, dx=\frac {a^2\,\mathrm {tan}\left (c+d\,x\right )+\frac {b^2\,{\mathrm {tan}\left (c+d\,x\right )}^9}{9}+{\mathrm {tan}\left (c+d\,x\right )}^5\,\left (\frac {a^2}{5}+\frac {4\,a\,b}{5}+\frac {b^2}{5}\right )+\frac {2\,a\,{\mathrm {tan}\left (c+d\,x\right )}^3\,\left (a+b\right )}{3}+\frac {2\,b\,{\mathrm {tan}\left (c+d\,x\right )}^7\,\left (a+b\right )}{7}}{d} \] Input:
int((a + b*tan(c + d*x)^2)^2/cos(c + d*x)^6,x)
Output:
(a^2*tan(c + d*x) + (b^2*tan(c + d*x)^9)/9 + tan(c + d*x)^5*((4*a*b)/5 + a ^2/5 + b^2/5) + (2*a*tan(c + d*x)^3*(a + b))/3 + (2*b*tan(c + d*x)^7*(a + b))/7)/d
Time = 0.28 (sec) , antiderivative size = 206, normalized size of antiderivative = 2.15 \[ \int \sec ^6(c+d x) \left (a+b \tan ^2(c+d x)\right )^2 \, dx=\frac {\sin \left (d x +c \right ) \left (168 \sin \left (d x +c \right )^{8} a^{2}-48 \sin \left (d x +c \right )^{8} a b +8 \sin \left (d x +c \right )^{8} b^{2}-756 \sin \left (d x +c \right )^{6} a^{2}+216 \sin \left (d x +c \right )^{6} a b -36 \sin \left (d x +c \right )^{6} b^{2}+1323 \sin \left (d x +c \right )^{4} a^{2}-378 \sin \left (d x +c \right )^{4} a b +63 \sin \left (d x +c \right )^{4} b^{2}-1050 \sin \left (d x +c \right )^{2} a^{2}+210 \sin \left (d x +c \right )^{2} a b +315 a^{2}\right )}{315 \cos \left (d x +c \right ) d \left (\sin \left (d x +c \right )^{8}-4 \sin \left (d x +c \right )^{6}+6 \sin \left (d x +c \right )^{4}-4 \sin \left (d x +c \right )^{2}+1\right )} \] Input:
int(sec(d*x+c)^6*(a+b*tan(d*x+c)^2)^2,x)
Output:
(sin(c + d*x)*(168*sin(c + d*x)**8*a**2 - 48*sin(c + d*x)**8*a*b + 8*sin(c + d*x)**8*b**2 - 756*sin(c + d*x)**6*a**2 + 216*sin(c + d*x)**6*a*b - 36* sin(c + d*x)**6*b**2 + 1323*sin(c + d*x)**4*a**2 - 378*sin(c + d*x)**4*a*b + 63*sin(c + d*x)**4*b**2 - 1050*sin(c + d*x)**2*a**2 + 210*sin(c + d*x)* *2*a*b + 315*a**2))/(315*cos(c + d*x)*d*(sin(c + d*x)**8 - 4*sin(c + d*x)* *6 + 6*sin(c + d*x)**4 - 4*sin(c + d*x)**2 + 1))