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

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 = 695 \[ \int x^3 \left (a+b \csc \left (c+d \sqrt {x}\right )\right )^2 \, dx =\text {Too large to display} \] Output:

-3360*a*b*x^(3/2)*polylog(5,exp(I*(c+d*x^(1/2))))/d^5+168*a*b*x^(5/2)*poly 
log(3,exp(I*(c+d*x^(1/2))))/d^3+3360*a*b*x^(3/2)*polylog(5,-exp(I*(c+d*x^( 
1/2))))/d^5-168*a*b*x^(5/2)*polylog(3,-exp(I*(c+d*x^(1/2))))/d^3-8*a*b*x^( 
7/2)*arctanh(exp(I*(c+d*x^(1/2))))/d-20160*a*b*x^(1/2)*polylog(7,-exp(I*(c 
+d*x^(1/2))))/d^7+20160*a*b*x^(1/2)*polylog(7,exp(I*(c+d*x^(1/2))))/d^7-42 
*I*b^2*x^(5/2)*polylog(2,exp(2*I*(c+d*x^(1/2))))/d^3-20160*I*a*b*polylog(8 
,-exp(I*(c+d*x^(1/2))))/d^8-315*I*b^2*x^(1/2)*polylog(6,exp(2*I*(c+d*x^(1/ 
2))))/d^7+210*I*b^2*x^(3/2)*polylog(4,exp(2*I*(c+d*x^(1/2))))/d^5+20160*I* 
a*b*polylog(8,exp(I*(c+d*x^(1/2))))/d^8-840*I*a*b*x^2*polylog(4,-exp(I*(c+ 
d*x^(1/2))))/d^4-10080*I*a*b*x*polylog(6,exp(I*(c+d*x^(1/2))))/d^6-28*I*a* 
b*x^3*polylog(2,exp(I*(c+d*x^(1/2))))/d^2+10080*I*a*b*x*polylog(6,-exp(I*( 
c+d*x^(1/2))))/d^6+28*I*a*b*x^3*polylog(2,-exp(I*(c+d*x^(1/2))))/d^2+840*I 
*a*b*x^2*polylog(4,exp(I*(c+d*x^(1/2))))/d^4+315/2*b^2*polylog(7,exp(2*I*( 
c+d*x^(1/2))))/d^8-2*I*b^2*x^(7/2)/d+1/4*a^2*x^4-315*b^2*x*polylog(5,exp(2 
*I*(c+d*x^(1/2))))/d^6+105*b^2*x^2*polylog(3,exp(2*I*(c+d*x^(1/2))))/d^4+1 
4*b^2*x^3*ln(1-exp(2*I*(c+d*x^(1/2))))/d^2-2*b^2*x^(7/2)*cot(c+d*x^(1/2))/ 
d
 

Mathematica [A] (verified)

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

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

Output:

(a^2*x^4*(a + b*Csc[c + d*Sqrt[x]])^2*Sin[c + d*Sqrt[x]]^2)/(4*(b + a*Sin[ 
c + d*Sqrt[x]])^2) - ((I/2)*b*(a + b*Csc[c + d*Sqrt[x]])^2*((8*b*d^7*E^((2 
*I)*c)*x^(7/2))/(-1 + E^((2*I)*c)) + (8*I)*a*d^7*x^(7/2)*Log[1 - E^(I*(c + 
 d*Sqrt[x]))] - (8*I)*a*d^7*x^(7/2)*Log[1 + E^(I*(c + d*Sqrt[x]))] + (28*I 
)*b*d^6*x^3*Log[1 - E^((2*I)*(c + d*Sqrt[x]))] - 56*a*d^6*x^3*PolyLog[2, - 
E^(I*(c + d*Sqrt[x]))] + 56*a*d^6*x^3*PolyLog[2, E^(I*(c + d*Sqrt[x]))] + 
84*b*d^5*x^(5/2)*PolyLog[2, E^((2*I)*(c + d*Sqrt[x]))] - (336*I)*a*d^5*x^( 
5/2)*PolyLog[3, -E^(I*(c + d*Sqrt[x]))] + (336*I)*a*d^5*x^(5/2)*PolyLog[3, 
 E^(I*(c + d*Sqrt[x]))] + (210*I)*b*d^4*x^2*PolyLog[3, E^((2*I)*(c + d*Sqr 
t[x]))] + 1680*a*d^4*x^2*PolyLog[4, -E^(I*(c + d*Sqrt[x]))] - 1680*a*d^4*x 
^2*PolyLog[4, E^(I*(c + d*Sqrt[x]))] - 420*b*d^3*x^(3/2)*PolyLog[4, E^((2* 
I)*(c + d*Sqrt[x]))] + (6720*I)*a*d^3*x^(3/2)*PolyLog[5, -E^(I*(c + d*Sqrt 
[x]))] - (6720*I)*a*d^3*x^(3/2)*PolyLog[5, E^(I*(c + d*Sqrt[x]))] - (630*I 
)*b*d^2*x*PolyLog[5, E^((2*I)*(c + d*Sqrt[x]))] - 20160*a*d^2*x*PolyLog[6, 
 -E^(I*(c + d*Sqrt[x]))] + 20160*a*d^2*x*PolyLog[6, E^(I*(c + d*Sqrt[x]))] 
 + 630*b*d*Sqrt[x]*PolyLog[6, E^((2*I)*(c + d*Sqrt[x]))] - (40320*I)*a*d*S 
qrt[x]*PolyLog[7, -E^(I*(c + d*Sqrt[x]))] + (40320*I)*a*d*Sqrt[x]*PolyLog[ 
7, E^(I*(c + d*Sqrt[x]))] + (315*I)*b*PolyLog[7, E^((2*I)*(c + d*Sqrt[x])) 
] + 40320*a*PolyLog[8, -E^(I*(c + d*Sqrt[x]))] - 40320*a*PolyLog[8, E^(I*( 
c + d*Sqrt[x]))])*Sin[c + d*Sqrt[x]]^2)/(d^8*(b + a*Sin[c + d*Sqrt[x]])...
 

Rubi [A] (verified)

Time = 1.08 (sec) , antiderivative size = 703, normalized size of antiderivative = 1.01, number of steps used = 5, number of rules used = 4, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.200, 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 \left (a+b \csc \left (c+d \sqrt {x}\right )\right )^2 \, dx\)

\(\Big \downarrow \) 4693

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

\(\Big \downarrow \) 3042

\(\displaystyle 2 \int x^{7/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^{7/2}+b^2 \csc ^2\left (c+d \sqrt {x}\right ) x^{7/2}+2 a b \csc \left (c+d \sqrt {x}\right ) x^{7/2}\right )d\sqrt {x}\)

\(\Big \downarrow \) 2009

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

Input:

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

Output:

2*(((-I)*b^2*x^(7/2))/d + (a^2*x^4)/8 - (4*a*b*x^(7/2)*ArcTanh[E^(I*(c + d 
*Sqrt[x]))])/d - (b^2*x^(7/2)*Cot[c + d*Sqrt[x]])/d + (7*b^2*x^3*Log[1 - E 
^((2*I)*(c + d*Sqrt[x]))])/d^2 + ((14*I)*a*b*x^3*PolyLog[2, -E^(I*(c + d*S 
qrt[x]))])/d^2 - ((14*I)*a*b*x^3*PolyLog[2, E^(I*(c + d*Sqrt[x]))])/d^2 - 
((21*I)*b^2*x^(5/2)*PolyLog[2, E^((2*I)*(c + d*Sqrt[x]))])/d^3 - (84*a*b*x 
^(5/2)*PolyLog[3, -E^(I*(c + d*Sqrt[x]))])/d^3 + (84*a*b*x^(5/2)*PolyLog[3 
, E^(I*(c + d*Sqrt[x]))])/d^3 + (105*b^2*x^2*PolyLog[3, E^((2*I)*(c + d*Sq 
rt[x]))])/(2*d^4) - ((420*I)*a*b*x^2*PolyLog[4, -E^(I*(c + d*Sqrt[x]))])/d 
^4 + ((420*I)*a*b*x^2*PolyLog[4, E^(I*(c + d*Sqrt[x]))])/d^4 + ((105*I)*b^ 
2*x^(3/2)*PolyLog[4, E^((2*I)*(c + d*Sqrt[x]))])/d^5 + (1680*a*b*x^(3/2)*P 
olyLog[5, -E^(I*(c + d*Sqrt[x]))])/d^5 - (1680*a*b*x^(3/2)*PolyLog[5, E^(I 
*(c + d*Sqrt[x]))])/d^5 - (315*b^2*x*PolyLog[5, E^((2*I)*(c + d*Sqrt[x]))] 
)/(2*d^6) + ((5040*I)*a*b*x*PolyLog[6, -E^(I*(c + d*Sqrt[x]))])/d^6 - ((50 
40*I)*a*b*x*PolyLog[6, E^(I*(c + d*Sqrt[x]))])/d^6 - (((315*I)/2)*b^2*Sqrt 
[x]*PolyLog[6, E^((2*I)*(c + d*Sqrt[x]))])/d^7 - (10080*a*b*Sqrt[x]*PolyLo 
g[7, -E^(I*(c + d*Sqrt[x]))])/d^7 + (10080*a*b*Sqrt[x]*PolyLog[7, E^(I*(c 
+ d*Sqrt[x]))])/d^7 + (315*b^2*PolyLog[7, E^((2*I)*(c + d*Sqrt[x]))])/(4*d 
^8) - ((10080*I)*a*b*PolyLog[8, -E^(I*(c + d*Sqrt[x]))])/d^8 + ((10080*I)* 
a*b*PolyLog[8, 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 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^{3} \left (a +b \csc \left (c +d \sqrt {x}\right )\right )^{2}d x\]

Input:

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

Output:

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

Fricas [F]

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

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

Output:

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

Sympy [F]

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

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

Output:

Integral(x**3*(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. 6462 vs. \(2 (550) = 1100\).

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

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

Output:

1/4*((d*sqrt(x) + c)^8*a^2 - 8*(d*sqrt(x) + c)^7*a^2*c + 28*(d*sqrt(x) + c 
)^6*a^2*c^2 - 56*(d*sqrt(x) + c)^5*a^2*c^3 + 70*(d*sqrt(x) + c)^4*a^2*c^4 
- 56*(d*sqrt(x) + c)^3*a^2*c^5 + 28*(d*sqrt(x) + c)^2*a^2*c^6 - 8*(d*sqrt( 
x) + c)*a^2*c^7 + 16*a*b*c^7*log(cot(d*sqrt(x) + c) + csc(d*sqrt(x) + c)) 
+ 8*(4*b^2*c^7 + 2*(2*(d*sqrt(x) + c)^7*a*b - 7*b^2*c^6 - 7*(2*a*b*c + b^2 
)*(d*sqrt(x) + c)^6 + 42*(a*b*c^2 + b^2*c)*(d*sqrt(x) + c)^5 - 35*(2*a*b*c 
^3 + 3*b^2*c^2)*(d*sqrt(x) + c)^4 + 70*(a*b*c^4 + 2*b^2*c^3)*(d*sqrt(x) + 
c)^3 - 21*(2*a*b*c^5 + 5*b^2*c^4)*(d*sqrt(x) + c)^2 + 14*(a*b*c^6 + 3*b^2* 
c^5)*(d*sqrt(x) + c) - (2*(d*sqrt(x) + c)^7*a*b - 7*b^2*c^6 - 7*(2*a*b*c + 
 b^2)*(d*sqrt(x) + c)^6 + 42*(a*b*c^2 + b^2*c)*(d*sqrt(x) + c)^5 - 35*(2*a 
*b*c^3 + 3*b^2*c^2)*(d*sqrt(x) + c)^4 + 70*(a*b*c^4 + 2*b^2*c^3)*(d*sqrt(x 
) + c)^3 - 21*(2*a*b*c^5 + 5*b^2*c^4)*(d*sqrt(x) + c)^2 + 14*(a*b*c^6 + 3* 
b^2*c^5)*(d*sqrt(x) + c))*cos(2*d*sqrt(x) + 2*c) + (-2*I*(d*sqrt(x) + c)^7 
*a*b + 7*I*b^2*c^6 + 7*(2*I*a*b*c + I*b^2)*(d*sqrt(x) + c)^6 + 42*(-I*a*b* 
c^2 - I*b^2*c)*(d*sqrt(x) + c)^5 + 35*(2*I*a*b*c^3 + 3*I*b^2*c^2)*(d*sqrt( 
x) + c)^4 + 70*(-I*a*b*c^4 - 2*I*b^2*c^3)*(d*sqrt(x) + c)^3 + 21*(2*I*a*b* 
c^5 + 5*I*b^2*c^4)*(d*sqrt(x) + c)^2 + 14*(-I*a*b*c^6 - 3*I*b^2*c^5)*(d*sq 
rt(x) + c))*sin(2*d*sqrt(x) + 2*c))*arctan2(sin(d*sqrt(x) + c), cos(d*sqrt 
(x) + c) + 1) + 14*(b^2*c^6*cos(2*d*sqrt(x) + 2*c) + I*b^2*c^6*sin(2*d*sqr 
t(x) + 2*c) - b^2*c^6)*arctan2(sin(d*sqrt(x) + c), cos(d*sqrt(x) + c) -...
 

Giac [F]

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

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

Output:

sage0*x
 

Mupad [F(-1)]

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

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

Output:

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

Reduce [F]

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

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

Output:

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