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

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 = 16, antiderivative size = 220 \[ \int x \left (a+b \sec \left (c+d \sqrt {x}\right )\right ) \, dx=\frac {a x^2}{2}-\frac {4 i b x^{3/2} \arctan \left (e^{i \left (c+d \sqrt {x}\right )}\right )}{d}+\frac {6 i b x \operatorname {PolyLog}\left (2,-i e^{i \left (c+d \sqrt {x}\right )}\right )}{d^2}-\frac {6 i b x \operatorname {PolyLog}\left (2,i e^{i \left (c+d \sqrt {x}\right )}\right )}{d^2}-\frac {12 b \sqrt {x} \operatorname {PolyLog}\left (3,-i e^{i \left (c+d \sqrt {x}\right )}\right )}{d^3}+\frac {12 b \sqrt {x} \operatorname {PolyLog}\left (3,i e^{i \left (c+d \sqrt {x}\right )}\right )}{d^3}-\frac {12 i b \operatorname {PolyLog}\left (4,-i e^{i \left (c+d \sqrt {x}\right )}\right )}{d^4}+\frac {12 i b \operatorname {PolyLog}\left (4,i e^{i \left (c+d \sqrt {x}\right )}\right )}{d^4} \] Output:

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

Mathematica [A] (verified)

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

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

Output:

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

Rubi [A] (verified)

Time = 0.42 (sec) , antiderivative size = 220, 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 \left (a+b \sec \left (c+d \sqrt {x}\right )\right ) \, dx\)

\(\Big \downarrow \) 2010

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

\(\Big \downarrow \) 2009

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

Input:

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

Output:

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

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

Input:

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

Output:

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

Fricas [F]

\[ \int x \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 \,d x } \] Input:

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

Output:

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

Sympy [F]

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

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

Output:

Integral(x*(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. 540 vs. \(2 (160) = 320\).

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

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

Output:

1/2*((d*sqrt(x) + c)^4*a - 4*(d*sqrt(x) + c)^3*a*c + 6*(d*sqrt(x) + c)^2*a 
*c^2 - 4*(d*sqrt(x) + c)*a*c^3 - 4*b*c^3*log(sec(d*sqrt(x) + c) + tan(d*sq 
rt(x) + c)) - 4*(I*(d*sqrt(x) + c)^3*b - 3*I*(d*sqrt(x) + c)^2*b*c + 3*I*( 
d*sqrt(x) + c)*b*c^2)*arctan2(cos(d*sqrt(x) + c), sin(d*sqrt(x) + c) + 1) 
- 4*(I*(d*sqrt(x) + c)^3*b - 3*I*(d*sqrt(x) + c)^2*b*c + 3*I*(d*sqrt(x) + 
c)*b*c^2)*arctan2(cos(d*sqrt(x) + c), -sin(d*sqrt(x) + c) + 1) - 12*(I*(d* 
sqrt(x) + c)^2*b - 2*I*(d*sqrt(x) + c)*b*c + I*b*c^2)*dilog(I*e^(I*d*sqrt( 
x) + I*c)) - 12*(-I*(d*sqrt(x) + c)^2*b + 2*I*(d*sqrt(x) + c)*b*c - I*b*c^ 
2)*dilog(-I*e^(I*d*sqrt(x) + I*c)) + 2*((d*sqrt(x) + c)^3*b - 3*(d*sqrt(x) 
 + c)^2*b*c + 3*(d*sqrt(x) + c)*b*c^2)*log(cos(d*sqrt(x) + c)^2 + sin(d*sq 
rt(x) + c)^2 + 2*sin(d*sqrt(x) + c) + 1) - 2*((d*sqrt(x) + c)^3*b - 3*(d*s 
qrt(x) + c)^2*b*c + 3*(d*sqrt(x) + c)*b*c^2)*log(cos(d*sqrt(x) + c)^2 + si 
n(d*sqrt(x) + c)^2 - 2*sin(d*sqrt(x) + c) + 1) + 24*I*b*polylog(4, I*e^(I* 
d*sqrt(x) + I*c)) - 24*I*b*polylog(4, -I*e^(I*d*sqrt(x) + I*c)) + 24*((d*s 
qrt(x) + c)*b - b*c)*polylog(3, I*e^(I*d*sqrt(x) + I*c)) - 24*((d*sqrt(x) 
+ c)*b - b*c)*polylog(3, -I*e^(I*d*sqrt(x) + I*c)))/d^4
 

Giac [F]

\[ \int x \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 \,d x } \] Input:

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

Output:

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

Mupad [F(-1)]

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

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

Output:

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

Reduce [F]

\[ \int x \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}{\tan \left (\frac {\sqrt {x}\, d}{2}+\frac {c}{2}\right )^{2}-1}d x \right ) b +\frac {a \,x^{2}}{2}+\frac {b \,x^{2}}{2} \] Input:

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

Output:

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