\(\int x^{3/2} (a+b \csc (c+d \sqrt {x}))^2 \, dx\) [56]

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 = 22, antiderivative size = 421 \[ \int x^{3/2} \left (a+b \csc \left (c+d \sqrt {x}\right )\right )^2 \, dx=-\frac {2 i b^2 x^2}{d}+\frac {2}{5} a^2 x^{5/2}-\frac {8 a b x^2 \text {arctanh}\left (e^{i \left (c+d \sqrt {x}\right )}\right )}{d}-\frac {2 b^2 x^2 \cot \left (c+d \sqrt {x}\right )}{d}+\frac {8 b^2 x^{3/2} \log \left (1-e^{2 i \left (c+d \sqrt {x}\right )}\right )}{d^2}+\frac {16 i a b x^{3/2} \operatorname {PolyLog}\left (2,-e^{i \left (c+d \sqrt {x}\right )}\right )}{d^2}-\frac {16 i a b x^{3/2} \operatorname {PolyLog}\left (2,e^{i \left (c+d \sqrt {x}\right )}\right )}{d^2}-\frac {12 i b^2 x \operatorname {PolyLog}\left (2,e^{2 i \left (c+d \sqrt {x}\right )}\right )}{d^3}-\frac {48 a b x \operatorname {PolyLog}\left (3,-e^{i \left (c+d \sqrt {x}\right )}\right )}{d^3}+\frac {48 a b x \operatorname {PolyLog}\left (3,e^{i \left (c+d \sqrt {x}\right )}\right )}{d^3}+\frac {12 b^2 \sqrt {x} \operatorname {PolyLog}\left (3,e^{2 i \left (c+d \sqrt {x}\right )}\right )}{d^4}-\frac {96 i a b \sqrt {x} \operatorname {PolyLog}\left (4,-e^{i \left (c+d \sqrt {x}\right )}\right )}{d^4}+\frac {96 i a b \sqrt {x} \operatorname {PolyLog}\left (4,e^{i \left (c+d \sqrt {x}\right )}\right )}{d^4}+\frac {6 i b^2 \operatorname {PolyLog}\left (4,e^{2 i \left (c+d \sqrt {x}\right )}\right )}{d^5}+\frac {96 a b \operatorname {PolyLog}\left (5,-e^{i \left (c+d \sqrt {x}\right )}\right )}{d^5}-\frac {96 a b \operatorname {PolyLog}\left (5,e^{i \left (c+d \sqrt {x}\right )}\right )}{d^5} \] Output:

96*I*a*b*x^(1/2)*polylog(4,exp(I*(c+d*x^(1/2))))/d^4+2/5*a^2*x^(5/2)-8*a*b 
*x^2*arctanh(exp(I*(c+d*x^(1/2))))/d-2*b^2*x^2*cot(c+d*x^(1/2))/d+8*b^2*x^ 
(3/2)*ln(1-exp(2*I*(c+d*x^(1/2))))/d^2+16*I*a*b*x^(3/2)*polylog(2,-exp(I*( 
c+d*x^(1/2))))/d^2-2*I*b^2*x^2/d-12*I*b^2*x*polylog(2,exp(2*I*(c+d*x^(1/2) 
)))/d^3-48*a*b*x*polylog(3,-exp(I*(c+d*x^(1/2))))/d^3+48*a*b*x*polylog(3,e 
xp(I*(c+d*x^(1/2))))/d^3+12*b^2*x^(1/2)*polylog(3,exp(2*I*(c+d*x^(1/2))))/ 
d^4-96*I*a*b*x^(1/2)*polylog(4,-exp(I*(c+d*x^(1/2))))/d^4+6*I*b^2*polylog( 
4,exp(2*I*(c+d*x^(1/2))))/d^5-16*I*a*b*x^(3/2)*polylog(2,exp(I*(c+d*x^(1/2 
))))/d^2+96*a*b*polylog(5,-exp(I*(c+d*x^(1/2))))/d^5-96*a*b*polylog(5,exp( 
I*(c+d*x^(1/2))))/d^5
 

Mathematica [A] (verified)

Time = 7.09 (sec) , antiderivative size = 567, normalized size of antiderivative = 1.35 \[ \int x^{3/2} \left (a+b \csc \left (c+d \sqrt {x}\right )\right )^2 \, dx=\frac {2}{5} a^2 x^{5/2}+\frac {4 b \left (-\frac {i b d^4 x^2}{-1+e^{2 i c}}+2 b d^3 x^{3/2} \log \left (1-e^{-i \left (c+d \sqrt {x}\right )}\right )+a d^4 x^2 \log \left (1-e^{-i \left (c+d \sqrt {x}\right )}\right )+2 b d^3 x^{3/2} \log \left (1+e^{-i \left (c+d \sqrt {x}\right )}\right )-a d^4 x^2 \log \left (1+e^{-i \left (c+d \sqrt {x}\right )}\right )-2 i d^2 \left (-3 b+2 a d \sqrt {x}\right ) x \operatorname {PolyLog}\left (2,-e^{-i \left (c+d \sqrt {x}\right )}\right )+2 i d^2 \left (3 b+2 a d \sqrt {x}\right ) x \operatorname {PolyLog}\left (2,e^{-i \left (c+d \sqrt {x}\right )}\right )+12 b d \sqrt {x} \operatorname {PolyLog}\left (3,-e^{-i \left (c+d \sqrt {x}\right )}\right )-12 a d^2 x \operatorname {PolyLog}\left (3,-e^{-i \left (c+d \sqrt {x}\right )}\right )+12 b d \sqrt {x} \operatorname {PolyLog}\left (3,e^{-i \left (c+d \sqrt {x}\right )}\right )+12 a d^2 x \operatorname {PolyLog}\left (3,e^{-i \left (c+d \sqrt {x}\right )}\right )-12 i b \operatorname {PolyLog}\left (4,-e^{-i \left (c+d \sqrt {x}\right )}\right )+24 i a d \sqrt {x} \operatorname {PolyLog}\left (4,-e^{-i \left (c+d \sqrt {x}\right )}\right )-12 i b \operatorname {PolyLog}\left (4,e^{-i \left (c+d \sqrt {x}\right )}\right )-24 i a d \sqrt {x} \operatorname {PolyLog}\left (4,e^{-i \left (c+d \sqrt {x}\right )}\right )+24 a \operatorname {PolyLog}\left (5,-e^{-i \left (c+d \sqrt {x}\right )}\right )-24 a \operatorname {PolyLog}\left (5,e^{-i \left (c+d \sqrt {x}\right )}\right )\right )}{d^5}+\frac {b^2 x^2 \csc \left (\frac {c}{2}\right ) \csc \left (\frac {1}{2} \left (c+d \sqrt {x}\right )\right ) \sin \left (\frac {d \sqrt {x}}{2}\right )}{d}+\frac {b^2 x^2 \sec \left (\frac {c}{2}\right ) \sec \left (\frac {1}{2} \left (c+d \sqrt {x}\right )\right ) \sin \left (\frac {d \sqrt {x}}{2}\right )}{d} \] Input:

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

Output:

(2*a^2*x^(5/2))/5 + (4*b*(((-I)*b*d^4*x^2)/(-1 + E^((2*I)*c)) + 2*b*d^3*x^ 
(3/2)*Log[1 - E^((-I)*(c + d*Sqrt[x]))] + a*d^4*x^2*Log[1 - E^((-I)*(c + d 
*Sqrt[x]))] + 2*b*d^3*x^(3/2)*Log[1 + E^((-I)*(c + d*Sqrt[x]))] - a*d^4*x^ 
2*Log[1 + E^((-I)*(c + d*Sqrt[x]))] - (2*I)*d^2*(-3*b + 2*a*d*Sqrt[x])*x*P 
olyLog[2, -E^((-I)*(c + d*Sqrt[x]))] + (2*I)*d^2*(3*b + 2*a*d*Sqrt[x])*x*P 
olyLog[2, E^((-I)*(c + d*Sqrt[x]))] + 12*b*d*Sqrt[x]*PolyLog[3, -E^((-I)*( 
c + d*Sqrt[x]))] - 12*a*d^2*x*PolyLog[3, -E^((-I)*(c + d*Sqrt[x]))] + 12*b 
*d*Sqrt[x]*PolyLog[3, E^((-I)*(c + d*Sqrt[x]))] + 12*a*d^2*x*PolyLog[3, E^ 
((-I)*(c + d*Sqrt[x]))] - (12*I)*b*PolyLog[4, -E^((-I)*(c + d*Sqrt[x]))] + 
 (24*I)*a*d*Sqrt[x]*PolyLog[4, -E^((-I)*(c + d*Sqrt[x]))] - (12*I)*b*PolyL 
og[4, E^((-I)*(c + d*Sqrt[x]))] - (24*I)*a*d*Sqrt[x]*PolyLog[4, E^((-I)*(c 
 + d*Sqrt[x]))] + 24*a*PolyLog[5, -E^((-I)*(c + d*Sqrt[x]))] - 24*a*PolyLo 
g[5, E^((-I)*(c + d*Sqrt[x]))]))/d^5 + (b^2*x^2*Csc[c/2]*Csc[(c + d*Sqrt[x 
])/2]*Sin[(d*Sqrt[x])/2])/d + (b^2*x^2*Sec[c/2]*Sec[(c + d*Sqrt[x])/2]*Sin 
[(d*Sqrt[x])/2])/d
 

Rubi [A] (verified)

Time = 0.75 (sec) , antiderivative size = 423, normalized size of antiderivative = 1.00, number of steps used = 5, number of rules used = 4, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.182, Rules used = {4693, 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^{3/2} \left (a+b \csc \left (c+d \sqrt {x}\right )\right )^2 \, dx\)

\(\Big \downarrow \) 4693

\(\displaystyle 2 \int x^2 \left (a+b \csc \left (c+d \sqrt {x}\right )\right )^2d\sqrt {x}\)

\(\Big \downarrow \) 3042

\(\displaystyle 2 \int x^2 \left (a+b \csc \left (c+d \sqrt {x}\right )\right )^2d\sqrt {x}\)

\(\Big \downarrow \) 4678

\(\displaystyle 2 \int \left (a^2 x^2+b^2 \csc ^2\left (c+d \sqrt {x}\right ) x^2+2 a b \csc \left (c+d \sqrt {x}\right ) x^2\right )d\sqrt {x}\)

\(\Big \downarrow \) 2009

\(\displaystyle 2 \left (\frac {1}{5} a^2 x^{5/2}-\frac {4 a b x^2 \text {arctanh}\left (e^{i \left (c+d \sqrt {x}\right )}\right )}{d}+\frac {48 a b \operatorname {PolyLog}\left (5,-e^{i \left (c+d \sqrt {x}\right )}\right )}{d^5}-\frac {48 a b \operatorname {PolyLog}\left (5,e^{i \left (c+d \sqrt {x}\right )}\right )}{d^5}-\frac {48 i a b \sqrt {x} \operatorname {PolyLog}\left (4,-e^{i \left (c+d \sqrt {x}\right )}\right )}{d^4}+\frac {48 i a b \sqrt {x} \operatorname {PolyLog}\left (4,e^{i \left (c+d \sqrt {x}\right )}\right )}{d^4}-\frac {24 a b x \operatorname {PolyLog}\left (3,-e^{i \left (c+d \sqrt {x}\right )}\right )}{d^3}+\frac {24 a b x \operatorname {PolyLog}\left (3,e^{i \left (c+d \sqrt {x}\right )}\right )}{d^3}+\frac {8 i a b x^{3/2} \operatorname {PolyLog}\left (2,-e^{i \left (c+d \sqrt {x}\right )}\right )}{d^2}-\frac {8 i a b x^{3/2} \operatorname {PolyLog}\left (2,e^{i \left (c+d \sqrt {x}\right )}\right )}{d^2}+\frac {3 i b^2 \operatorname {PolyLog}\left (4,e^{2 i \left (c+d \sqrt {x}\right )}\right )}{d^5}+\frac {6 b^2 \sqrt {x} \operatorname {PolyLog}\left (3,e^{2 i \left (c+d \sqrt {x}\right )}\right )}{d^4}-\frac {6 i b^2 x \operatorname {PolyLog}\left (2,e^{2 i \left (c+d \sqrt {x}\right )}\right )}{d^3}+\frac {4 b^2 x^{3/2} \log \left (1-e^{2 i \left (c+d \sqrt {x}\right )}\right )}{d^2}-\frac {b^2 x^2 \cot \left (c+d \sqrt {x}\right )}{d}-\frac {i b^2 x^2}{d}\right )\)

Input:

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

Output:

2*(((-I)*b^2*x^2)/d + (a^2*x^(5/2))/5 - (4*a*b*x^2*ArcTanh[E^(I*(c + d*Sqr 
t[x]))])/d - (b^2*x^2*Cot[c + d*Sqrt[x]])/d + (4*b^2*x^(3/2)*Log[1 - E^((2 
*I)*(c + d*Sqrt[x]))])/d^2 + ((8*I)*a*b*x^(3/2)*PolyLog[2, -E^(I*(c + d*Sq 
rt[x]))])/d^2 - ((8*I)*a*b*x^(3/2)*PolyLog[2, E^(I*(c + d*Sqrt[x]))])/d^2 
- ((6*I)*b^2*x*PolyLog[2, E^((2*I)*(c + d*Sqrt[x]))])/d^3 - (24*a*b*x*Poly 
Log[3, -E^(I*(c + d*Sqrt[x]))])/d^3 + (24*a*b*x*PolyLog[3, E^(I*(c + d*Sqr 
t[x]))])/d^3 + (6*b^2*Sqrt[x]*PolyLog[3, E^((2*I)*(c + d*Sqrt[x]))])/d^4 - 
 ((48*I)*a*b*Sqrt[x]*PolyLog[4, -E^(I*(c + d*Sqrt[x]))])/d^4 + ((48*I)*a*b 
*Sqrt[x]*PolyLog[4, E^(I*(c + d*Sqrt[x]))])/d^4 + ((3*I)*b^2*PolyLog[4, E^ 
((2*I)*(c + d*Sqrt[x]))])/d^5 + (48*a*b*PolyLog[5, -E^(I*(c + d*Sqrt[x]))] 
)/d^5 - (48*a*b*PolyLog[5, E^(I*(c + d*Sqrt[x]))])/d^5)
 

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 4693
Int[((a_.) + Csc[(c_.) + (d_.)*(x_)^(n_)]*(b_.))^(p_.)*(x_)^(m_.), x_Symbol 
] :> Simp[1/n   Subst[Int[x^(Simplify[(m + 1)/n] - 1)*(a + b*Csc[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^{\frac {3}{2}} \left (a +b \csc \left (c +d \sqrt {x}\right )\right )^{2}d x\]

Input:

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

Output:

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

Fricas [F]

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

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

Output:

integral(b^2*x^(3/2)*csc(d*sqrt(x) + c)^2 + 2*a*b*x^(3/2)*csc(d*sqrt(x) + 
c) + a^2*x^(3/2), x)
 

Sympy [F]

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

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

Output:

Integral(x**(3/2)*(a + b*csc(c + d*sqrt(x)))**2, 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. 2836 vs. \(2 (334) = 668\).

Time = 0.21 (sec) , antiderivative size = 2836, normalized size of antiderivative = 6.74 \[ \int x^{3/2} \left (a+b \csc \left (c+d \sqrt {x}\right )\right )^2 \, dx=\text {Too large to display} \] Input:

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

Output:

2/5*((d*sqrt(x) + c)^5*a^2 - 5*(d*sqrt(x) + c)^4*a^2*c + 10*(d*sqrt(x) + c 
)^3*a^2*c^2 - 10*(d*sqrt(x) + c)^2*a^2*c^3 + 5*(d*sqrt(x) + c)*a^2*c^4 - 1 
0*a*b*c^4*log(cot(d*sqrt(x) + c) + csc(d*sqrt(x) + c)) - 5*(2*b^2*c^4 - 2* 
((d*sqrt(x) + c)^4*a*b + 2*b^2*c^3 - 2*(2*a*b*c + b^2)*(d*sqrt(x) + c)^3 + 
 6*(a*b*c^2 + b^2*c)*(d*sqrt(x) + c)^2 - 2*(2*a*b*c^3 + 3*b^2*c^2)*(d*sqrt 
(x) + c) - ((d*sqrt(x) + c)^4*a*b + 2*b^2*c^3 - 2*(2*a*b*c + b^2)*(d*sqrt( 
x) + c)^3 + 6*(a*b*c^2 + b^2*c)*(d*sqrt(x) + c)^2 - 2*(2*a*b*c^3 + 3*b^2*c 
^2)*(d*sqrt(x) + c))*cos(2*d*sqrt(x) + 2*c) + (-I*(d*sqrt(x) + c)^4*a*b - 
2*I*b^2*c^3 + 2*(2*I*a*b*c + I*b^2)*(d*sqrt(x) + c)^3 + 6*(-I*a*b*c^2 - I* 
b^2*c)*(d*sqrt(x) + c)^2 + 2*(2*I*a*b*c^3 + 3*I*b^2*c^2)*(d*sqrt(x) + c))* 
sin(2*d*sqrt(x) + 2*c))*arctan2(sin(d*sqrt(x) + c), cos(d*sqrt(x) + c) + 1 
) + 4*(b^2*c^3*cos(2*d*sqrt(x) + 2*c) + I*b^2*c^3*sin(2*d*sqrt(x) + 2*c) - 
 b^2*c^3)*arctan2(sin(d*sqrt(x) + c), cos(d*sqrt(x) + c) - 1) - 2*((d*sqrt 
(x) + c)^4*a*b - 2*(2*a*b*c - b^2)*(d*sqrt(x) + c)^3 + 6*(a*b*c^2 - b^2*c) 
*(d*sqrt(x) + c)^2 - 2*(2*a*b*c^3 - 3*b^2*c^2)*(d*sqrt(x) + c) - ((d*sqrt( 
x) + c)^4*a*b - 2*(2*a*b*c - b^2)*(d*sqrt(x) + c)^3 + 6*(a*b*c^2 - b^2*c)* 
(d*sqrt(x) + c)^2 - 2*(2*a*b*c^3 - 3*b^2*c^2)*(d*sqrt(x) + c))*cos(2*d*sqr 
t(x) + 2*c) + (-I*(d*sqrt(x) + c)^4*a*b + 2*(2*I*a*b*c - I*b^2)*(d*sqrt(x) 
 + c)^3 + 6*(-I*a*b*c^2 + I*b^2*c)*(d*sqrt(x) + c)^2 + 2*(2*I*a*b*c^3 - 3* 
I*b^2*c^2)*(d*sqrt(x) + c))*sin(2*d*sqrt(x) + 2*c))*arctan2(sin(d*sqrt(...
 

Giac [F]

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

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

Output:

integrate((b*csc(d*sqrt(x) + c) + a)^2*x^(3/2), x)
 

Mupad [F(-1)]

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

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

Output:

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

Reduce [F]

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

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

Output:

(2*sqrt(x)*a**2*x**2 + 10*int(sqrt(x)*csc(sqrt(x)*d + c)*x,x)*a*b + 5*int( 
sqrt(x)*csc(sqrt(x)*d + c)**2*x,x)*b**2)/5