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

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

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

Mathematica [A] (verified)

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

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

Output:

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

Rubi [A] (verified)

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

\(\Big \downarrow \) 2010

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

\(\Big \downarrow \) 2009

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

Input:

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

Output:

(2*a*x^(3/2))/3 - ((4*I)*b*x*ArcTan[E^(I*(c + d*Sqrt[x]))])/d + ((4*I)*b*S 
qrt[x]*PolyLog[2, (-I)*E^(I*(c + d*Sqrt[x]))])/d^2 - ((4*I)*b*Sqrt[x]*Poly 
Log[2, I*E^(I*(c + d*Sqrt[x]))])/d^2 - (4*b*PolyLog[3, (-I)*E^(I*(c + d*Sq 
rt[x]))])/d^3 + (4*b*PolyLog[3, I*E^(I*(c + d*Sqrt[x]))])/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 \sqrt {x}\, \left (a +b \sec \left (c +d \sqrt {x}\right )\right )d x\]

Input:

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

Output:

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

Fricas [F]

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

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

Output:

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

Sympy [F]

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

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

Output:

Integral(sqrt(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. 374 vs. \(2 (114) = 228\).

Time = 0.21 (sec) , antiderivative size = 374, normalized size of antiderivative = 2.37 \[ \int \sqrt {x} \left (a+b \sec \left (c+d \sqrt {x}\right )\right ) \, dx=\frac {2 \, {\left (d \sqrt {x} + c\right )}^{3} a - 6 \, {\left (d \sqrt {x} + c\right )}^{2} a c + 6 \, {\left (d \sqrt {x} + c\right )} a c^{2} + 6 \, b c^{2} \log \left (\sec \left (d \sqrt {x} + c\right ) + \tan \left (d \sqrt {x} + c\right )\right ) - 6 \, {\left (i \, {\left (d \sqrt {x} + c\right )}^{2} b - 2 i \, {\left (d \sqrt {x} + c\right )} b c\right )} \arctan \left (\cos \left (d \sqrt {x} + c\right ), \sin \left (d \sqrt {x} + c\right ) + 1\right ) - 6 \, {\left (i \, {\left (d \sqrt {x} + c\right )}^{2} b - 2 i \, {\left (d \sqrt {x} + c\right )} b c\right )} \arctan \left (\cos \left (d \sqrt {x} + c\right ), -\sin \left (d \sqrt {x} + c\right ) + 1\right ) - 12 \, {\left (i \, {\left (d \sqrt {x} + c\right )} b - i \, b c\right )} {\rm Li}_2\left (i \, e^{\left (i \, d \sqrt {x} + i \, c\right )}\right ) - 12 \, {\left (-i \, {\left (d \sqrt {x} + c\right )} b + i \, b c\right )} {\rm Li}_2\left (-i \, e^{\left (i \, d \sqrt {x} + i \, c\right )}\right ) + 3 \, {\left ({\left (d \sqrt {x} + c\right )}^{2} b - 2 \, {\left (d \sqrt {x} + c\right )} b c\right )} \log \left (\cos \left (d \sqrt {x} + c\right )^{2} + \sin \left (d \sqrt {x} + c\right )^{2} + 2 \, \sin \left (d \sqrt {x} + c\right ) + 1\right ) - 3 \, {\left ({\left (d \sqrt {x} + c\right )}^{2} b - 2 \, {\left (d \sqrt {x} + c\right )} b c\right )} \log \left (\cos \left (d \sqrt {x} + c\right )^{2} + \sin \left (d \sqrt {x} + c\right )^{2} - 2 \, \sin \left (d \sqrt {x} + c\right ) + 1\right ) + 12 \, b {\rm Li}_{3}(i \, e^{\left (i \, d \sqrt {x} + i \, c\right )}) - 12 \, b {\rm Li}_{3}(-i \, e^{\left (i \, d \sqrt {x} + i \, c\right )})}{3 \, d^{3}} \] Input:

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

Output:

1/3*(2*(d*sqrt(x) + c)^3*a - 6*(d*sqrt(x) + c)^2*a*c + 6*(d*sqrt(x) + c)*a 
*c^2 + 6*b*c^2*log(sec(d*sqrt(x) + c) + tan(d*sqrt(x) + c)) - 6*(I*(d*sqrt 
(x) + c)^2*b - 2*I*(d*sqrt(x) + c)*b*c)*arctan2(cos(d*sqrt(x) + c), sin(d* 
sqrt(x) + c) + 1) - 6*(I*(d*sqrt(x) + c)^2*b - 2*I*(d*sqrt(x) + c)*b*c)*ar 
ctan2(cos(d*sqrt(x) + c), -sin(d*sqrt(x) + c) + 1) - 12*(I*(d*sqrt(x) + c) 
*b - I*b*c)*dilog(I*e^(I*d*sqrt(x) + I*c)) - 12*(-I*(d*sqrt(x) + c)*b + I* 
b*c)*dilog(-I*e^(I*d*sqrt(x) + I*c)) + 3*((d*sqrt(x) + c)^2*b - 2*(d*sqrt( 
x) + c)*b*c)*log(cos(d*sqrt(x) + c)^2 + sin(d*sqrt(x) + c)^2 + 2*sin(d*sqr 
t(x) + c) + 1) - 3*((d*sqrt(x) + c)^2*b - 2*(d*sqrt(x) + c)*b*c)*log(cos(d 
*sqrt(x) + c)^2 + sin(d*sqrt(x) + c)^2 - 2*sin(d*sqrt(x) + c) + 1) + 12*b* 
polylog(3, I*e^(I*d*sqrt(x) + I*c)) - 12*b*polylog(3, -I*e^(I*d*sqrt(x) + 
I*c)))/d^3
 

Giac [F]

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

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

Output:

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

Mupad [F(-1)]

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

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

Output:

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

Reduce [F]

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

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

Output:

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