Integrand size = 11, antiderivative size = 149 \[ \int (a \sec (x)+b \tan (x))^5 \, dx=-\frac {1}{16} (a+b)^3 \left (3 a^2-9 a b+8 b^2\right ) \log (1-\sin (x))+\frac {1}{16} (a-b)^3 \left (3 a^2+9 a b+8 b^2\right ) \log (1+\sin (x))-\frac {1}{8} a \left (7-\frac {3 a^2}{b^2}\right ) b^4 \sin (x)+\frac {1}{4} \sec ^4(x) (b+a \sin (x)) (a+b \sin (x))^4+\frac {1}{8} \sec ^2(x) (a+b \sin (x))^2 \left (2 b \left (a^2-2 b^2\right )+a \left (3 a^2-5 b^2\right ) \sin (x)\right ) \]
-1/16*(a+b)^3*(3*a^2-9*a*b+8*b^2)*ln(1-sin(x))+1/16*(a-b)^3*(3*a^2+9*a*b+8 *b^2)*ln(1+sin(x))-1/8*a*(7-3*a^2/b^2)*b^4*sin(x)+1/4*sec(x)^4*(b+a*sin(x) )*(a+b*sin(x))^4+1/8*sec(x)^2*(a+b*sin(x))^2*(2*b*(a^2-2*b^2)+a*(3*a^2-5*b ^2)*sin(x))
Leaf count is larger than twice the leaf count of optimal. \(303\) vs. \(2(149)=298\).
Time = 1.01 (sec) , antiderivative size = 303, normalized size of antiderivative = 2.03 \[ \int (a \sec (x)+b \tan (x))^5 \, dx=-\frac {\left (a^2-b^2\right )^2 \left ((a+b)^3 \left (3 a^2-9 a b+8 b^2\right ) \log (1-\sin (x))-(a-b)^3 \left (3 a^2+9 a b+8 b^2\right ) \log (1+\sin (x))\right )-10 a b^2 \left (9 a^6-6 a^4 b^2+8 a^2 b^4-3 b^6\right ) \sin (x)+8 b^3 \left (-15 a^6-4 a^4 b^2-2 a^2 b^4+b^6\right ) \sin ^2(x)-10 a b^4 \left (9 a^4+8 a^2 b^2-b^4\right ) \sin ^3(x)+4 b^5 \left (-9 a^4-12 a^2 b^2+b^4\right ) \sin ^4(x)-2 a b^6 \left (3 a^2+5 b^2\right ) \sin ^5(x)+4 \left (-a^2+b^2\right ) \sec ^4(x) (-b+a \sin (x)) (a+b \sin (x))^6+2 \sec ^2(x) (a+b \sin (x))^6 \left (6 a^2 b+2 b^3-3 a^3 \sin (x)-5 a b^2 \sin (x)\right )}{16 \left (a^2-b^2\right )^2} \]
-1/16*((a^2 - b^2)^2*((a + b)^3*(3*a^2 - 9*a*b + 8*b^2)*Log[1 - Sin[x]] - (a - b)^3*(3*a^2 + 9*a*b + 8*b^2)*Log[1 + Sin[x]]) - 10*a*b^2*(9*a^6 - 6*a ^4*b^2 + 8*a^2*b^4 - 3*b^6)*Sin[x] + 8*b^3*(-15*a^6 - 4*a^4*b^2 - 2*a^2*b^ 4 + b^6)*Sin[x]^2 - 10*a*b^4*(9*a^4 + 8*a^2*b^2 - b^4)*Sin[x]^3 + 4*b^5*(- 9*a^4 - 12*a^2*b^2 + b^4)*Sin[x]^4 - 2*a*b^6*(3*a^2 + 5*b^2)*Sin[x]^5 + 4* (-a^2 + b^2)*Sec[x]^4*(-b + a*Sin[x])*(a + b*Sin[x])^6 + 2*Sec[x]^2*(a + b *Sin[x])^6*(6*a^2*b + 2*b^3 - 3*a^3*Sin[x] - 5*a*b^2*Sin[x]))/(a^2 - b^2)^ 2
Time = 0.45 (sec) , antiderivative size = 172, normalized size of antiderivative = 1.15, number of steps used = 7, number of rules used = 6, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.545, Rules used = {3042, 4891, 3042, 3147, 477, 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 (a \sec (x)+b \tan (x))^5 \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int (a \sec (x)+b \tan (x))^5dx\) |
\(\Big \downarrow \) 4891 |
\(\displaystyle \int \sec ^5(x) (a+b \sin (x))^5dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \frac {(a+b \sin (x))^5}{\cos (x)^5}dx\) |
\(\Big \downarrow \) 3147 |
\(\displaystyle b^5 \int \frac {(a+b \sin (x))^5}{\left (b^2-b^2 \sin ^2(x)\right )^3}d(b \sin (x))\) |
\(\Big \downarrow \) 477 |
\(\displaystyle \frac {\int \left (\frac {b^3 (a-b)^5}{8 (\sin (x) b+b)^3}+\frac {b^2 (3 a+7 b) (a-b)^4}{16 (\sin (x) b+b)^2}+\frac {b \left (3 a^2+9 b a+8 b^2\right ) (a-b)^3}{16 (\sin (x) b+b)}+\frac {b (a+b)^3 \left (3 a^2-9 b a+8 b^2\right )}{16 (b-b \sin (x))}+\frac {(3 a-7 b) b^2 (a+b)^4}{16 (b-b \sin (x))^2}+\frac {b^3 (a+b)^5}{8 (b-b \sin (x))^3}\right )d(b \sin (x))}{b}\) |
\(\Big \downarrow \) 2009 |
\(\displaystyle \frac {\frac {1}{16} b \left (3 a^2+9 a b+8 b^2\right ) (a-b)^3 \log (b \sin (x)+b)-\frac {1}{16} b (a+b)^3 \left (3 a^2-9 a b+8 b^2\right ) \log (b-b \sin (x))-\frac {b^3 (a-b)^5}{16 (b \sin (x)+b)^2}+\frac {b^3 (a+b)^5}{16 (b-b \sin (x))^2}-\frac {b^2 (3 a+7 b) (a-b)^4}{16 (b \sin (x)+b)}+\frac {b^2 (3 a-7 b) (a+b)^4}{16 (b-b \sin (x))}}{b}\) |
(-1/16*(b*(a + b)^3*(3*a^2 - 9*a*b + 8*b^2)*Log[b - b*Sin[x]]) + ((a - b)^ 3*b*(3*a^2 + 9*a*b + 8*b^2)*Log[b + b*Sin[x]])/16 + (b^3*(a + b)^5)/(16*(b - b*Sin[x])^2) + ((3*a - 7*b)*b^2*(a + b)^4)/(16*(b - b*Sin[x])) - ((a - b)^5*b^3)/(16*(b + b*Sin[x])^2) - ((a - b)^4*b^2*(3*a + 7*b))/(16*(b + b*S in[x])))/b
3.3.63.3.1 Defintions of rubi rules used
Int[((c_) + (d_.)*(x_))^(n_)*((a_) + (b_.)*(x_)^2)^(p_), x_Symbol] :> Simp[ a^p Int[ExpandIntegrand[(c + d*x)^n*(1 - Rt[-b/a, 2]*x)^p*(1 + Rt[-b/a, 2 ]*x)^p, x], x], x] /; FreeQ[{a, b, c, d}, x] && ILtQ[p, 0] && IntegerQ[n] & & NiceSqrtQ[-b/a] && !FractionalPowerFactorQ[Rt[-b/a, 2]]
Int[cos[(e_.) + (f_.)*(x_)]^(p_.)*((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m _.), x_Symbol] :> Simp[1/(b^p*f) Subst[Int[(a + x)^m*(b^2 - x^2)^((p - 1) /2), x], x, b*Sin[e + f*x]], x] /; FreeQ[{a, b, e, f, m}, x] && IntegerQ[(p - 1)/2] && NeQ[a^2 - b^2, 0]
Int[(u_.)*((b_.)*sec[(c_.) + (d_.)*(x_)]^(n_.) + (a_.)*tan[(c_.) + (d_.)*(x _)]^(n_.))^(p_), x_Symbol] :> Int[ActivateTrig[u]*Sec[c + d*x]^(n*p)*(b + a *Sin[c + d*x]^n)^p, x] /; FreeQ[{a, b, c, d}, x] && IntegersQ[n, p]
Time = 60.63 (sec) , antiderivative size = 164, normalized size of antiderivative = 1.10
method | result | size |
default | \(a^{5} \left (-\left (-\frac {\sec \left (x \right )^{3}}{4}-\frac {3 \sec \left (x \right )}{8}\right ) \tan \left (x \right )+\frac {3 \ln \left (\sec \left (x \right )+\tan \left (x \right )\right )}{8}\right )+\frac {5 a^{4} b}{4 \cos \left (x \right )^{4}}+10 a^{3} b^{2} \left (\frac {\sin \left (x \right )^{3}}{4 \cos \left (x \right )^{4}}+\frac {\sin \left (x \right )^{3}}{8 \cos \left (x \right )^{2}}+\frac {\sin \left (x \right )}{8}-\frac {\ln \left (\sec \left (x \right )+\tan \left (x \right )\right )}{8}\right )+\frac {5 a^{2} b^{3} \sin \left (x \right )^{4}}{2 \cos \left (x \right )^{4}}+5 a \,b^{4} \left (\frac {\sin \left (x \right )^{5}}{4 \cos \left (x \right )^{4}}-\frac {\sin \left (x \right )^{5}}{8 \cos \left (x \right )^{2}}-\frac {\sin \left (x \right )^{3}}{8}-\frac {3 \sin \left (x \right )}{8}+\frac {3 \ln \left (\sec \left (x \right )+\tan \left (x \right )\right )}{8}\right )+b^{5} \left (\frac {\tan \left (x \right )^{4}}{4}-\frac {\tan \left (x \right )^{2}}{2}-\ln \left (\cos \left (x \right )\right )\right )\) | \(164\) |
parts | \(a^{5} \left (-\left (-\frac {\sec \left (x \right )^{3}}{4}-\frac {3 \sec \left (x \right )}{8}\right ) \tan \left (x \right )+\frac {3 \ln \left (\sec \left (x \right )+\tan \left (x \right )\right )}{8}\right )+b^{5} \left (\frac {\tan \left (x \right )^{4}}{4}-\frac {\tan \left (x \right )^{2}}{2}+\frac {\ln \left (1+\tan \left (x \right )^{2}\right )}{2}\right )+\frac {5 a^{4} b \sec \left (x \right )^{4}}{4}+10 a^{3} b^{2} \left (\frac {\sin \left (x \right )^{3}}{4 \cos \left (x \right )^{4}}+\frac {\sin \left (x \right )^{3}}{8 \cos \left (x \right )^{2}}+\frac {\sin \left (x \right )}{8}-\frac {\ln \left (\sec \left (x \right )+\tan \left (x \right )\right )}{8}\right )+\frac {5 a^{2} b^{3} \tan \left (x \right )^{4}}{2}+5 a \,b^{4} \left (\frac {\sin \left (x \right )^{5}}{4 \cos \left (x \right )^{4}}-\frac {\sin \left (x \right )^{5}}{8 \cos \left (x \right )^{2}}-\frac {\sin \left (x \right )^{3}}{8}-\frac {3 \sin \left (x \right )}{8}+\frac {3 \ln \left (\sec \left (x \right )+\tan \left (x \right )\right )}{8}\right )\) | \(164\) |
risch | \(i b^{5} x -\frac {{\mathrm e}^{i x} \left (-3 i a^{5}+3 i a^{5} {\mathrm e}^{6 i x}-15 i a \,b^{4} {\mathrm e}^{2 i x}+15 i a \,b^{4} {\mathrm e}^{4 i x}-10 i a^{3} b^{2} {\mathrm e}^{6 i x}-11 i a^{5} {\mathrm e}^{2 i x}+80 a^{2} b^{3} {\mathrm e}^{5 i x}+16 b^{5} {\mathrm e}^{5 i x}-25 i a \,b^{4} {\mathrm e}^{6 i x}+70 i a^{3} b^{2} {\mathrm e}^{4 i x}-70 i a^{3} b^{2} {\mathrm e}^{2 i x}-80 a^{4} b \,{\mathrm e}^{3 i x}+16 b^{5} {\mathrm e}^{3 i x}+11 i a^{5} {\mathrm e}^{4 i x}+25 i a \,b^{4}+10 i a^{3} b^{2}+80 a^{2} b^{3} {\mathrm e}^{i x}+16 b^{5} {\mathrm e}^{i x}\right )}{4 \left ({\mathrm e}^{2 i x}+1\right )^{4}}-\frac {3 \ln \left ({\mathrm e}^{i x}-i\right ) a^{5}}{8}+\frac {5 \ln \left ({\mathrm e}^{i x}-i\right ) a^{3} b^{2}}{4}-\frac {15 \ln \left ({\mathrm e}^{i x}-i\right ) a \,b^{4}}{8}-\ln \left ({\mathrm e}^{i x}-i\right ) b^{5}+\frac {3 \ln \left (i+{\mathrm e}^{i x}\right ) a^{5}}{8}-\frac {5 \ln \left (i+{\mathrm e}^{i x}\right ) a^{3} b^{2}}{4}+\frac {15 \ln \left (i+{\mathrm e}^{i x}\right ) a \,b^{4}}{8}-\ln \left (i+{\mathrm e}^{i x}\right ) b^{5}\) | \(374\) |
a^5*(-(-1/4*sec(x)^3-3/8*sec(x))*tan(x)+3/8*ln(sec(x)+tan(x)))+5/4*a^4*b/c os(x)^4+10*a^3*b^2*(1/4*sin(x)^3/cos(x)^4+1/8*sin(x)^3/cos(x)^2+1/8*sin(x) -1/8*ln(sec(x)+tan(x)))+5/2*a^2*b^3*sin(x)^4/cos(x)^4+5*a*b^4*(1/4*sin(x)^ 5/cos(x)^4-1/8*sin(x)^5/cos(x)^2-1/8*sin(x)^3-3/8*sin(x)+3/8*ln(sec(x)+tan (x)))+b^5*(1/4*tan(x)^4-1/2*tan(x)^2-ln(cos(x)))
Time = 0.27 (sec) , antiderivative size = 166, normalized size of antiderivative = 1.11 \[ \int (a \sec (x)+b \tan (x))^5 \, dx=\frac {{\left (3 \, a^{5} - 10 \, a^{3} b^{2} + 15 \, a b^{4} - 8 \, b^{5}\right )} \cos \left (x\right )^{4} \log \left (\sin \left (x\right ) + 1\right ) - {\left (3 \, a^{5} - 10 \, a^{3} b^{2} + 15 \, a b^{4} + 8 \, b^{5}\right )} \cos \left (x\right )^{4} \log \left (-\sin \left (x\right ) + 1\right ) + 20 \, a^{4} b + 40 \, a^{2} b^{3} + 4 \, b^{5} - 16 \, {\left (5 \, a^{2} b^{3} + b^{5}\right )} \cos \left (x\right )^{2} + 2 \, {\left (2 \, a^{5} + 20 \, a^{3} b^{2} + 10 \, a b^{4} + {\left (3 \, a^{5} - 10 \, a^{3} b^{2} - 25 \, a b^{4}\right )} \cos \left (x\right )^{2}\right )} \sin \left (x\right )}{16 \, \cos \left (x\right )^{4}} \]
1/16*((3*a^5 - 10*a^3*b^2 + 15*a*b^4 - 8*b^5)*cos(x)^4*log(sin(x) + 1) - ( 3*a^5 - 10*a^3*b^2 + 15*a*b^4 + 8*b^5)*cos(x)^4*log(-sin(x) + 1) + 20*a^4* b + 40*a^2*b^3 + 4*b^5 - 16*(5*a^2*b^3 + b^5)*cos(x)^2 + 2*(2*a^5 + 20*a^3 *b^2 + 10*a*b^4 + (3*a^5 - 10*a^3*b^2 - 25*a*b^4)*cos(x)^2)*sin(x))/cos(x) ^4
Leaf count of result is larger than twice the leaf count of optimal. 308 vs. \(2 (141) = 282\).
Time = 2.12 (sec) , antiderivative size = 308, normalized size of antiderivative = 2.07 \[ \int (a \sec (x)+b \tan (x))^5 \, dx=- \frac {3 a^{5} \log {\left (\sin {\left (x \right )} - 1 \right )}}{16} + \frac {3 a^{5} \log {\left (\sin {\left (x \right )} + 1 \right )}}{16} - \frac {3 a^{5} \sin ^{3}{\left (x \right )}}{8 \sin ^{4}{\left (x \right )} - 16 \sin ^{2}{\left (x \right )} + 8} + \frac {5 a^{5} \sin {\left (x \right )}}{8 \sin ^{4}{\left (x \right )} - 16 \sin ^{2}{\left (x \right )} + 8} + \frac {5 a^{4} b \sec ^{4}{\left (x \right )}}{4} + \frac {5 a^{3} b^{2} \log {\left (\sin {\left (x \right )} - 1 \right )}}{8} - \frac {5 a^{3} b^{2} \log {\left (\sin {\left (x \right )} + 1 \right )}}{8} + \frac {10 a^{3} b^{2} \sin ^{3}{\left (x \right )}}{8 \sin ^{4}{\left (x \right )} - 16 \sin ^{2}{\left (x \right )} + 8} + \frac {10 a^{3} b^{2} \sin {\left (x \right )}}{8 \sin ^{4}{\left (x \right )} - 16 \sin ^{2}{\left (x \right )} + 8} + \frac {5 a^{2} b^{3} \tan ^{4}{\left (x \right )}}{2} - \frac {15 a b^{4} \log {\left (\sin {\left (x \right )} - 1 \right )}}{16} + \frac {15 a b^{4} \log {\left (\sin {\left (x \right )} + 1 \right )}}{16} + \frac {25 a b^{4} \sin ^{3}{\left (x \right )}}{8 \sin ^{4}{\left (x \right )} - 16 \sin ^{2}{\left (x \right )} + 8} - \frac {15 a b^{4} \sin {\left (x \right )}}{8 \sin ^{4}{\left (x \right )} - 16 \sin ^{2}{\left (x \right )} + 8} + \frac {b^{5} \log {\left (\sec ^{2}{\left (x \right )} \right )}}{2} + \frac {b^{5} \sec ^{4}{\left (x \right )}}{4} - b^{5} \sec ^{2}{\left (x \right )} \]
-3*a**5*log(sin(x) - 1)/16 + 3*a**5*log(sin(x) + 1)/16 - 3*a**5*sin(x)**3/ (8*sin(x)**4 - 16*sin(x)**2 + 8) + 5*a**5*sin(x)/(8*sin(x)**4 - 16*sin(x)* *2 + 8) + 5*a**4*b*sec(x)**4/4 + 5*a**3*b**2*log(sin(x) - 1)/8 - 5*a**3*b* *2*log(sin(x) + 1)/8 + 10*a**3*b**2*sin(x)**3/(8*sin(x)**4 - 16*sin(x)**2 + 8) + 10*a**3*b**2*sin(x)/(8*sin(x)**4 - 16*sin(x)**2 + 8) + 5*a**2*b**3* tan(x)**4/2 - 15*a*b**4*log(sin(x) - 1)/16 + 15*a*b**4*log(sin(x) + 1)/16 + 25*a*b**4*sin(x)**3/(8*sin(x)**4 - 16*sin(x)**2 + 8) - 15*a*b**4*sin(x)/ (8*sin(x)**4 - 16*sin(x)**2 + 8) + b**5*log(sec(x)**2)/2 + b**5*sec(x)**4/ 4 - b**5*sec(x)**2
Time = 0.22 (sec) , antiderivative size = 204, normalized size of antiderivative = 1.37 \[ \int (a \sec (x)+b \tan (x))^5 \, dx=\frac {5}{2} \, a^{2} b^{3} \tan \left (x\right )^{4} + \frac {5}{16} \, a b^{4} {\left (\frac {2 \, {\left (5 \, \sin \left (x\right )^{3} - 3 \, \sin \left (x\right )\right )}}{\sin \left (x\right )^{4} - 2 \, \sin \left (x\right )^{2} + 1} + 3 \, \log \left (\sin \left (x\right ) + 1\right ) - 3 \, \log \left (\sin \left (x\right ) - 1\right )\right )} - \frac {1}{16} \, a^{5} {\left (\frac {2 \, {\left (3 \, \sin \left (x\right )^{3} - 5 \, \sin \left (x\right )\right )}}{\sin \left (x\right )^{4} - 2 \, \sin \left (x\right )^{2} + 1} - 3 \, \log \left (\sin \left (x\right ) + 1\right ) + 3 \, \log \left (\sin \left (x\right ) - 1\right )\right )} + \frac {5}{8} \, a^{3} b^{2} {\left (\frac {2 \, {\left (\sin \left (x\right )^{3} + \sin \left (x\right )\right )}}{\sin \left (x\right )^{4} - 2 \, \sin \left (x\right )^{2} + 1} - \log \left (\sin \left (x\right ) + 1\right ) + \log \left (\sin \left (x\right ) - 1\right )\right )} + \frac {1}{4} \, b^{5} {\left (\frac {4 \, \sin \left (x\right )^{2} - 3}{\sin \left (x\right )^{4} - 2 \, \sin \left (x\right )^{2} + 1} - 2 \, \log \left (\sin \left (x\right )^{2} - 1\right )\right )} + \frac {5 \, a^{4} b}{4 \, {\left (\sin \left (x\right )^{2} - 1\right )}^{2}} \]
5/2*a^2*b^3*tan(x)^4 + 5/16*a*b^4*(2*(5*sin(x)^3 - 3*sin(x))/(sin(x)^4 - 2 *sin(x)^2 + 1) + 3*log(sin(x) + 1) - 3*log(sin(x) - 1)) - 1/16*a^5*(2*(3*s in(x)^3 - 5*sin(x))/(sin(x)^4 - 2*sin(x)^2 + 1) - 3*log(sin(x) + 1) + 3*lo g(sin(x) - 1)) + 5/8*a^3*b^2*(2*(sin(x)^3 + sin(x))/(sin(x)^4 - 2*sin(x)^2 + 1) - log(sin(x) + 1) + log(sin(x) - 1)) + 1/4*b^5*((4*sin(x)^2 - 3)/(si n(x)^4 - 2*sin(x)^2 + 1) - 2*log(sin(x)^2 - 1)) + 5/4*a^4*b/(sin(x)^2 - 1) ^2
Time = 0.27 (sec) , antiderivative size = 178, normalized size of antiderivative = 1.19 \[ \int (a \sec (x)+b \tan (x))^5 \, dx=\frac {1}{16} \, {\left (3 \, a^{5} - 10 \, a^{3} b^{2} + 15 \, a b^{4} - 8 \, b^{5}\right )} \log \left (\sin \left (x\right ) + 1\right ) - \frac {1}{16} \, {\left (3 \, a^{5} - 10 \, a^{3} b^{2} + 15 \, a b^{4} + 8 \, b^{5}\right )} \log \left (-\sin \left (x\right ) + 1\right ) + \frac {6 \, b^{5} \sin \left (x\right )^{4} - 3 \, a^{5} \sin \left (x\right )^{3} + 10 \, a^{3} b^{2} \sin \left (x\right )^{3} + 25 \, a b^{4} \sin \left (x\right )^{3} + 40 \, a^{2} b^{3} \sin \left (x\right )^{2} - 4 \, b^{5} \sin \left (x\right )^{2} + 5 \, a^{5} \sin \left (x\right ) + 10 \, a^{3} b^{2} \sin \left (x\right ) - 15 \, a b^{4} \sin \left (x\right ) + 10 \, a^{4} b - 20 \, a^{2} b^{3}}{8 \, {\left (\sin \left (x\right )^{2} - 1\right )}^{2}} \]
1/16*(3*a^5 - 10*a^3*b^2 + 15*a*b^4 - 8*b^5)*log(sin(x) + 1) - 1/16*(3*a^5 - 10*a^3*b^2 + 15*a*b^4 + 8*b^5)*log(-sin(x) + 1) + 1/8*(6*b^5*sin(x)^4 - 3*a^5*sin(x)^3 + 10*a^3*b^2*sin(x)^3 + 25*a*b^4*sin(x)^3 + 40*a^2*b^3*sin (x)^2 - 4*b^5*sin(x)^2 + 5*a^5*sin(x) + 10*a^3*b^2*sin(x) - 15*a*b^4*sin(x ) + 10*a^4*b - 20*a^2*b^3)/(sin(x)^2 - 1)^2
Time = 29.64 (sec) , antiderivative size = 272, normalized size of antiderivative = 1.83 \[ \int (a \sec (x)+b \tan (x))^5 \, dx=\frac {\left (\frac {5\,a^5}{4}+\frac {5\,a^3\,b^2}{2}-\frac {15\,a\,b^4}{4}\right )\,{\mathrm {tan}\left (\frac {x}{2}\right )}^7+\left (10\,a^4\,b-2\,b^5\right )\,{\mathrm {tan}\left (\frac {x}{2}\right )}^6+\left (\frac {3\,a^5}{4}+\frac {35\,a^3\,b^2}{2}+\frac {55\,a\,b^4}{4}\right )\,{\mathrm {tan}\left (\frac {x}{2}\right )}^5+\left (40\,a^2\,b^3+8\,b^5\right )\,{\mathrm {tan}\left (\frac {x}{2}\right )}^4+\left (\frac {3\,a^5}{4}+\frac {35\,a^3\,b^2}{2}+\frac {55\,a\,b^4}{4}\right )\,{\mathrm {tan}\left (\frac {x}{2}\right )}^3+\left (10\,a^4\,b-2\,b^5\right )\,{\mathrm {tan}\left (\frac {x}{2}\right )}^2+\left (\frac {5\,a^5}{4}+\frac {5\,a^3\,b^2}{2}-\frac {15\,a\,b^4}{4}\right )\,\mathrm {tan}\left (\frac {x}{2}\right )}{{\mathrm {tan}\left (\frac {x}{2}\right )}^8-4\,{\mathrm {tan}\left (\frac {x}{2}\right )}^6+6\,{\mathrm {tan}\left (\frac {x}{2}\right )}^4-4\,{\mathrm {tan}\left (\frac {x}{2}\right )}^2+1}+b^5\,\ln \left ({\mathrm {tan}\left (\frac {x}{2}\right )}^2+1\right )-\frac {\ln \left (\mathrm {tan}\left (\frac {x}{2}\right )-1\right )\,{\left (a+b\right )}^3\,\left (3\,a^2-9\,a\,b+8\,b^2\right )}{8}+\ln \left (\mathrm {tan}\left (\frac {x}{2}\right )+1\right )\,{\left (a-b\right )}^3\,\left (\frac {3\,a^2}{8}+\frac {9\,a\,b}{8}+b^2\right ) \]
(tan(x/2)^2*(10*a^4*b - 2*b^5) + tan(x/2)^6*(10*a^4*b - 2*b^5) + tan(x/2)^ 4*(8*b^5 + 40*a^2*b^3) + tan(x/2)*((5*a^5)/4 - (15*a*b^4)/4 + (5*a^3*b^2)/ 2) + tan(x/2)^7*((5*a^5)/4 - (15*a*b^4)/4 + (5*a^3*b^2)/2) + tan(x/2)^3*(( 55*a*b^4)/4 + (3*a^5)/4 + (35*a^3*b^2)/2) + tan(x/2)^5*((55*a*b^4)/4 + (3* a^5)/4 + (35*a^3*b^2)/2))/(6*tan(x/2)^4 - 4*tan(x/2)^2 - 4*tan(x/2)^6 + ta n(x/2)^8 + 1) + b^5*log(tan(x/2)^2 + 1) - (log(tan(x/2) - 1)*(a + b)^3*(3* a^2 - 9*a*b + 8*b^2))/8 + log(tan(x/2) + 1)*(a - b)^3*((9*a*b)/8 + (3*a^2) /8 + b^2)