\(\int x^5 (a+b \sec (c+d x^2)) \, dx\) [1]

Optimal result
Mathematica [A] (verified)
Rubi [A] (verified)
Maple [F]
Fricas [B] (verification not implemented)
Sympy [F]
Maxima [F]
Giac [F]
Mupad [F(-1)]
Reduce [F]

Optimal result

Integrand size = 16, antiderivative size = 143 \[ \int x^5 \left (a+b \sec \left (c+d x^2\right )\right ) \, dx=\frac {a x^6}{6}-\frac {i b x^4 \arctan \left (e^{i \left (c+d x^2\right )}\right )}{d}+\frac {i b x^2 \operatorname {PolyLog}\left (2,-i e^{i \left (c+d x^2\right )}\right )}{d^2}-\frac {i b x^2 \operatorname {PolyLog}\left (2,i e^{i \left (c+d x^2\right )}\right )}{d^2}-\frac {b \operatorname {PolyLog}\left (3,-i e^{i \left (c+d x^2\right )}\right )}{d^3}+\frac {b \operatorname {PolyLog}\left (3,i e^{i \left (c+d x^2\right )}\right )}{d^3} \] Output:

1/6*a*x^6-I*b*x^4*arctan(exp(I*(d*x^2+c)))/d+I*b*x^2*polylog(2,-I*exp(I*(d 
*x^2+c)))/d^2-I*b*x^2*polylog(2,I*exp(I*(d*x^2+c)))/d^2-b*polylog(3,-I*exp 
(I*(d*x^2+c)))/d^3+b*polylog(3,I*exp(I*(d*x^2+c)))/d^3
 

Mathematica [A] (verified)

Time = 0.04 (sec) , antiderivative size = 146, normalized size of antiderivative = 1.02 \[ \int x^5 \left (a+b \sec \left (c+d x^2\right )\right ) \, dx=\frac {a x^6}{6}-\frac {i b x^4 \arctan \left (e^{i c+i d x^2}\right )}{d}+\frac {i b x^2 \operatorname {PolyLog}\left (2,-i e^{i \left (c+d x^2\right )}\right )}{d^2}-\frac {i b x^2 \operatorname {PolyLog}\left (2,i e^{i \left (c+d x^2\right )}\right )}{d^2}-\frac {b \operatorname {PolyLog}\left (3,-i e^{i \left (c+d x^2\right )}\right )}{d^3}+\frac {b \operatorname {PolyLog}\left (3,i e^{i \left (c+d x^2\right )}\right )}{d^3} \] Input:

Integrate[x^5*(a + b*Sec[c + d*x^2]),x]
 

Output:

(a*x^6)/6 - (I*b*x^4*ArcTan[E^(I*c + I*d*x^2)])/d + (I*b*x^2*PolyLog[2, (- 
I)*E^(I*(c + d*x^2))])/d^2 - (I*b*x^2*PolyLog[2, I*E^(I*(c + d*x^2))])/d^2 
 - (b*PolyLog[3, (-I)*E^(I*(c + d*x^2))])/d^3 + (b*PolyLog[3, I*E^(I*(c + 
d*x^2))])/d^3
 

Rubi [A] (verified)

Time = 0.34 (sec) , antiderivative size = 143, 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.125, 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 x^5 \left (a+b \sec \left (c+d x^2\right )\right ) \, dx\)

\(\Big \downarrow \) 2010

\(\displaystyle \int \left (a x^5+b x^5 \sec \left (c+d x^2\right )\right )dx\)

\(\Big \downarrow \) 2009

\(\displaystyle \frac {a x^6}{6}-\frac {i b x^4 \arctan \left (e^{i \left (c+d x^2\right )}\right )}{d}-\frac {b \operatorname {PolyLog}\left (3,-i e^{i \left (d x^2+c\right )}\right )}{d^3}+\frac {b \operatorname {PolyLog}\left (3,i e^{i \left (d x^2+c\right )}\right )}{d^3}+\frac {i b x^2 \operatorname {PolyLog}\left (2,-i e^{i \left (d x^2+c\right )}\right )}{d^2}-\frac {i b x^2 \operatorname {PolyLog}\left (2,i e^{i \left (d x^2+c\right )}\right )}{d^2}\)

Input:

Int[x^5*(a + b*Sec[c + d*x^2]),x]
 

Output:

(a*x^6)/6 - (I*b*x^4*ArcTan[E^(I*(c + d*x^2))])/d + (I*b*x^2*PolyLog[2, (- 
I)*E^(I*(c + d*x^2))])/d^2 - (I*b*x^2*PolyLog[2, I*E^(I*(c + d*x^2))])/d^2 
 - (b*PolyLog[3, (-I)*E^(I*(c + d*x^2))])/d^3 + (b*PolyLog[3, I*E^(I*(c + 
d*x^2))])/d^3
 

Defintions of rubi rules used

rule 2009
Int[u_, x_Symbol] :> Simp[IntSum[u, x], x] /; SumQ[u]
 

rule 2010
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]]
 
Maple [F]

\[\int x^{5} \left (a +b \sec \left (d \,x^{2}+c \right )\right )d x\]

Input:

int(x^5*(a+b*sec(d*x^2+c)),x)
 

Output:

int(x^5*(a+b*sec(d*x^2+c)),x)
 

Fricas [B] (verification not implemented)

Both result and optimal contain complex but leaf count of result is larger than twice the leaf count of optimal. 495 vs. \(2 (115) = 230\).

Time = 0.11 (sec) , antiderivative size = 495, normalized size of antiderivative = 3.46 \[ \int x^5 \left (a+b \sec \left (c+d x^2\right )\right ) \, dx=\frac {2 \, a d^{3} x^{6} - 6 i \, b d x^{2} {\rm Li}_2\left (i \, \cos \left (d x^{2} + c\right ) + \sin \left (d x^{2} + c\right )\right ) - 6 i \, b d x^{2} {\rm Li}_2\left (i \, \cos \left (d x^{2} + c\right ) - \sin \left (d x^{2} + c\right )\right ) + 6 i \, b d x^{2} {\rm Li}_2\left (-i \, \cos \left (d x^{2} + c\right ) + \sin \left (d x^{2} + c\right )\right ) + 6 i \, b d x^{2} {\rm Li}_2\left (-i \, \cos \left (d x^{2} + c\right ) - \sin \left (d x^{2} + c\right )\right ) + 3 \, b c^{2} \log \left (\cos \left (d x^{2} + c\right ) + i \, \sin \left (d x^{2} + c\right ) + i\right ) - 3 \, b c^{2} \log \left (\cos \left (d x^{2} + c\right ) - i \, \sin \left (d x^{2} + c\right ) + i\right ) + 3 \, b c^{2} \log \left (-\cos \left (d x^{2} + c\right ) + i \, \sin \left (d x^{2} + c\right ) + i\right ) - 3 \, b c^{2} \log \left (-\cos \left (d x^{2} + c\right ) - i \, \sin \left (d x^{2} + c\right ) + i\right ) + 3 \, {\left (b d^{2} x^{4} - b c^{2}\right )} \log \left (i \, \cos \left (d x^{2} + c\right ) + \sin \left (d x^{2} + c\right ) + 1\right ) - 3 \, {\left (b d^{2} x^{4} - b c^{2}\right )} \log \left (i \, \cos \left (d x^{2} + c\right ) - \sin \left (d x^{2} + c\right ) + 1\right ) + 3 \, {\left (b d^{2} x^{4} - b c^{2}\right )} \log \left (-i \, \cos \left (d x^{2} + c\right ) + \sin \left (d x^{2} + c\right ) + 1\right ) - 3 \, {\left (b d^{2} x^{4} - b c^{2}\right )} \log \left (-i \, \cos \left (d x^{2} + c\right ) - \sin \left (d x^{2} + c\right ) + 1\right ) - 6 \, b {\rm polylog}\left (3, i \, \cos \left (d x^{2} + c\right ) + \sin \left (d x^{2} + c\right )\right ) + 6 \, b {\rm polylog}\left (3, i \, \cos \left (d x^{2} + c\right ) - \sin \left (d x^{2} + c\right )\right ) - 6 \, b {\rm polylog}\left (3, -i \, \cos \left (d x^{2} + c\right ) + \sin \left (d x^{2} + c\right )\right ) + 6 \, b {\rm polylog}\left (3, -i \, \cos \left (d x^{2} + c\right ) - \sin \left (d x^{2} + c\right )\right )}{12 \, d^{3}} \] Input:

integrate(x^5*(a+b*sec(d*x^2+c)),x, algorithm="fricas")
 

Output:

1/12*(2*a*d^3*x^6 - 6*I*b*d*x^2*dilog(I*cos(d*x^2 + c) + sin(d*x^2 + c)) - 
 6*I*b*d*x^2*dilog(I*cos(d*x^2 + c) - sin(d*x^2 + c)) + 6*I*b*d*x^2*dilog( 
-I*cos(d*x^2 + c) + sin(d*x^2 + c)) + 6*I*b*d*x^2*dilog(-I*cos(d*x^2 + c) 
- sin(d*x^2 + c)) + 3*b*c^2*log(cos(d*x^2 + c) + I*sin(d*x^2 + c) + I) - 3 
*b*c^2*log(cos(d*x^2 + c) - I*sin(d*x^2 + c) + I) + 3*b*c^2*log(-cos(d*x^2 
 + c) + I*sin(d*x^2 + c) + I) - 3*b*c^2*log(-cos(d*x^2 + c) - I*sin(d*x^2 
+ c) + I) + 3*(b*d^2*x^4 - b*c^2)*log(I*cos(d*x^2 + c) + sin(d*x^2 + c) + 
1) - 3*(b*d^2*x^4 - b*c^2)*log(I*cos(d*x^2 + c) - sin(d*x^2 + c) + 1) + 3* 
(b*d^2*x^4 - b*c^2)*log(-I*cos(d*x^2 + c) + sin(d*x^2 + c) + 1) - 3*(b*d^2 
*x^4 - b*c^2)*log(-I*cos(d*x^2 + c) - sin(d*x^2 + c) + 1) - 6*b*polylog(3, 
 I*cos(d*x^2 + c) + sin(d*x^2 + c)) + 6*b*polylog(3, I*cos(d*x^2 + c) - si 
n(d*x^2 + c)) - 6*b*polylog(3, -I*cos(d*x^2 + c) + sin(d*x^2 + c)) + 6*b*p 
olylog(3, -I*cos(d*x^2 + c) - sin(d*x^2 + c)))/d^3
 

Sympy [F]

\[ \int x^5 \left (a+b \sec \left (c+d x^2\right )\right ) \, dx=\int x^{5} \left (a + b \sec {\left (c + d x^{2} \right )}\right )\, dx \] Input:

integrate(x**5*(a+b*sec(d*x**2+c)),x)
 

Output:

Integral(x**5*(a + b*sec(c + d*x**2)), x)
 

Maxima [F]

\[ \int x^5 \left (a+b \sec \left (c+d x^2\right )\right ) \, dx=\int { {\left (b \sec \left (d x^{2} + c\right ) + a\right )} x^{5} \,d x } \] Input:

integrate(x^5*(a+b*sec(d*x^2+c)),x, algorithm="maxima")
 

Output:

1/6*a*x^6 + 2*b*integrate((x^5*cos(2*d*x^2 + 2*c)*cos(d*x^2 + c) + x^5*sin 
(2*d*x^2 + 2*c)*sin(d*x^2 + c) + x^5*cos(d*x^2 + c))/(cos(2*d*x^2 + 2*c)^2 
 + sin(2*d*x^2 + 2*c)^2 + 2*cos(2*d*x^2 + 2*c) + 1), x)
 

Giac [F]

\[ \int x^5 \left (a+b \sec \left (c+d x^2\right )\right ) \, dx=\int { {\left (b \sec \left (d x^{2} + c\right ) + a\right )} x^{5} \,d x } \] Input:

integrate(x^5*(a+b*sec(d*x^2+c)),x, algorithm="giac")
 

Output:

integrate((b*sec(d*x^2 + c) + a)*x^5, x)
 

Mupad [F(-1)]

Timed out. \[ \int x^5 \left (a+b \sec \left (c+d x^2\right )\right ) \, dx=\int x^5\,\left (a+\frac {b}{\cos \left (d\,x^2+c\right )}\right ) \,d x \] Input:

int(x^5*(a + b/cos(c + d*x^2)),x)
 

Output:

int(x^5*(a + b/cos(c + d*x^2)), x)
 

Reduce [F]

\[ \int x^5 \left (a+b \sec \left (c+d x^2\right )\right ) \, dx=-2 \left (\int \frac {\tan \left (\frac {d \,x^{2}}{2}+\frac {c}{2}\right )^{2} x^{5}}{\tan \left (\frac {d \,x^{2}}{2}+\frac {c}{2}\right )^{2}-1}d x \right ) b +\frac {a \,x^{6}}{6}+\frac {b \,x^{6}}{6} \] Input:

int(x^5*(a+b*sec(d*x^2+c)),x)
 

Output:

( - 12*int((tan((c + d*x**2)/2)**2*x**5)/(tan((c + d*x**2)/2)**2 - 1),x)*b 
 + a*x**6 + b*x**6)/6