Integrand size = 23, antiderivative size = 100 \[ \int \left (a+b \sec ^2(e+f x)\right )^2 \tan ^5(e+f x) \, dx=-\frac {a^2 \log (\cos (e+f x))}{f}-\frac {a (a-b) \sec ^2(e+f x)}{f}+\frac {\left (a^2-4 a b+b^2\right ) \sec ^4(e+f x)}{4 f}+\frac {(a-b) b \sec ^6(e+f x)}{3 f}+\frac {b^2 \sec ^8(e+f x)}{8 f} \] Output:
-a^2*ln(cos(f*x+e))/f-a*(a-b)*sec(f*x+e)^2/f+1/4*(a^2-4*a*b+b^2)*sec(f*x+e )^4/f+1/3*(a-b)*b*sec(f*x+e)^6/f+1/8*b^2*sec(f*x+e)^8/f
Time = 0.33 (sec) , antiderivative size = 126, normalized size of antiderivative = 1.26 \[ \int \left (a+b \sec ^2(e+f x)\right )^2 \tan ^5(e+f x) \, dx=-\frac {\cos ^4(e+f x) \left (a+b \sec ^2(e+f x)\right )^2 \left (24 a^2 \log (\cos (e+f x))+24 a (a-b) \sec ^2(e+f x)-6 \left (a^2-4 a b+b^2\right ) \sec ^4(e+f x)-8 (a-b) b \sec ^6(e+f x)-3 b^2 \sec ^8(e+f x)\right )}{6 f (a+2 b+a \cos (2 e+2 f x))^2} \] Input:
Integrate[(a + b*Sec[e + f*x]^2)^2*Tan[e + f*x]^5,x]
Output:
-1/6*(Cos[e + f*x]^4*(a + b*Sec[e + f*x]^2)^2*(24*a^2*Log[Cos[e + f*x]] + 24*a*(a - b)*Sec[e + f*x]^2 - 6*(a^2 - 4*a*b + b^2)*Sec[e + f*x]^4 - 8*(a - b)*b*Sec[e + f*x]^6 - 3*b^2*Sec[e + f*x]^8))/(f*(a + 2*b + a*Cos[2*e + 2 *f*x])^2)
Time = 0.30 (sec) , antiderivative size = 91, normalized size of antiderivative = 0.91, number of steps used = 6, number of rules used = 5, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.217, Rules used = {3042, 4626, 354, 99, 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 \tan ^5(e+f x) \left (a+b \sec ^2(e+f x)\right )^2 \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \tan (e+f x)^5 \left (a+b \sec (e+f x)^2\right )^2dx\) |
\(\Big \downarrow \) 4626 |
\(\displaystyle -\frac {\int \left (1-\cos ^2(e+f x)\right )^2 \left (a \cos ^2(e+f x)+b\right )^2 \sec ^9(e+f x)d\cos (e+f x)}{f}\) |
\(\Big \downarrow \) 354 |
\(\displaystyle -\frac {\int \left (1-\cos ^2(e+f x)\right )^2 \left (a \cos ^2(e+f x)+b\right )^2 \sec ^5(e+f x)d\cos ^2(e+f x)}{2 f}\) |
\(\Big \downarrow \) 99 |
\(\displaystyle -\frac {\int \left (b^2 \sec ^5(e+f x)+2 (a-b) b \sec ^4(e+f x)+\left (a^2-4 b a+b^2\right ) \sec ^3(e+f x)-2 a (a-b) \sec ^2(e+f x)+a^2 \sec (e+f x)\right )d\cos ^2(e+f x)}{2 f}\) |
\(\Big \downarrow \) 2009 |
\(\displaystyle -\frac {-\frac {1}{2} \left (a^2-4 a b+b^2\right ) \sec ^2(e+f x)+a^2 \log \left (\cos ^2(e+f x)\right )-\frac {2}{3} b (a-b) \sec ^3(e+f x)+2 a (a-b) \sec (e+f x)-\frac {1}{4} b^2 \sec ^4(e+f x)}{2 f}\) |
Input:
Int[(a + b*Sec[e + f*x]^2)^2*Tan[e + f*x]^5,x]
Output:
-1/2*(a^2*Log[Cos[e + f*x]^2] + 2*a*(a - b)*Sec[e + f*x] - ((a^2 - 4*a*b + b^2)*Sec[e + f*x]^2)/2 - (2*(a - b)*b*Sec[e + f*x]^3)/3 - (b^2*Sec[e + f* x]^4)/4)/f
Int[((a_.) + (b_.)*(x_))^(m_)*((c_.) + (d_.)*(x_))^(n_)*((e_.) + (f_.)*(x_) )^(p_), x_] :> Int[ExpandIntegrand[(a + b*x)^m*(c + d*x)^n*(e + f*x)^p, x], x] /; FreeQ[{a, b, c, d, e, f, p}, x] && IntegersQ[m, n] && (IntegerQ[p] | | (GtQ[m, 0] && GeQ[n, -1]))
Int[(x_)^(m_.)*((a_) + (b_.)*(x_)^2)^(p_.)*((c_) + (d_.)*(x_)^2)^(q_.), x_S ymbol] :> Simp[1/2 Subst[Int[x^((m - 1)/2)*(a + b*x)^p*(c + d*x)^q, x], x , x^2], x] /; FreeQ[{a, b, c, d, p, q}, x] && NeQ[b*c - a*d, 0] && IntegerQ [(m - 1)/2]
Int[((a_) + (b_.)*sec[(e_.) + (f_.)*(x_)]^(n_))^(p_.)*tan[(e_.) + (f_.)*(x_ )]^(m_.), x_Symbol] :> Module[{ff = FreeFactors[Cos[e + f*x], x]}, Simp[-(f *ff^(m + n*p - 1))^(-1) Subst[Int[(1 - ff^2*x^2)^((m - 1)/2)*((b + a*(ff* x)^n)^p/x^(m + n*p)), x], x, Cos[e + f*x]/ff], x]] /; FreeQ[{a, b, e, f, n} , x] && IntegerQ[(m - 1)/2] && IntegerQ[n] && IntegerQ[p]
Time = 5.58 (sec) , antiderivative size = 86, normalized size of antiderivative = 0.86
method | result | size |
parts | \(\frac {a^{2} \left (\frac {\tan \left (f x +e \right )^{4}}{4}-\frac {\tan \left (f x +e \right )^{2}}{2}+\frac {\ln \left (1+\tan \left (f x +e \right )^{2}\right )}{2}\right )}{f}+\frac {b^{2} \left (\frac {\tan \left (f x +e \right )^{8}}{8}+\frac {\tan \left (f x +e \right )^{6}}{6}\right )}{f}+\frac {a b \tan \left (f x +e \right )^{6}}{3 f}\) | \(86\) |
derivativedivides | \(\frac {\frac {\sec \left (f x +e \right )^{8} b^{2}}{8}+\frac {\sec \left (f x +e \right )^{6} a b}{3}-\frac {b^{2} \sec \left (f x +e \right )^{6}}{3}+\frac {\sec \left (f x +e \right )^{4} a^{2}}{4}-a b \sec \left (f x +e \right )^{4}+\frac {\sec \left (f x +e \right )^{4} b^{2}}{4}-a^{2} \sec \left (f x +e \right )^{2}+\sec \left (f x +e \right )^{2} a b +a^{2} \ln \left (\sec \left (f x +e \right )\right )}{f}\) | \(117\) |
default | \(\frac {\frac {\sec \left (f x +e \right )^{8} b^{2}}{8}+\frac {\sec \left (f x +e \right )^{6} a b}{3}-\frac {b^{2} \sec \left (f x +e \right )^{6}}{3}+\frac {\sec \left (f x +e \right )^{4} a^{2}}{4}-a b \sec \left (f x +e \right )^{4}+\frac {\sec \left (f x +e \right )^{4} b^{2}}{4}-a^{2} \sec \left (f x +e \right )^{2}+\sec \left (f x +e \right )^{2} a b +a^{2} \ln \left (\sec \left (f x +e \right )\right )}{f}\) | \(117\) |
risch | \(i a^{2} x +\frac {2 i a^{2} e}{f}+\frac {-4 a^{2} {\mathrm e}^{14 i \left (f x +e \right )}+4 a b \,{\mathrm e}^{14 i \left (f x +e \right )}-20 \,{\mathrm e}^{12 i \left (f x +e \right )} a^{2}+8 a b \,{\mathrm e}^{12 i \left (f x +e \right )}+4 b^{2} {\mathrm e}^{12 i \left (f x +e \right )}-44 \,{\mathrm e}^{10 i \left (f x +e \right )} a^{2}+\frac {52 \,{\mathrm e}^{10 i \left (f x +e \right )} a b}{3}-\frac {16 b^{2} {\mathrm e}^{10 i \left (f x +e \right )}}{3}-56 a^{2} {\mathrm e}^{8 i \left (f x +e \right )}+\frac {80 \,{\mathrm e}^{8 i \left (f x +e \right )} a b}{3}+\frac {40 \,{\mathrm e}^{8 i \left (f x +e \right )} b^{2}}{3}-44 a^{2} {\mathrm e}^{6 i \left (f x +e \right )}+\frac {52 a b \,{\mathrm e}^{6 i \left (f x +e \right )}}{3}-\frac {16 b^{2} {\mathrm e}^{6 i \left (f x +e \right )}}{3}-20 a^{2} {\mathrm e}^{4 i \left (f x +e \right )}+8 a b \,{\mathrm e}^{4 i \left (f x +e \right )}+4 b^{2} {\mathrm e}^{4 i \left (f x +e \right )}-4 a^{2} {\mathrm e}^{2 i \left (f x +e \right )}+4 a b \,{\mathrm e}^{2 i \left (f x +e \right )}}{f \left ({\mathrm e}^{2 i \left (f x +e \right )}+1\right )^{8}}-\frac {a^{2} \ln \left ({\mathrm e}^{2 i \left (f x +e \right )}+1\right )}{f}\) | \(317\) |
Input:
int((a+b*sec(f*x+e)^2)^2*tan(f*x+e)^5,x,method=_RETURNVERBOSE)
Output:
a^2/f*(1/4*tan(f*x+e)^4-1/2*tan(f*x+e)^2+1/2*ln(1+tan(f*x+e)^2))+b^2/f*(1/ 8*tan(f*x+e)^8+1/6*tan(f*x+e)^6)+1/3*a*b/f*tan(f*x+e)^6
Time = 0.09 (sec) , antiderivative size = 99, normalized size of antiderivative = 0.99 \[ \int \left (a+b \sec ^2(e+f x)\right )^2 \tan ^5(e+f x) \, dx=-\frac {24 \, a^{2} \cos \left (f x + e\right )^{8} \log \left (-\cos \left (f x + e\right )\right ) + 24 \, {\left (a^{2} - a b\right )} \cos \left (f x + e\right )^{6} - 6 \, {\left (a^{2} - 4 \, a b + b^{2}\right )} \cos \left (f x + e\right )^{4} - 8 \, {\left (a b - b^{2}\right )} \cos \left (f x + e\right )^{2} - 3 \, b^{2}}{24 \, f \cos \left (f x + e\right )^{8}} \] Input:
integrate((a+b*sec(f*x+e)^2)^2*tan(f*x+e)^5,x, algorithm="fricas")
Output:
-1/24*(24*a^2*cos(f*x + e)^8*log(-cos(f*x + e)) + 24*(a^2 - a*b)*cos(f*x + e)^6 - 6*(a^2 - 4*a*b + b^2)*cos(f*x + e)^4 - 8*(a*b - b^2)*cos(f*x + e)^ 2 - 3*b^2)/(f*cos(f*x + e)^8)
Leaf count of result is larger than twice the leaf count of optimal. 190 vs. \(2 (85) = 170\).
Time = 1.14 (sec) , antiderivative size = 190, normalized size of antiderivative = 1.90 \[ \int \left (a+b \sec ^2(e+f x)\right )^2 \tan ^5(e+f x) \, dx=\begin {cases} \frac {a^{2} \log {\left (\tan ^{2}{\left (e + f x \right )} + 1 \right )}}{2 f} + \frac {a^{2} \tan ^{4}{\left (e + f x \right )}}{4 f} - \frac {a^{2} \tan ^{2}{\left (e + f x \right )}}{2 f} + \frac {a b \tan ^{4}{\left (e + f x \right )} \sec ^{2}{\left (e + f x \right )}}{3 f} - \frac {a b \tan ^{2}{\left (e + f x \right )} \sec ^{2}{\left (e + f x \right )}}{3 f} + \frac {a b \sec ^{2}{\left (e + f x \right )}}{3 f} + \frac {b^{2} \tan ^{4}{\left (e + f x \right )} \sec ^{4}{\left (e + f x \right )}}{8 f} - \frac {b^{2} \tan ^{2}{\left (e + f x \right )} \sec ^{4}{\left (e + f x \right )}}{12 f} + \frac {b^{2} \sec ^{4}{\left (e + f x \right )}}{24 f} & \text {for}\: f \neq 0 \\x \left (a + b \sec ^{2}{\left (e \right )}\right )^{2} \tan ^{5}{\left (e \right )} & \text {otherwise} \end {cases} \] Input:
integrate((a+b*sec(f*x+e)**2)**2*tan(f*x+e)**5,x)
Output:
Piecewise((a**2*log(tan(e + f*x)**2 + 1)/(2*f) + a**2*tan(e + f*x)**4/(4*f ) - a**2*tan(e + f*x)**2/(2*f) + a*b*tan(e + f*x)**4*sec(e + f*x)**2/(3*f) - a*b*tan(e + f*x)**2*sec(e + f*x)**2/(3*f) + a*b*sec(e + f*x)**2/(3*f) + b**2*tan(e + f*x)**4*sec(e + f*x)**4/(8*f) - b**2*tan(e + f*x)**2*sec(e + f*x)**4/(12*f) + b**2*sec(e + f*x)**4/(24*f), Ne(f, 0)), (x*(a + b*sec(e) **2)**2*tan(e)**5, True))
Time = 0.03 (sec) , antiderivative size = 147, normalized size of antiderivative = 1.47 \[ \int \left (a+b \sec ^2(e+f x)\right )^2 \tan ^5(e+f x) \, dx=-\frac {12 \, a^{2} \log \left (\sin \left (f x + e\right )^{2} - 1\right ) - \frac {24 \, {\left (a^{2} - a b\right )} \sin \left (f x + e\right )^{6} - 6 \, {\left (11 \, a^{2} - 8 \, a b - b^{2}\right )} \sin \left (f x + e\right )^{4} + 4 \, {\left (15 \, a^{2} - 8 \, a b - b^{2}\right )} \sin \left (f x + e\right )^{2} - 18 \, a^{2} + 8 \, a b + b^{2}}{\sin \left (f x + e\right )^{8} - 4 \, \sin \left (f x + e\right )^{6} + 6 \, \sin \left (f x + e\right )^{4} - 4 \, \sin \left (f x + e\right )^{2} + 1}}{24 \, f} \] Input:
integrate((a+b*sec(f*x+e)^2)^2*tan(f*x+e)^5,x, algorithm="maxima")
Output:
-1/24*(12*a^2*log(sin(f*x + e)^2 - 1) - (24*(a^2 - a*b)*sin(f*x + e)^6 - 6 *(11*a^2 - 8*a*b - b^2)*sin(f*x + e)^4 + 4*(15*a^2 - 8*a*b - b^2)*sin(f*x + e)^2 - 18*a^2 + 8*a*b + b^2)/(sin(f*x + e)^8 - 4*sin(f*x + e)^6 + 6*sin( f*x + e)^4 - 4*sin(f*x + e)^2 + 1))/f
Time = 0.35 (sec) , antiderivative size = 94, normalized size of antiderivative = 0.94 \[ \int \left (a+b \sec ^2(e+f x)\right )^2 \tan ^5(e+f x) \, dx=-\frac {a^{2} \log \left ({\left | \cos \left (f x + e\right ) \right |}\right )}{f} - \frac {24 \, {\left (a^{2} - a b\right )} \cos \left (f x + e\right )^{6} - 6 \, {\left (a^{2} - 4 \, a b + b^{2}\right )} \cos \left (f x + e\right )^{4} - 8 \, {\left (a b - b^{2}\right )} \cos \left (f x + e\right )^{2} - 3 \, b^{2}}{24 \, f \cos \left (f x + e\right )^{8}} \] Input:
integrate((a+b*sec(f*x+e)^2)^2*tan(f*x+e)^5,x, algorithm="giac")
Output:
-a^2*log(abs(cos(f*x + e)))/f - 1/24*(24*(a^2 - a*b)*cos(f*x + e)^6 - 6*(a ^2 - 4*a*b + b^2)*cos(f*x + e)^4 - 8*(a*b - b^2)*cos(f*x + e)^2 - 3*b^2)/( f*cos(f*x + e)^8)
Time = 15.18 (sec) , antiderivative size = 124, normalized size of antiderivative = 1.24 \[ \int \left (a+b \sec ^2(e+f x)\right )^2 \tan ^5(e+f x) \, dx=\frac {{\mathrm {tan}\left (e+f\,x\right )}^4\,\left (\frac {{\left (a+b\right )}^2}{4}+\frac {b^2}{4}-\frac {b\,\left (a+b\right )}{2}\right )}{f}-\frac {{\mathrm {tan}\left (e+f\,x\right )}^2\,\left (\frac {{\left (a+b\right )}^2}{2}+\frac {b^2}{2}-b\,\left (a+b\right )\right )}{f}-\frac {{\mathrm {tan}\left (e+f\,x\right )}^6\,\left (\frac {b^2}{6}-\frac {b\,\left (a+b\right )}{3}\right )}{f}+\frac {a^2\,\ln \left ({\mathrm {tan}\left (e+f\,x\right )}^2+1\right )}{2\,f}+\frac {b^2\,{\mathrm {tan}\left (e+f\,x\right )}^8}{8\,f} \] Input:
int(tan(e + f*x)^5*(a + b/cos(e + f*x)^2)^2,x)
Output:
(tan(e + f*x)^4*((a + b)^2/4 + b^2/4 - (b*(a + b))/2))/f - (tan(e + f*x)^2 *((a + b)^2/2 + b^2/2 - b*(a + b)))/f - (tan(e + f*x)^6*(b^2/6 - (b*(a + b ))/3))/f + (a^2*log(tan(e + f*x)^2 + 1))/(2*f) + (b^2*tan(e + f*x)^8)/(8*f )
Time = 0.15 (sec) , antiderivative size = 154, normalized size of antiderivative = 1.54 \[ \int \left (a+b \sec ^2(e+f x)\right )^2 \tan ^5(e+f x) \, dx=\frac {12 \,\mathrm {log}\left (\tan \left (f x +e \right )^{2}+1\right ) a^{2}+3 \sec \left (f x +e \right )^{4} \tan \left (f x +e \right )^{4} b^{2}-2 \sec \left (f x +e \right )^{4} \tan \left (f x +e \right )^{2} b^{2}+\sec \left (f x +e \right )^{4} b^{2}+8 \sec \left (f x +e \right )^{2} \tan \left (f x +e \right )^{4} a b -8 \sec \left (f x +e \right )^{2} \tan \left (f x +e \right )^{2} a b +8 \sec \left (f x +e \right )^{2} a b +6 \tan \left (f x +e \right )^{4} a^{2}-12 \tan \left (f x +e \right )^{2} a^{2}}{24 f} \] Input:
int((a+b*sec(f*x+e)^2)^2*tan(f*x+e)^5,x)
Output:
(12*log(tan(e + f*x)**2 + 1)*a**2 + 3*sec(e + f*x)**4*tan(e + f*x)**4*b**2 - 2*sec(e + f*x)**4*tan(e + f*x)**2*b**2 + sec(e + f*x)**4*b**2 + 8*sec(e + f*x)**2*tan(e + f*x)**4*a*b - 8*sec(e + f*x)**2*tan(e + f*x)**2*a*b + 8 *sec(e + f*x)**2*a*b + 6*tan(e + f*x)**4*a**2 - 12*tan(e + f*x)**2*a**2)/( 24*f)