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

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 = 18, antiderivative size = 242 \[ \int x^5 \left (a+b \sec \left (c+d x^2\right )\right )^2 \, dx=-\frac {i b^2 x^4}{2 d}+\frac {a^2 x^6}{6}-\frac {2 i a b x^4 \arctan \left (e^{i \left (c+d x^2\right )}\right )}{d}+\frac {b^2 x^2 \log \left (1+e^{2 i \left (c+d x^2\right )}\right )}{d^2}+\frac {2 i a b x^2 \operatorname {PolyLog}\left (2,-i e^{i \left (c+d x^2\right )}\right )}{d^2}-\frac {2 i a b x^2 \operatorname {PolyLog}\left (2,i e^{i \left (c+d x^2\right )}\right )}{d^2}-\frac {i b^2 \operatorname {PolyLog}\left (2,-e^{2 i \left (c+d x^2\right )}\right )}{2 d^3}-\frac {2 a b \operatorname {PolyLog}\left (3,-i e^{i \left (c+d x^2\right )}\right )}{d^3}+\frac {2 a b \operatorname {PolyLog}\left (3,i e^{i \left (c+d x^2\right )}\right )}{d^3}+\frac {b^2 x^4 \tan \left (c+d x^2\right )}{2 d} \] Output:

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

Mathematica [A] (verified)

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

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

Output:

((-3*I)*b^2*d^2*x^4 + a^2*d^3*x^6 - (12*I)*a*b*d^2*x^4*ArcTan[E^(I*(c + d* 
x^2))] + 6*b^2*d*x^2*Log[1 + E^((2*I)*(c + d*x^2))] + (12*I)*a*b*d*x^2*Pol 
yLog[2, (-I)*E^(I*(c + d*x^2))] - (12*I)*a*b*d*x^2*PolyLog[2, I*E^(I*(c + 
d*x^2))] - (3*I)*b^2*PolyLog[2, -E^((2*I)*(c + d*x^2))] - 12*a*b*PolyLog[3 
, (-I)*E^(I*(c + d*x^2))] + 12*a*b*PolyLog[3, I*E^(I*(c + d*x^2))] + 3*b^2 
*d^2*x^4*Tan[c + d*x^2])/(6*d^3)
 

Rubi [A] (verified)

Time = 0.61 (sec) , antiderivative size = 240, normalized size of antiderivative = 0.99, number of steps used = 5, number of rules used = 4, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.222, Rules used = {4692, 3042, 4678, 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 )^2 \, dx\)

\(\Big \downarrow \) 4692

\(\displaystyle \frac {1}{2} \int x^4 \left (a+b \sec \left (d x^2+c\right )\right )^2dx^2\)

\(\Big \downarrow \) 3042

\(\displaystyle \frac {1}{2} \int x^4 \left (a+b \csc \left (d x^2+c+\frac {\pi }{2}\right )\right )^2dx^2\)

\(\Big \downarrow \) 4678

\(\displaystyle \frac {1}{2} \int \left (a^2 x^4+b^2 \sec ^2\left (d x^2+c\right ) x^4+2 a b \sec \left (d x^2+c\right ) x^4\right )dx^2\)

\(\Big \downarrow \) 2009

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

Input:

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

Output:

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

Defintions of rubi rules used

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

rule 3042
Int[u_, x_Symbol] :> Int[DeactivateTrig[u, x], x] /; FunctionOfTrigOfLinear 
Q[u, x]
 

rule 4678
Int[(csc[(e_.) + (f_.)*(x_)]*(b_.) + (a_))^(n_.)*((c_.) + (d_.)*(x_))^(m_.) 
, x_Symbol] :> Int[ExpandIntegrand[(c + d*x)^m, (a + b*Csc[e + f*x])^n, x], 
 x] /; FreeQ[{a, b, c, d, e, f, m}, x] && IGtQ[m, 0] && IGtQ[n, 0]
 

rule 4692
Int[(x_)^(m_.)*((a_.) + (b_.)*Sec[(c_.) + (d_.)*(x_)^(n_)])^(p_.), x_Symbol 
] :> Simp[1/n   Subst[Int[x^(Simplify[(m + 1)/n] - 1)*(a + b*Sec[c + d*x])^ 
p, x], x, x^n], x] /; FreeQ[{a, b, c, d, m, n, p}, x] && IGtQ[Simplify[(m + 
 1)/n], 0] && IntegerQ[p]
 
Maple [F]

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

Input:

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

Output:

int(x^5*(a+b*sec(d*x^2+c))^2,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. 799 vs. \(2 (199) = 398\).

Time = 0.12 (sec) , antiderivative size = 799, normalized size of antiderivative = 3.30 \[ \int x^5 \left (a+b \sec \left (c+d x^2\right )\right )^2 \, dx =\text {Too large to display} \] Input:

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

Output:

1/6*(a^2*d^3*x^6*cos(d*x^2 + c) + 3*b^2*d^2*x^4*sin(d*x^2 + c) - 6*a*b*cos 
(d*x^2 + c)*polylog(3, I*cos(d*x^2 + c) + sin(d*x^2 + c)) + 6*a*b*cos(d*x^ 
2 + c)*polylog(3, I*cos(d*x^2 + c) - sin(d*x^2 + c)) - 6*a*b*cos(d*x^2 + c 
)*polylog(3, -I*cos(d*x^2 + c) + sin(d*x^2 + c)) + 6*a*b*cos(d*x^2 + c)*po 
lylog(3, -I*cos(d*x^2 + c) - sin(d*x^2 + c)) - 3*(2*I*a*b*d*x^2 - I*b^2)*c 
os(d*x^2 + c)*dilog(I*cos(d*x^2 + c) + sin(d*x^2 + c)) - 3*(2*I*a*b*d*x^2 
+ I*b^2)*cos(d*x^2 + c)*dilog(I*cos(d*x^2 + c) - sin(d*x^2 + c)) - 3*(-2*I 
*a*b*d*x^2 + I*b^2)*cos(d*x^2 + c)*dilog(-I*cos(d*x^2 + c) + sin(d*x^2 + c 
)) - 3*(-2*I*a*b*d*x^2 - I*b^2)*cos(d*x^2 + c)*dilog(-I*cos(d*x^2 + c) - s 
in(d*x^2 + c)) + 3*(a*b*c^2 - b^2*c)*cos(d*x^2 + c)*log(cos(d*x^2 + c) + I 
*sin(d*x^2 + c) + I) - 3*(a*b*c^2 + b^2*c)*cos(d*x^2 + c)*log(cos(d*x^2 + 
c) - I*sin(d*x^2 + c) + I) + 3*(a*b*d^2*x^4 + b^2*d*x^2 - a*b*c^2 + b^2*c) 
*cos(d*x^2 + c)*log(I*cos(d*x^2 + c) + sin(d*x^2 + c) + 1) - 3*(a*b*d^2*x^ 
4 - b^2*d*x^2 - a*b*c^2 - b^2*c)*cos(d*x^2 + c)*log(I*cos(d*x^2 + c) - sin 
(d*x^2 + c) + 1) + 3*(a*b*d^2*x^4 + b^2*d*x^2 - a*b*c^2 + b^2*c)*cos(d*x^2 
 + c)*log(-I*cos(d*x^2 + c) + sin(d*x^2 + c) + 1) - 3*(a*b*d^2*x^4 - b^2*d 
*x^2 - a*b*c^2 - b^2*c)*cos(d*x^2 + c)*log(-I*cos(d*x^2 + c) - sin(d*x^2 + 
 c) + 1) + 3*(a*b*c^2 - b^2*c)*cos(d*x^2 + c)*log(-cos(d*x^2 + c) + I*sin( 
d*x^2 + c) + I) - 3*(a*b*c^2 + b^2*c)*cos(d*x^2 + c)*log(-cos(d*x^2 + c) - 
 I*sin(d*x^2 + c) + I))/(d^3*cos(d*x^2 + c))
 

Sympy [F]

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

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

Output:

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

Maxima [F]

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

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

Output:

1/6*a^2*x^6 + (b^2*x^4*sin(2*d*x^2 + 2*c) + (d*cos(2*d*x^2 + 2*c)^2 + d*si 
n(2*d*x^2 + 2*c)^2 + 2*d*cos(2*d*x^2 + 2*c) + d)*integrate(4*(a*b*d*x^5*co 
s(2*d*x^2 + 2*c)*cos(d*x^2 + c) + a*b*d*x^5*cos(d*x^2 + c) + (a*b*d*x^5*si 
n(d*x^2 + c) - b^2*x^3)*sin(2*d*x^2 + 2*c))/(d*cos(2*d*x^2 + 2*c)^2 + d*si 
n(2*d*x^2 + 2*c)^2 + 2*d*cos(2*d*x^2 + 2*c) + d), x))/(d*cos(2*d*x^2 + 2*c 
)^2 + d*sin(2*d*x^2 + 2*c)^2 + 2*d*cos(2*d*x^2 + 2*c) + d)
 

Giac [F]

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

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

Output:

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

Mupad [F(-1)]

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

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

Output:

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

Reduce [F]

\[ \int x^5 \left (a+b \sec \left (c+d x^2\right )\right )^2 \, dx=\frac {-24 \cos \left (d \,x^{2}+c \right ) \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 ) a b \,d^{3}-48 \cos \left (d \,x^{2}+c \right ) \left (\int \frac {\tan \left (\frac {d \,x^{2}}{2}+\frac {c}{2}\right ) x^{3}}{\tan \left (\frac {d \,x^{2}}{2}+\frac {c}{2}\right )^{4}-2 \tan \left (\frac {d \,x^{2}}{2}+\frac {c}{2}\right )^{2}+1}d x \right ) b^{2} d^{2}+6 \cos \left (d \,x^{2}+c \right ) \mathrm {log}\left (\tan \left (\frac {d \,x^{2}}{2}+\frac {c}{2}\right )-1\right ) b^{2}-6 \cos \left (d \,x^{2}+c \right ) \mathrm {log}\left (\tan \left (\frac {d \,x^{2}}{2}+\frac {c}{2}\right )+1\right ) b^{2}+\cos \left (d \,x^{2}+c \right ) a^{2} d^{3} x^{6}+2 \cos \left (d \,x^{2}+c \right ) a b \,d^{3} x^{6}+3 \sin \left (d \,x^{2}+c \right ) b^{2} d^{2} x^{4}+6 b^{2} d \,x^{2}}{6 \cos \left (d \,x^{2}+c \right ) d^{3}} \] Input:

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

Output:

( - 24*cos(c + d*x**2)*int((tan((c + d*x**2)/2)**2*x**5)/(tan((c + d*x**2) 
/2)**2 - 1),x)*a*b*d**3 - 48*cos(c + d*x**2)*int((tan((c + d*x**2)/2)*x**3 
)/(tan((c + d*x**2)/2)**4 - 2*tan((c + d*x**2)/2)**2 + 1),x)*b**2*d**2 + 6 
*cos(c + d*x**2)*log(tan((c + d*x**2)/2) - 1)*b**2 - 6*cos(c + d*x**2)*log 
(tan((c + d*x**2)/2) + 1)*b**2 + cos(c + d*x**2)*a**2*d**3*x**6 + 2*cos(c 
+ d*x**2)*a*b*d**3*x**6 + 3*sin(c + d*x**2)*b**2*d**2*x**4 + 6*b**2*d*x**2 
)/(6*cos(c + d*x**2)*d**3)