Integrand size = 7, antiderivative size = 30 \[ \int (\sec (x)+\tan (x))^5 \, dx=-\log (1-\sin (x))+\frac {2}{(1-\sin (x))^2}-\frac {4}{1-\sin (x)} \] Output:
-ln(1-sin(x))+2/(1-sin(x))^2-4/(1-sin(x))
Time = 0.04 (sec) , antiderivative size = 52, normalized size of antiderivative = 1.73 \[ \int (\sec (x)+\tan (x))^5 \, dx=\text {arctanh}(\sin (x))-\log (\cos (x))-\sec ^2(x)+\frac {3 \sec ^4(x)}{2}+\sec (x) \tan (x)-\sec ^3(x) \tan (x)+5 \sec (x) \tan ^3(x)+\frac {5 \tan ^4(x)}{2} \] Input:
Integrate[(Sec[x] + Tan[x])^5,x]
Output:
ArcTanh[Sin[x]] - Log[Cos[x]] - Sec[x]^2 + (3*Sec[x]^4)/2 + Sec[x]*Tan[x] - Sec[x]^3*Tan[x] + 5*Sec[x]*Tan[x]^3 + (5*Tan[x]^4)/2
Time = 0.26 (sec) , antiderivative size = 30, normalized size of antiderivative = 1.00, number of steps used = 7, number of rules used = 6, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.857, Rules used = {3042, 4891, 3042, 3146, 49, 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 (x)+\sec (x))^5 \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int (\tan (x)+\sec (x))^5dx\) |
\(\Big \downarrow \) 4891 |
\(\displaystyle \int (\sin (x)+1)^5 \sec ^5(x)dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \frac {(\sin (x)+1)^5}{\cos (x)^5}dx\) |
\(\Big \downarrow \) 3146 |
\(\displaystyle \int \frac {(\sin (x)+1)^2}{(1-\sin (x))^3}d\sin (x)\) |
\(\Big \downarrow \) 49 |
\(\displaystyle \int \left (-\frac {4}{(\sin (x)-1)^2}-\frac {4}{(\sin (x)-1)^3}+\frac {1}{1-\sin (x)}\right )d\sin (x)\) |
\(\Big \downarrow \) 2009 |
\(\displaystyle -\frac {4}{1-\sin (x)}+\frac {2}{(1-\sin (x))^2}-\log (1-\sin (x))\) |
Input:
Int[(Sec[x] + Tan[x])^5,x]
Output:
-Log[1 - Sin[x]] + 2/(1 - Sin[x])^2 - 4/(1 - Sin[x])
Int[((a_.) + (b_.)*(x_))^(m_.)*((c_.) + (d_.)*(x_))^(n_.), x_Symbol] :> Int [ExpandIntegrand[(a + b*x)^m*(c + d*x)^n, x], x] /; FreeQ[{a, b, c, d}, x] && IGtQ[m, 0] && IGtQ[m + n + 2, 0]
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 + (p - 1)/2)*(a - x )^((p - 1)/2), x], x, b*Sin[e + f*x]], x] /; FreeQ[{a, b, e, f, m}, x] && I ntegerQ[(p - 1)/2] && EqQ[a^2 - b^2, 0] && (GeQ[p, -1] || !IntegerQ[m + 1/ 2])
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]
Result contains complex when optimal does not.
Time = 8.67 (sec) , antiderivative size = 51, normalized size of antiderivative = 1.70
method | result | size |
risch | \(i x +\frac {8 i \left (-i {\mathrm e}^{2 i x}+{\mathrm e}^{3 i x}-{\mathrm e}^{i x}\right )}{\left ({\mathrm e}^{i x}-i\right )^{4}}-2 \ln \left ({\mathrm e}^{i x}-i\right )\) | \(51\) |
parts | \(-\left (-\frac {\sec \left (x \right )^{3}}{4}-\frac {3 \sec \left (x \right )}{8}\right ) \tan \left (x \right )+\ln \left (\sec \left (x \right )+\tan \left (x \right )\right )+\frac {11 \tan \left (x \right )^{4}}{4}-\frac {\tan \left (x \right )^{2}}{2}+\frac {\ln \left (1+\tan \left (x \right )^{2}\right )}{2}+\frac {5 \sec \left (x \right )^{4}}{4}+\frac {5 \sin \left (x \right )^{3}}{2 \cos \left (x \right )^{4}}+\frac {5 \sin \left (x \right )^{3}}{4 \cos \left (x \right )^{2}}-\frac {5 \sin \left (x \right )}{8}+\frac {5 \sin \left (x \right )^{5}}{4 \cos \left (x \right )^{4}}-\frac {5 \sin \left (x \right )^{5}}{8 \cos \left (x \right )^{2}}-\frac {5 \sin \left (x \right )^{3}}{8}\) | \(100\) |
default | \(-\left (-\frac {\sec \left (x \right )^{3}}{4}-\frac {3 \sec \left (x \right )}{8}\right ) \tan \left (x \right )+\ln \left (\sec \left (x \right )+\tan \left (x \right )\right )+\frac {5}{4 \cos \left (x \right )^{4}}+\frac {5 \sin \left (x \right )^{3}}{2 \cos \left (x \right )^{4}}+\frac {5 \sin \left (x \right )^{3}}{4 \cos \left (x \right )^{2}}-\frac {5 \sin \left (x \right )}{8}+\frac {5 \sin \left (x \right )^{4}}{2 \cos \left (x \right )^{4}}+\frac {5 \sin \left (x \right )^{5}}{4 \cos \left (x \right )^{4}}-\frac {5 \sin \left (x \right )^{5}}{8 \cos \left (x \right )^{2}}-\frac {5 \sin \left (x \right )^{3}}{8}+\frac {\tan \left (x \right )^{4}}{4}-\frac {\tan \left (x \right )^{2}}{2}-\ln \left (\cos \left (x \right )\right )\) | \(106\) |
Input:
int((sec(x)+tan(x))^5,x,method=_RETURNVERBOSE)
Output:
I*x+8*I/(exp(I*x)-I)^4*(-I*exp(2*I*x)+exp(3*I*x)-exp(I*x))-2*ln(exp(I*x)-I )
Time = 0.08 (sec) , antiderivative size = 38, normalized size of antiderivative = 1.27 \[ \int (\sec (x)+\tan (x))^5 \, dx=-\frac {{\left (\cos \left (x\right )^{2} + 2 \, \sin \left (x\right ) - 2\right )} \log \left (-\sin \left (x\right ) + 1\right ) + 4 \, \sin \left (x\right ) - 2}{\cos \left (x\right )^{2} + 2 \, \sin \left (x\right ) - 2} \] Input:
integrate((sec(x)+tan(x))^5,x, algorithm="fricas")
Output:
-((cos(x)^2 + 2*sin(x) - 2)*log(-sin(x) + 1) + 4*sin(x) - 2)/(cos(x)^2 + 2 *sin(x) - 2)
Leaf count of result is larger than twice the leaf count of optimal. 68 vs. \(2 (20) = 40\).
Time = 1.89 (sec) , antiderivative size = 68, normalized size of antiderivative = 2.27 \[ \int (\sec (x)+\tan (x))^5 \, dx=- \frac {\log {\left (\sin {\left (x \right )} - 1 \right )}}{2} + \frac {\log {\left (\sin {\left (x \right )} + 1 \right )}}{2} + \frac {\log {\left (\sec ^{2}{\left (x \right )} \right )}}{2} + \frac {5 \tan ^{4}{\left (x \right )}}{2} + \frac {3 \sec ^{4}{\left (x \right )}}{2} - \sec ^{2}{\left (x \right )} + \frac {32 \sin ^{3}{\left (x \right )}}{8 \sin ^{4}{\left (x \right )} - 16 \sin ^{2}{\left (x \right )} + 8} \] Input:
integrate((sec(x)+tan(x))**5,x)
Output:
-log(sin(x) - 1)/2 + log(sin(x) + 1)/2 + log(sec(x)**2)/2 + 5*tan(x)**4/2 + 3*sec(x)**4/2 - sec(x)**2 + 32*sin(x)**3/(8*sin(x)**4 - 16*sin(x)**2 + 8 )
Leaf count of result is larger than twice the leaf count of optimal. 141 vs. \(2 (26) = 52\).
Time = 0.03 (sec) , antiderivative size = 141, normalized size of antiderivative = 4.70 \[ \int (\sec (x)+\tan (x))^5 \, dx=\frac {5}{2} \, \tan \left (x\right )^{4} + \frac {5 \, {\left (5 \, \sin \left (x\right )^{3} - 3 \, \sin \left (x\right )\right )}}{8 \, {\left (\sin \left (x\right )^{4} - 2 \, \sin \left (x\right )^{2} + 1\right )}} - \frac {3 \, \sin \left (x\right )^{3} - 5 \, \sin \left (x\right )}{8 \, {\left (\sin \left (x\right )^{4} - 2 \, \sin \left (x\right )^{2} + 1\right )}} + \frac {5 \, {\left (\sin \left (x\right )^{3} + \sin \left (x\right )\right )}}{4 \, {\left (\sin \left (x\right )^{4} - 2 \, \sin \left (x\right )^{2} + 1\right )}} + \frac {4 \, \sin \left (x\right )^{2} - 3}{4 \, {\left (\sin \left (x\right )^{4} - 2 \, \sin \left (x\right )^{2} + 1\right )}} + \frac {5}{4 \, {\left (\sin \left (x\right )^{2} - 1\right )}^{2}} - \frac {1}{2} \, \log \left (\sin \left (x\right )^{2} - 1\right ) + \frac {1}{2} \, \log \left (\sin \left (x\right ) + 1\right ) - \frac {1}{2} \, \log \left (\sin \left (x\right ) - 1\right ) \] Input:
integrate((sec(x)+tan(x))^5,x, algorithm="maxima")
Output:
5/2*tan(x)^4 + 5/8*(5*sin(x)^3 - 3*sin(x))/(sin(x)^4 - 2*sin(x)^2 + 1) - 1 /8*(3*sin(x)^3 - 5*sin(x))/(sin(x)^4 - 2*sin(x)^2 + 1) + 5/4*(sin(x)^3 + s in(x))/(sin(x)^4 - 2*sin(x)^2 + 1) + 1/4*(4*sin(x)^2 - 3)/(sin(x)^4 - 2*si n(x)^2 + 1) + 5/4/(sin(x)^2 - 1)^2 - 1/2*log(sin(x)^2 - 1) + 1/2*log(sin(x ) + 1) - 1/2*log(sin(x) - 1)
Leaf count of result is larger than twice the leaf count of optimal. 62 vs. \(2 (26) = 52\).
Time = 0.12 (sec) , antiderivative size = 62, normalized size of antiderivative = 2.07 \[ \int (\sec (x)+\tan (x))^5 \, dx=\frac {25 \, \tan \left (\frac {1}{2} \, x\right )^{4} - 100 \, \tan \left (\frac {1}{2} \, x\right )^{3} + 198 \, \tan \left (\frac {1}{2} \, x\right )^{2} - 100 \, \tan \left (\frac {1}{2} \, x\right ) + 25}{6 \, {\left (\tan \left (\frac {1}{2} \, x\right ) - 1\right )}^{4}} + \log \left (\tan \left (\frac {1}{2} \, x\right )^{2} + 1\right ) - 2 \, \log \left ({\left | \tan \left (\frac {1}{2} \, x\right ) - 1 \right |}\right ) \] Input:
integrate((sec(x)+tan(x))^5,x, algorithm="giac")
Output:
1/6*(25*tan(1/2*x)^4 - 100*tan(1/2*x)^3 + 198*tan(1/2*x)^2 - 100*tan(1/2*x ) + 25)/(tan(1/2*x) - 1)^4 + log(tan(1/2*x)^2 + 1) - 2*log(abs(tan(1/2*x) - 1))
Time = 15.05 (sec) , antiderivative size = 59, normalized size of antiderivative = 1.97 \[ \int (\sec (x)+\tan (x))^5 \, dx=\ln \left ({\mathrm {tan}\left (\frac {x}{2}\right )}^2+1\right )-2\,\ln \left (\mathrm {tan}\left (\frac {x}{2}\right )-1\right )+\frac {8\,{\mathrm {tan}\left (\frac {x}{2}\right )}^2}{{\mathrm {tan}\left (\frac {x}{2}\right )}^4-4\,{\mathrm {tan}\left (\frac {x}{2}\right )}^3+6\,{\mathrm {tan}\left (\frac {x}{2}\right )}^2-4\,\mathrm {tan}\left (\frac {x}{2}\right )+1} \] Input:
int((tan(x) + 1/cos(x))^5,x)
Output:
log(tan(x/2)^2 + 1) - 2*log(tan(x/2) - 1) + (8*tan(x/2)^2)/(6*tan(x/2)^2 - 4*tan(x/2) - 4*tan(x/2)^3 + tan(x/2)^4 + 1)
Time = 0.16 (sec) , antiderivative size = 190, normalized size of antiderivative = 6.33 \[ \int (\sec (x)+\tan (x))^5 \, dx=\frac {2 \,\mathrm {log}\left (\tan \left (x \right )^{2}+1\right ) \sin \left (x \right )^{4}-4 \,\mathrm {log}\left (\tan \left (x \right )^{2}+1\right ) \sin \left (x \right )^{2}+2 \,\mathrm {log}\left (\tan \left (x \right )^{2}+1\right )-4 \,\mathrm {log}\left (\tan \left (\frac {x}{2}\right )-1\right ) \sin \left (x \right )^{4}+8 \,\mathrm {log}\left (\tan \left (\frac {x}{2}\right )-1\right ) \sin \left (x \right )^{2}-4 \,\mathrm {log}\left (\tan \left (\frac {x}{2}\right )-1\right )+4 \,\mathrm {log}\left (\tan \left (\frac {x}{2}\right )+1\right ) \sin \left (x \right )^{4}-8 \,\mathrm {log}\left (\tan \left (\frac {x}{2}\right )+1\right ) \sin \left (x \right )^{2}+4 \,\mathrm {log}\left (\tan \left (\frac {x}{2}\right )+1\right )+\sin \left (x \right )^{4} \tan \left (x \right )^{4}-2 \sin \left (x \right )^{4} \tan \left (x \right )^{2}+5 \sin \left (x \right )^{4}+16 \sin \left (x \right )^{3}-2 \sin \left (x \right )^{2} \tan \left (x \right )^{4}+4 \sin \left (x \right )^{2} \tan \left (x \right )^{2}+10 \sin \left (x \right )^{2}+\tan \left (x \right )^{4}-2 \tan \left (x \right )^{2}}{4 \sin \left (x \right )^{4}-8 \sin \left (x \right )^{2}+4} \] Input:
int((sec(x)+tan(x))^5,x)
Output:
(2*log(tan(x)**2 + 1)*sin(x)**4 - 4*log(tan(x)**2 + 1)*sin(x)**2 + 2*log(t an(x)**2 + 1) - 4*log(tan(x/2) - 1)*sin(x)**4 + 8*log(tan(x/2) - 1)*sin(x) **2 - 4*log(tan(x/2) - 1) + 4*log(tan(x/2) + 1)*sin(x)**4 - 8*log(tan(x/2) + 1)*sin(x)**2 + 4*log(tan(x/2) + 1) + sin(x)**4*tan(x)**4 - 2*sin(x)**4* tan(x)**2 + 5*sin(x)**4 + 16*sin(x)**3 - 2*sin(x)**2*tan(x)**4 + 4*sin(x)* *2*tan(x)**2 + 10*sin(x)**2 + tan(x)**4 - 2*tan(x)**2)/(4*(sin(x)**4 - 2*s in(x)**2 + 1))