\(\int x^3 (a+b \sec (c+d \sqrt {x})) \, dx\) [31]

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

Optimal result

Integrand size = 18, antiderivative size = 476 \[ \int x^3 \left (a+b \sec \left (c+d \sqrt {x}\right )\right ) \, dx=\frac {a x^4}{4}-\frac {4 i b x^{7/2} \arctan \left (e^{i \left (c+d \sqrt {x}\right )}\right )}{d}+\frac {14 i b x^3 \operatorname {PolyLog}\left (2,-i e^{i \left (c+d \sqrt {x}\right )}\right )}{d^2}-\frac {14 i b x^3 \operatorname {PolyLog}\left (2,i e^{i \left (c+d \sqrt {x}\right )}\right )}{d^2}-\frac {84 b x^{5/2} \operatorname {PolyLog}\left (3,-i e^{i \left (c+d \sqrt {x}\right )}\right )}{d^3}+\frac {84 b x^{5/2} \operatorname {PolyLog}\left (3,i e^{i \left (c+d \sqrt {x}\right )}\right )}{d^3}-\frac {420 i b x^2 \operatorname {PolyLog}\left (4,-i e^{i \left (c+d \sqrt {x}\right )}\right )}{d^4}+\frac {420 i b x^2 \operatorname {PolyLog}\left (4,i e^{i \left (c+d \sqrt {x}\right )}\right )}{d^4}+\frac {1680 b x^{3/2} \operatorname {PolyLog}\left (5,-i e^{i \left (c+d \sqrt {x}\right )}\right )}{d^5}-\frac {1680 b x^{3/2} \operatorname {PolyLog}\left (5,i e^{i \left (c+d \sqrt {x}\right )}\right )}{d^5}+\frac {5040 i b x \operatorname {PolyLog}\left (6,-i e^{i \left (c+d \sqrt {x}\right )}\right )}{d^6}-\frac {5040 i b x \operatorname {PolyLog}\left (6,i e^{i \left (c+d \sqrt {x}\right )}\right )}{d^6}-\frac {10080 b \sqrt {x} \operatorname {PolyLog}\left (7,-i e^{i \left (c+d \sqrt {x}\right )}\right )}{d^7}+\frac {10080 b \sqrt {x} \operatorname {PolyLog}\left (7,i e^{i \left (c+d \sqrt {x}\right )}\right )}{d^7}-\frac {10080 i b \operatorname {PolyLog}\left (8,-i e^{i \left (c+d \sqrt {x}\right )}\right )}{d^8}+\frac {10080 i b \operatorname {PolyLog}\left (8,i e^{i \left (c+d \sqrt {x}\right )}\right )}{d^8} \] Output:

1/4*a*x^4-5040*I*b*x*polylog(6,I*exp(I*(c+d*x^(1/2))))/d^6+5040*I*b*x*poly 
log(6,-I*exp(I*(c+d*x^(1/2))))/d^6+10080*I*b*polylog(8,I*exp(I*(c+d*x^(1/2 
))))/d^8-84*b*x^(5/2)*polylog(3,-I*exp(I*(c+d*x^(1/2))))/d^3+84*b*x^(5/2)* 
polylog(3,I*exp(I*(c+d*x^(1/2))))/d^3+420*I*b*x^2*polylog(4,I*exp(I*(c+d*x 
^(1/2))))/d^4-4*I*b*x^(7/2)*arctan(exp(I*(c+d*x^(1/2))))/d+1680*b*x^(3/2)* 
polylog(5,-I*exp(I*(c+d*x^(1/2))))/d^5-1680*b*x^(3/2)*polylog(5,I*exp(I*(c 
+d*x^(1/2))))/d^5-420*I*b*x^2*polylog(4,-I*exp(I*(c+d*x^(1/2))))/d^4-14*I* 
b*x^3*polylog(2,I*exp(I*(c+d*x^(1/2))))/d^2-10080*b*x^(1/2)*polylog(7,-I*e 
xp(I*(c+d*x^(1/2))))/d^7+10080*b*x^(1/2)*polylog(7,I*exp(I*(c+d*x^(1/2)))) 
/d^7+14*I*b*x^3*polylog(2,-I*exp(I*(c+d*x^(1/2))))/d^2-10080*I*b*polylog(8 
,-I*exp(I*(c+d*x^(1/2))))/d^8
 

Mathematica [A] (verified)

Time = 0.11 (sec) , antiderivative size = 479, normalized size of antiderivative = 1.01 \[ \int x^3 \left (a+b \sec \left (c+d \sqrt {x}\right )\right ) \, dx=\frac {a x^4}{4}-\frac {4 i b x^{7/2} \arctan \left (e^{i c+i d \sqrt {x}}\right )}{d}+\frac {14 i b x^3 \operatorname {PolyLog}\left (2,-i e^{i \left (c+d \sqrt {x}\right )}\right )}{d^2}-\frac {14 i b x^3 \operatorname {PolyLog}\left (2,i e^{i \left (c+d \sqrt {x}\right )}\right )}{d^2}-\frac {84 b x^{5/2} \operatorname {PolyLog}\left (3,-i e^{i \left (c+d \sqrt {x}\right )}\right )}{d^3}+\frac {84 b x^{5/2} \operatorname {PolyLog}\left (3,i e^{i \left (c+d \sqrt {x}\right )}\right )}{d^3}-\frac {420 i b x^2 \operatorname {PolyLog}\left (4,-i e^{i \left (c+d \sqrt {x}\right )}\right )}{d^4}+\frac {420 i b x^2 \operatorname {PolyLog}\left (4,i e^{i \left (c+d \sqrt {x}\right )}\right )}{d^4}+\frac {1680 b x^{3/2} \operatorname {PolyLog}\left (5,-i e^{i \left (c+d \sqrt {x}\right )}\right )}{d^5}-\frac {1680 b x^{3/2} \operatorname {PolyLog}\left (5,i e^{i \left (c+d \sqrt {x}\right )}\right )}{d^5}+\frac {5040 i b x \operatorname {PolyLog}\left (6,-i e^{i \left (c+d \sqrt {x}\right )}\right )}{d^6}-\frac {5040 i b x \operatorname {PolyLog}\left (6,i e^{i \left (c+d \sqrt {x}\right )}\right )}{d^6}-\frac {10080 b \sqrt {x} \operatorname {PolyLog}\left (7,-i e^{i \left (c+d \sqrt {x}\right )}\right )}{d^7}+\frac {10080 b \sqrt {x} \operatorname {PolyLog}\left (7,i e^{i \left (c+d \sqrt {x}\right )}\right )}{d^7}-\frac {10080 i b \operatorname {PolyLog}\left (8,-i e^{i \left (c+d \sqrt {x}\right )}\right )}{d^8}+\frac {10080 i b \operatorname {PolyLog}\left (8,i e^{i \left (c+d \sqrt {x}\right )}\right )}{d^8} \] Input:

Integrate[x^3*(a + b*Sec[c + d*Sqrt[x]]),x]
 

Output:

(a*x^4)/4 - ((4*I)*b*x^(7/2)*ArcTan[E^(I*c + I*d*Sqrt[x])])/d + ((14*I)*b* 
x^3*PolyLog[2, (-I)*E^(I*(c + d*Sqrt[x]))])/d^2 - ((14*I)*b*x^3*PolyLog[2, 
 I*E^(I*(c + d*Sqrt[x]))])/d^2 - (84*b*x^(5/2)*PolyLog[3, (-I)*E^(I*(c + d 
*Sqrt[x]))])/d^3 + (84*b*x^(5/2)*PolyLog[3, I*E^(I*(c + d*Sqrt[x]))])/d^3 
- ((420*I)*b*x^2*PolyLog[4, (-I)*E^(I*(c + d*Sqrt[x]))])/d^4 + ((420*I)*b* 
x^2*PolyLog[4, I*E^(I*(c + d*Sqrt[x]))])/d^4 + (1680*b*x^(3/2)*PolyLog[5, 
(-I)*E^(I*(c + d*Sqrt[x]))])/d^5 - (1680*b*x^(3/2)*PolyLog[5, I*E^(I*(c + 
d*Sqrt[x]))])/d^5 + ((5040*I)*b*x*PolyLog[6, (-I)*E^(I*(c + d*Sqrt[x]))])/ 
d^6 - ((5040*I)*b*x*PolyLog[6, I*E^(I*(c + d*Sqrt[x]))])/d^6 - (10080*b*Sq 
rt[x]*PolyLog[7, (-I)*E^(I*(c + d*Sqrt[x]))])/d^7 + (10080*b*Sqrt[x]*PolyL 
og[7, I*E^(I*(c + d*Sqrt[x]))])/d^7 - ((10080*I)*b*PolyLog[8, (-I)*E^(I*(c 
 + d*Sqrt[x]))])/d^8 + ((10080*I)*b*PolyLog[8, I*E^(I*(c + d*Sqrt[x]))])/d 
^8
 

Rubi [A] (verified)

Time = 0.78 (sec) , antiderivative size = 476, 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.111, 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^3 \left (a+b \sec \left (c+d \sqrt {x}\right )\right ) \, dx\)

\(\Big \downarrow \) 2010

\(\displaystyle \int \left (a x^3+b x^3 \sec \left (c+d \sqrt {x}\right )\right )dx\)

\(\Big \downarrow \) 2009

\(\displaystyle \frac {a x^4}{4}-\frac {4 i b x^{7/2} \arctan \left (e^{i \left (c+d \sqrt {x}\right )}\right )}{d}-\frac {10080 i b \operatorname {PolyLog}\left (8,-i e^{i \left (c+d \sqrt {x}\right )}\right )}{d^8}+\frac {10080 i b \operatorname {PolyLog}\left (8,i e^{i \left (c+d \sqrt {x}\right )}\right )}{d^8}-\frac {10080 b \sqrt {x} \operatorname {PolyLog}\left (7,-i e^{i \left (c+d \sqrt {x}\right )}\right )}{d^7}+\frac {10080 b \sqrt {x} \operatorname {PolyLog}\left (7,i e^{i \left (c+d \sqrt {x}\right )}\right )}{d^7}+\frac {5040 i b x \operatorname {PolyLog}\left (6,-i e^{i \left (c+d \sqrt {x}\right )}\right )}{d^6}-\frac {5040 i b x \operatorname {PolyLog}\left (6,i e^{i \left (c+d \sqrt {x}\right )}\right )}{d^6}+\frac {1680 b x^{3/2} \operatorname {PolyLog}\left (5,-i e^{i \left (c+d \sqrt {x}\right )}\right )}{d^5}-\frac {1680 b x^{3/2} \operatorname {PolyLog}\left (5,i e^{i \left (c+d \sqrt {x}\right )}\right )}{d^5}-\frac {420 i b x^2 \operatorname {PolyLog}\left (4,-i e^{i \left (c+d \sqrt {x}\right )}\right )}{d^4}+\frac {420 i b x^2 \operatorname {PolyLog}\left (4,i e^{i \left (c+d \sqrt {x}\right )}\right )}{d^4}-\frac {84 b x^{5/2} \operatorname {PolyLog}\left (3,-i e^{i \left (c+d \sqrt {x}\right )}\right )}{d^3}+\frac {84 b x^{5/2} \operatorname {PolyLog}\left (3,i e^{i \left (c+d \sqrt {x}\right )}\right )}{d^3}+\frac {14 i b x^3 \operatorname {PolyLog}\left (2,-i e^{i \left (c+d \sqrt {x}\right )}\right )}{d^2}-\frac {14 i b x^3 \operatorname {PolyLog}\left (2,i e^{i \left (c+d \sqrt {x}\right )}\right )}{d^2}\)

Input:

Int[x^3*(a + b*Sec[c + d*Sqrt[x]]),x]
 

Output:

(a*x^4)/4 - ((4*I)*b*x^(7/2)*ArcTan[E^(I*(c + d*Sqrt[x]))])/d + ((14*I)*b* 
x^3*PolyLog[2, (-I)*E^(I*(c + d*Sqrt[x]))])/d^2 - ((14*I)*b*x^3*PolyLog[2, 
 I*E^(I*(c + d*Sqrt[x]))])/d^2 - (84*b*x^(5/2)*PolyLog[3, (-I)*E^(I*(c + d 
*Sqrt[x]))])/d^3 + (84*b*x^(5/2)*PolyLog[3, I*E^(I*(c + d*Sqrt[x]))])/d^3 
- ((420*I)*b*x^2*PolyLog[4, (-I)*E^(I*(c + d*Sqrt[x]))])/d^4 + ((420*I)*b* 
x^2*PolyLog[4, I*E^(I*(c + d*Sqrt[x]))])/d^4 + (1680*b*x^(3/2)*PolyLog[5, 
(-I)*E^(I*(c + d*Sqrt[x]))])/d^5 - (1680*b*x^(3/2)*PolyLog[5, I*E^(I*(c + 
d*Sqrt[x]))])/d^5 + ((5040*I)*b*x*PolyLog[6, (-I)*E^(I*(c + d*Sqrt[x]))])/ 
d^6 - ((5040*I)*b*x*PolyLog[6, I*E^(I*(c + d*Sqrt[x]))])/d^6 - (10080*b*Sq 
rt[x]*PolyLog[7, (-I)*E^(I*(c + d*Sqrt[x]))])/d^7 + (10080*b*Sqrt[x]*PolyL 
og[7, I*E^(I*(c + d*Sqrt[x]))])/d^7 - ((10080*I)*b*PolyLog[8, (-I)*E^(I*(c 
 + d*Sqrt[x]))])/d^8 + ((10080*I)*b*PolyLog[8, I*E^(I*(c + d*Sqrt[x]))])/d 
^8
 

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^{3} \left (a +b \sec \left (c +d \sqrt {x}\right )\right )d x\]

Input:

int(x^3*(a+b*sec(c+d*x^(1/2))),x)
 

Output:

int(x^3*(a+b*sec(c+d*x^(1/2))),x)
 

Fricas [F]

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

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

Output:

integral(b*x^3*sec(d*sqrt(x) + c) + a*x^3, x)
 

Sympy [F]

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

integrate(x**3*(a+b*sec(c+d*x**(1/2))),x)
 

Output:

Integral(x**3*(a + b*sec(c + d*sqrt(x))), x)
 

Maxima [B] (verification not implemented)

Both result and optimal contain complex but leaf count of result is larger than twice the leaf count of optimal. 1512 vs. \(2 (352) = 704\).

Time = 0.22 (sec) , antiderivative size = 1512, normalized size of antiderivative = 3.18 \[ \int x^3 \left (a+b \sec \left (c+d \sqrt {x}\right )\right ) \, dx=\text {Too large to display} \] Input:

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

Output:

1/4*((d*sqrt(x) + c)^8*a - 8*(d*sqrt(x) + c)^7*a*c + 28*(d*sqrt(x) + c)^6* 
a*c^2 - 56*(d*sqrt(x) + c)^5*a*c^3 + 70*(d*sqrt(x) + c)^4*a*c^4 - 56*(d*sq 
rt(x) + c)^3*a*c^5 + 28*(d*sqrt(x) + c)^2*a*c^6 - 8*(d*sqrt(x) + c)*a*c^7 
- 8*b*c^7*log(sec(d*sqrt(x) + c) + tan(d*sqrt(x) + c)) - 8*(I*(d*sqrt(x) + 
 c)^7*b - 7*I*(d*sqrt(x) + c)^6*b*c + 21*I*(d*sqrt(x) + c)^5*b*c^2 - 35*I* 
(d*sqrt(x) + c)^4*b*c^3 + 35*I*(d*sqrt(x) + c)^3*b*c^4 - 21*I*(d*sqrt(x) + 
 c)^2*b*c^5 + 7*I*(d*sqrt(x) + c)*b*c^6)*arctan2(cos(d*sqrt(x) + c), sin(d 
*sqrt(x) + c) + 1) - 8*(I*(d*sqrt(x) + c)^7*b - 7*I*(d*sqrt(x) + c)^6*b*c 
+ 21*I*(d*sqrt(x) + c)^5*b*c^2 - 35*I*(d*sqrt(x) + c)^4*b*c^3 + 35*I*(d*sq 
rt(x) + c)^3*b*c^4 - 21*I*(d*sqrt(x) + c)^2*b*c^5 + 7*I*(d*sqrt(x) + c)*b* 
c^6)*arctan2(cos(d*sqrt(x) + c), -sin(d*sqrt(x) + c) + 1) - 56*(I*(d*sqrt( 
x) + c)^6*b - 6*I*(d*sqrt(x) + c)^5*b*c + 15*I*(d*sqrt(x) + c)^4*b*c^2 - 2 
0*I*(d*sqrt(x) + c)^3*b*c^3 + 15*I*(d*sqrt(x) + c)^2*b*c^4 - 6*I*(d*sqrt(x 
) + c)*b*c^5 + I*b*c^6)*dilog(I*e^(I*d*sqrt(x) + I*c)) - 56*(-I*(d*sqrt(x) 
 + c)^6*b + 6*I*(d*sqrt(x) + c)^5*b*c - 15*I*(d*sqrt(x) + c)^4*b*c^2 + 20* 
I*(d*sqrt(x) + c)^3*b*c^3 - 15*I*(d*sqrt(x) + c)^2*b*c^4 + 6*I*(d*sqrt(x) 
+ c)*b*c^5 - I*b*c^6)*dilog(-I*e^(I*d*sqrt(x) + I*c)) + 4*((d*sqrt(x) + c) 
^7*b - 7*(d*sqrt(x) + c)^6*b*c + 21*(d*sqrt(x) + c)^5*b*c^2 - 35*(d*sqrt(x 
) + c)^4*b*c^3 + 35*(d*sqrt(x) + c)^3*b*c^4 - 21*(d*sqrt(x) + c)^2*b*c^5 + 
 7*(d*sqrt(x) + c)*b*c^6)*log(cos(d*sqrt(x) + c)^2 + sin(d*sqrt(x) + c)...
 

Giac [F]

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

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

Output:

integrate((b*sec(d*sqrt(x) + c) + a)*x^3, x)
 

Mupad [F(-1)]

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

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

Output:

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

Reduce [F]

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

int(x^3*(a+b*sec(c+d*x^(1/2))),x)
 

Output:

( - 8*int((tan((sqrt(x)*d + c)/2)**2*x**3)/(tan((sqrt(x)*d + c)/2)**2 - 1) 
,x)*b + a*x**4 + b*x**4)/4