Integrand size = 22, antiderivative size = 149 \[ \int (e x)^{-1+2 n} \left (a+b \sec \left (c+d x^n\right )\right ) \, dx=\frac {a (e x)^{2 n}}{2 e n}-\frac {2 i b x^{-n} (e x)^{2 n} \arctan \left (e^{i \left (c+d x^n\right )}\right )}{d e n}+\frac {i b x^{-2 n} (e x)^{2 n} \operatorname {PolyLog}\left (2,-i e^{i \left (c+d x^n\right )}\right )}{d^2 e n}-\frac {i b x^{-2 n} (e x)^{2 n} \operatorname {PolyLog}\left (2,i e^{i \left (c+d x^n\right )}\right )}{d^2 e n} \] Output:
1/2*a*(e*x)^(2*n)/e/n-2*I*b*(e*x)^(2*n)*arctan(exp(I*(c+d*x^n)))/d/e/n/(x^ n)+I*b*(e*x)^(2*n)*polylog(2,-I*exp(I*(c+d*x^n)))/d^2/e/n/(x^(2*n))-I*b*(e *x)^(2*n)*polylog(2,I*exp(I*(c+d*x^n)))/d^2/e/n/(x^(2*n))
Time = 0.58 (sec) , antiderivative size = 188, normalized size of antiderivative = 1.26 \[ \int (e x)^{-1+2 n} \left (a+b \sec \left (c+d x^n\right )\right ) \, dx=\frac {(e x)^{2 n} \cos \left (c+d x^n\right ) \left (a+\frac {b x^{-2 n} \left (\left (-2 c+\pi -2 d x^n\right ) \left (\log \left (1-i e^{-i \left (c+d x^n\right )}\right )-\log \left (1+i e^{-i \left (c+d x^n\right )}\right )\right )-(-2 c+\pi ) \log \left (\cot \left (\frac {1}{4} \left (2 c+\pi +2 d x^n\right )\right )\right )+2 i \left (\operatorname {PolyLog}\left (2,-i e^{-i \left (c+d x^n\right )}\right )-\operatorname {PolyLog}\left (2,i e^{-i \left (c+d x^n\right )}\right )\right )\right )}{d^2}\right ) \left (a+b \sec \left (c+d x^n\right )\right )}{2 e n \left (b+a \cos \left (c+d x^n\right )\right )} \] Input:
Integrate[(e*x)^(-1 + 2*n)*(a + b*Sec[c + d*x^n]),x]
Output:
((e*x)^(2*n)*Cos[c + d*x^n]*(a + (b*((-2*c + Pi - 2*d*x^n)*(Log[1 - I/E^(I *(c + d*x^n))] - Log[1 + I/E^(I*(c + d*x^n))]) - (-2*c + Pi)*Log[Cot[(2*c + Pi + 2*d*x^n)/4]] + (2*I)*(PolyLog[2, (-I)/E^(I*(c + d*x^n))] - PolyLog[ 2, I/E^(I*(c + d*x^n))])))/(d^2*x^(2*n)))*(a + b*Sec[c + d*x^n]))/(2*e*n*( b + a*Cos[c + d*x^n]))
Time = 0.33 (sec) , antiderivative size = 149, normalized size of antiderivative = 1.00, number of steps used = 2, number of rules used = 2, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.091, Rules used = {2010, 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 (e x)^{2 n-1} \left (a+b \sec \left (c+d x^n\right )\right ) \, dx\) |
\(\Big \downarrow \) 2010 |
\(\displaystyle \int \left (a (e x)^{2 n-1}+b (e x)^{2 n-1} \sec \left (c+d x^n\right )\right )dx\) |
\(\Big \downarrow \) 2009 |
\(\displaystyle \frac {a (e x)^{2 n}}{2 e n}-\frac {2 i b x^{-n} (e x)^{2 n} \arctan \left (e^{i \left (c+d x^n\right )}\right )}{d e n}+\frac {i b x^{-2 n} (e x)^{2 n} \operatorname {PolyLog}\left (2,-i e^{i \left (d x^n+c\right )}\right )}{d^2 e n}-\frac {i b x^{-2 n} (e x)^{2 n} \operatorname {PolyLog}\left (2,i e^{i \left (d x^n+c\right )}\right )}{d^2 e n}\) |
Input:
Int[(e*x)^(-1 + 2*n)*(a + b*Sec[c + d*x^n]),x]
Output:
(a*(e*x)^(2*n))/(2*e*n) - ((2*I)*b*(e*x)^(2*n)*ArcTan[E^(I*(c + d*x^n))])/ (d*e*n*x^n) + (I*b*(e*x)^(2*n)*PolyLog[2, (-I)*E^(I*(c + d*x^n))])/(d^2*e* n*x^(2*n)) - (I*b*(e*x)^(2*n)*PolyLog[2, I*E^(I*(c + d*x^n))])/(d^2*e*n*x^ (2*n))
Int[(u_)*((c_.)*(x_))^(m_.), x_Symbol] :> Int[ExpandIntegrand[(c*x)^m*u, x] , x] /; FreeQ[{c, m}, x] && SumQ[u] && !LinearQ[u, x] && !MatchQ[u, (a_) + (b_.)*(v_) /; FreeQ[{a, b}, x] && InverseFunctionQ[v]]
Result contains higher order function than in optimal. Order 9 vs. order 4.
Time = 0.52 (sec) , antiderivative size = 845, normalized size of antiderivative = 5.67
Input:
int((e*x)^(-1+2*n)*(a+b*sec(c+d*x^n)),x,method=_RETURNVERBOSE)
Output:
I/e/n/d*b*(-exp(2*I*c))^(1/2)*ln(1+exp(I*x^n*d)*(-exp(2*I*c))^(1/2))*(-1)^ (-1/2*csgn(I*e)*csgn(I*e*x)^2)*(-1)^(-1/2*csgn(I*x)*csgn(I*e*x)^2)*(-1)^(1 /2*csgn(I*e)*csgn(I*x)*csgn(I*e*x))*(e^n)^2*x^n*exp(-1/2*I*(2*Pi*n*csgn(I* e*x)^3-2*Pi*n*csgn(I*e)*csgn(I*e*x)^2-2*Pi*n*csgn(I*x)*csgn(I*e*x)^2+2*Pi* n*csgn(I*e)*csgn(I*x)*csgn(I*e*x)-Pi*csgn(I*e*x)^3+2*c))-I/e/n/d*b*(-exp(2 *I*c))^(1/2)*ln(1-exp(I*x^n*d)*(-exp(2*I*c))^(1/2))*(-1)^(-1/2*csgn(I*e)*c sgn(I*e*x)^2)*(-1)^(-1/2*csgn(I*x)*csgn(I*e*x)^2)*(-1)^(1/2*csgn(I*e)*csgn (I*x)*csgn(I*e*x))*(e^n)^2*x^n*exp(-1/2*I*(2*Pi*n*csgn(I*e*x)^3-2*Pi*n*csg n(I*e)*csgn(I*e*x)^2-2*Pi*n*csgn(I*x)*csgn(I*e*x)^2+2*Pi*n*csgn(I*e)*csgn( I*x)*csgn(I*e*x)-Pi*csgn(I*e*x)^3+2*c))+1/e/n/d^2*b*(-exp(2*I*c))^(1/2)*(- 1)^(-1/2*csgn(I*e)*csgn(I*e*x)^2)*(-1)^(-1/2*csgn(I*x)*csgn(I*e*x)^2)*(-1) ^(1/2*csgn(I*e)*csgn(I*x)*csgn(I*e*x))*dilog(1+exp(I*x^n*d)*(-exp(2*I*c))^ (1/2))*(e^n)^2*exp(-1/2*I*(2*Pi*n*csgn(I*e*x)^3-2*Pi*n*csgn(I*e)*csgn(I*e* x)^2-2*Pi*n*csgn(I*x)*csgn(I*e*x)^2+2*Pi*n*csgn(I*e)*csgn(I*x)*csgn(I*e*x) -Pi*csgn(I*e*x)^3+2*c))-1/e/n/d^2*b*(-exp(2*I*c))^(1/2)*(-1)^(-1/2*csgn(I* e)*csgn(I*e*x)^2)*(-1)^(-1/2*csgn(I*x)*csgn(I*e*x)^2)*(-1)^(1/2*csgn(I*e)* csgn(I*x)*csgn(I*e*x))*dilog(1-exp(I*x^n*d)*(-exp(2*I*c))^(1/2))*(e^n)^2*e xp(-1/2*I*(2*Pi*n*csgn(I*e*x)^3-2*Pi*n*csgn(I*e)*csgn(I*e*x)^2-2*Pi*n*csgn (I*x)*csgn(I*e*x)^2+2*Pi*n*csgn(I*e)*csgn(I*x)*csgn(I*e*x)-Pi*csgn(I*e*x)^ 3+2*c))+1/2*a/n*x*exp(1/2*(-1+2*n)*(-I*csgn(I*e)*csgn(I*x)*csgn(I*e*x)*...
Both result and optimal contain complex but leaf count of result is larger than twice the leaf count of optimal. 470 vs. \(2 (133) = 266\).
Time = 0.11 (sec) , antiderivative size = 470, normalized size of antiderivative = 3.15 \[ \int (e x)^{-1+2 n} \left (a+b \sec \left (c+d x^n\right )\right ) \, dx=\frac {a d^{2} e^{2 \, n - 1} x^{2 \, n} - b c e^{2 \, n - 1} \log \left (\cos \left (d x^{n} + c\right ) + i \, \sin \left (d x^{n} + c\right ) + i\right ) + b c e^{2 \, n - 1} \log \left (\cos \left (d x^{n} + c\right ) - i \, \sin \left (d x^{n} + c\right ) + i\right ) - b c e^{2 \, n - 1} \log \left (-\cos \left (d x^{n} + c\right ) + i \, \sin \left (d x^{n} + c\right ) + i\right ) + b c e^{2 \, n - 1} \log \left (-\cos \left (d x^{n} + c\right ) - i \, \sin \left (d x^{n} + c\right ) + i\right ) - i \, b e^{2 \, n - 1} {\rm Li}_2\left (i \, \cos \left (d x^{n} + c\right ) + \sin \left (d x^{n} + c\right )\right ) - i \, b e^{2 \, n - 1} {\rm Li}_2\left (i \, \cos \left (d x^{n} + c\right ) - \sin \left (d x^{n} + c\right )\right ) + i \, b e^{2 \, n - 1} {\rm Li}_2\left (-i \, \cos \left (d x^{n} + c\right ) + \sin \left (d x^{n} + c\right )\right ) + i \, b e^{2 \, n - 1} {\rm Li}_2\left (-i \, \cos \left (d x^{n} + c\right ) - \sin \left (d x^{n} + c\right )\right ) + {\left (b d e^{2 \, n - 1} x^{n} + b c e^{2 \, n - 1}\right )} \log \left (i \, \cos \left (d x^{n} + c\right ) + \sin \left (d x^{n} + c\right ) + 1\right ) - {\left (b d e^{2 \, n - 1} x^{n} + b c e^{2 \, n - 1}\right )} \log \left (i \, \cos \left (d x^{n} + c\right ) - \sin \left (d x^{n} + c\right ) + 1\right ) + {\left (b d e^{2 \, n - 1} x^{n} + b c e^{2 \, n - 1}\right )} \log \left (-i \, \cos \left (d x^{n} + c\right ) + \sin \left (d x^{n} + c\right ) + 1\right ) - {\left (b d e^{2 \, n - 1} x^{n} + b c e^{2 \, n - 1}\right )} \log \left (-i \, \cos \left (d x^{n} + c\right ) - \sin \left (d x^{n} + c\right ) + 1\right )}{2 \, d^{2} n} \] Input:
integrate((e*x)^(-1+2*n)*(a+b*sec(c+d*x^n)),x, algorithm="fricas")
Output:
1/2*(a*d^2*e^(2*n - 1)*x^(2*n) - b*c*e^(2*n - 1)*log(cos(d*x^n + c) + I*si n(d*x^n + c) + I) + b*c*e^(2*n - 1)*log(cos(d*x^n + c) - I*sin(d*x^n + c) + I) - b*c*e^(2*n - 1)*log(-cos(d*x^n + c) + I*sin(d*x^n + c) + I) + b*c*e ^(2*n - 1)*log(-cos(d*x^n + c) - I*sin(d*x^n + c) + I) - I*b*e^(2*n - 1)*d ilog(I*cos(d*x^n + c) + sin(d*x^n + c)) - I*b*e^(2*n - 1)*dilog(I*cos(d*x^ n + c) - sin(d*x^n + c)) + I*b*e^(2*n - 1)*dilog(-I*cos(d*x^n + c) + sin(d *x^n + c)) + I*b*e^(2*n - 1)*dilog(-I*cos(d*x^n + c) - sin(d*x^n + c)) + ( b*d*e^(2*n - 1)*x^n + b*c*e^(2*n - 1))*log(I*cos(d*x^n + c) + sin(d*x^n + c) + 1) - (b*d*e^(2*n - 1)*x^n + b*c*e^(2*n - 1))*log(I*cos(d*x^n + c) - s in(d*x^n + c) + 1) + (b*d*e^(2*n - 1)*x^n + b*c*e^(2*n - 1))*log(-I*cos(d* x^n + c) + sin(d*x^n + c) + 1) - (b*d*e^(2*n - 1)*x^n + b*c*e^(2*n - 1))*l og(-I*cos(d*x^n + c) - sin(d*x^n + c) + 1))/(d^2*n)
\[ \int (e x)^{-1+2 n} \left (a+b \sec \left (c+d x^n\right )\right ) \, dx=\int \left (e x\right )^{2 n - 1} \left (a + b \sec {\left (c + d x^{n} \right )}\right )\, dx \] Input:
integrate((e*x)**(-1+2*n)*(a+b*sec(c+d*x**n)),x)
Output:
Integral((e*x)**(2*n - 1)*(a + b*sec(c + d*x**n)), x)
\[ \int (e x)^{-1+2 n} \left (a+b \sec \left (c+d x^n\right )\right ) \, dx=\int { {\left (b \sec \left (d x^{n} + c\right ) + a\right )} \left (e x\right )^{2 \, n - 1} \,d x } \] Input:
integrate((e*x)^(-1+2*n)*(a+b*sec(c+d*x^n)),x, algorithm="maxima")
Output:
2*b*e^(2*n)*integrate((x^(2*n)*cos(2*d*x^n + 2*c)*cos(d*x^n + c) + x^(2*n) *sin(2*d*x^n + 2*c)*sin(d*x^n + c) + x^(2*n)*cos(d*x^n + c))/(e*x*cos(2*d* x^n + 2*c)^2 + e*x*sin(2*d*x^n + 2*c)^2 + 2*e*x*cos(2*d*x^n + 2*c) + e*x), x) + 1/2*(e*x)^(2*n)*a/(e*n)
\[ \int (e x)^{-1+2 n} \left (a+b \sec \left (c+d x^n\right )\right ) \, dx=\int { {\left (b \sec \left (d x^{n} + c\right ) + a\right )} \left (e x\right )^{2 \, n - 1} \,d x } \] Input:
integrate((e*x)^(-1+2*n)*(a+b*sec(c+d*x^n)),x, algorithm="giac")
Output:
integrate((b*sec(d*x^n + c) + a)*(e*x)^(2*n - 1), x)
Timed out. \[ \int (e x)^{-1+2 n} \left (a+b \sec \left (c+d x^n\right )\right ) \, dx=\int \left (a+\frac {b}{\cos \left (c+d\,x^n\right )}\right )\,{\left (e\,x\right )}^{2\,n-1} \,d x \] Input:
int((a + b/cos(c + d*x^n))*(e*x)^(2*n - 1),x)
Output:
int((a + b/cos(c + d*x^n))*(e*x)^(2*n - 1), x)
\[ \int (e x)^{-1+2 n} \left (a+b \sec \left (c+d x^n\right )\right ) \, dx=\frac {e^{2 n} \left (x^{2 n} a +x^{2 n} b -4 \left (\int \frac {x^{2 n} \tan \left (\frac {x^{n} d}{2}+\frac {c}{2}\right )^{2}}{\tan \left (\frac {x^{n} d}{2}+\frac {c}{2}\right )^{2} x -x}d x \right ) b n \right )}{2 e n} \] Input:
int((e*x)^(-1+2*n)*(a+b*sec(c+d*x^n)),x)
Output:
(e**(2*n)*(x**(2*n)*a + x**(2*n)*b - 4*int((x**(2*n)*tan((x**n*d + c)/2)** 2)/(tan((x**n*d + c)/2)**2*x - x),x)*b*n))/(2*e*n)