\(\int x^3 (a+b \csc (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 = 432 \[ \int x^3 \left (a+b \csc \left (c+d \sqrt {x}\right )\right ) \, dx=\frac {a x^4}{4}-\frac {4 b x^{7/2} \text {arctanh}\left (e^{i \left (c+d \sqrt {x}\right )}\right )}{d}+\frac {14 i b x^3 \operatorname {PolyLog}\left (2,-e^{i \left (c+d \sqrt {x}\right )}\right )}{d^2}-\frac {14 i b x^3 \operatorname {PolyLog}\left (2,e^{i \left (c+d \sqrt {x}\right )}\right )}{d^2}-\frac {84 b x^{5/2} \operatorname {PolyLog}\left (3,-e^{i \left (c+d \sqrt {x}\right )}\right )}{d^3}+\frac {84 b x^{5/2} \operatorname {PolyLog}\left (3,e^{i \left (c+d \sqrt {x}\right )}\right )}{d^3}-\frac {420 i b x^2 \operatorname {PolyLog}\left (4,-e^{i \left (c+d \sqrt {x}\right )}\right )}{d^4}+\frac {420 i b x^2 \operatorname {PolyLog}\left (4,e^{i \left (c+d \sqrt {x}\right )}\right )}{d^4}+\frac {1680 b x^{3/2} \operatorname {PolyLog}\left (5,-e^{i \left (c+d \sqrt {x}\right )}\right )}{d^5}-\frac {1680 b x^{3/2} \operatorname {PolyLog}\left (5,e^{i \left (c+d \sqrt {x}\right )}\right )}{d^5}+\frac {5040 i b x \operatorname {PolyLog}\left (6,-e^{i \left (c+d \sqrt {x}\right )}\right )}{d^6}-\frac {5040 i b x \operatorname {PolyLog}\left (6,e^{i \left (c+d \sqrt {x}\right )}\right )}{d^6}-\frac {10080 b \sqrt {x} \operatorname {PolyLog}\left (7,-e^{i \left (c+d \sqrt {x}\right )}\right )}{d^7}+\frac {10080 b \sqrt {x} \operatorname {PolyLog}\left (7,e^{i \left (c+d \sqrt {x}\right )}\right )}{d^7}-\frac {10080 i b \operatorname {PolyLog}\left (8,-e^{i \left (c+d \sqrt {x}\right )}\right )}{d^8}+\frac {10080 i b \operatorname {PolyLog}\left (8,e^{i \left (c+d \sqrt {x}\right )}\right )}{d^8} \] Output:

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

Mathematica [A] (verified)

Time = 0.37 (sec) , antiderivative size = 445, normalized size of antiderivative = 1.03 \[ \int x^3 \left (a+b \csc \left (c+d \sqrt {x}\right )\right ) \, dx=\frac {a x^4}{4}+\frac {2 b \left (d^7 x^{7/2} \log \left (1-e^{i \left (c+d \sqrt {x}\right )}\right )-d^7 x^{7/2} \log \left (1+e^{i \left (c+d \sqrt {x}\right )}\right )+7 i d^6 x^3 \operatorname {PolyLog}\left (2,-e^{i \left (c+d \sqrt {x}\right )}\right )-7 i d^6 x^3 \operatorname {PolyLog}\left (2,e^{i \left (c+d \sqrt {x}\right )}\right )-42 d^5 x^{5/2} \operatorname {PolyLog}\left (3,-e^{i \left (c+d \sqrt {x}\right )}\right )+42 d^5 x^{5/2} \operatorname {PolyLog}\left (3,e^{i \left (c+d \sqrt {x}\right )}\right )-210 i d^4 x^2 \operatorname {PolyLog}\left (4,-e^{i \left (c+d \sqrt {x}\right )}\right )+210 i d^4 x^2 \operatorname {PolyLog}\left (4,e^{i \left (c+d \sqrt {x}\right )}\right )+840 d^3 x^{3/2} \operatorname {PolyLog}\left (5,-e^{i \left (c+d \sqrt {x}\right )}\right )-840 d^3 x^{3/2} \operatorname {PolyLog}\left (5,e^{i \left (c+d \sqrt {x}\right )}\right )+2520 i d^2 x \operatorname {PolyLog}\left (6,-e^{i \left (c+d \sqrt {x}\right )}\right )-2520 i d^2 x \operatorname {PolyLog}\left (6,e^{i \left (c+d \sqrt {x}\right )}\right )-5040 d \sqrt {x} \operatorname {PolyLog}\left (7,-e^{i \left (c+d \sqrt {x}\right )}\right )+5040 d \sqrt {x} \operatorname {PolyLog}\left (7,e^{i \left (c+d \sqrt {x}\right )}\right )-5040 i \operatorname {PolyLog}\left (8,-e^{i \left (c+d \sqrt {x}\right )}\right )+5040 i \operatorname {PolyLog}\left (8,e^{i \left (c+d \sqrt {x}\right )}\right )\right )}{d^8} \] Input:

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

Output:

(a*x^4)/4 + (2*b*(d^7*x^(7/2)*Log[1 - E^(I*(c + d*Sqrt[x]))] - d^7*x^(7/2) 
*Log[1 + E^(I*(c + d*Sqrt[x]))] + (7*I)*d^6*x^3*PolyLog[2, -E^(I*(c + d*Sq 
rt[x]))] - (7*I)*d^6*x^3*PolyLog[2, E^(I*(c + d*Sqrt[x]))] - 42*d^5*x^(5/2 
)*PolyLog[3, -E^(I*(c + d*Sqrt[x]))] + 42*d^5*x^(5/2)*PolyLog[3, E^(I*(c + 
 d*Sqrt[x]))] - (210*I)*d^4*x^2*PolyLog[4, -E^(I*(c + d*Sqrt[x]))] + (210* 
I)*d^4*x^2*PolyLog[4, E^(I*(c + d*Sqrt[x]))] + 840*d^3*x^(3/2)*PolyLog[5, 
-E^(I*(c + d*Sqrt[x]))] - 840*d^3*x^(3/2)*PolyLog[5, E^(I*(c + d*Sqrt[x])) 
] + (2520*I)*d^2*x*PolyLog[6, -E^(I*(c + d*Sqrt[x]))] - (2520*I)*d^2*x*Pol 
yLog[6, E^(I*(c + d*Sqrt[x]))] - 5040*d*Sqrt[x]*PolyLog[7, -E^(I*(c + d*Sq 
rt[x]))] + 5040*d*Sqrt[x]*PolyLog[7, E^(I*(c + d*Sqrt[x]))] - (5040*I)*Pol 
yLog[8, -E^(I*(c + d*Sqrt[x]))] + (5040*I)*PolyLog[8, E^(I*(c + d*Sqrt[x]) 
)]))/d^8
 

Rubi [A] (verified)

Time = 0.74 (sec) , antiderivative size = 432, 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 \csc \left (c+d \sqrt {x}\right )\right ) \, dx\)

\(\Big \downarrow \) 2010

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

\(\Big \downarrow \) 2009

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

Input:

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

Output:

(a*x^4)/4 - (4*b*x^(7/2)*ArcTanh[E^(I*(c + d*Sqrt[x]))])/d + ((14*I)*b*x^3 
*PolyLog[2, -E^(I*(c + d*Sqrt[x]))])/d^2 - ((14*I)*b*x^3*PolyLog[2, E^(I*( 
c + d*Sqrt[x]))])/d^2 - (84*b*x^(5/2)*PolyLog[3, -E^(I*(c + d*Sqrt[x]))])/ 
d^3 + (84*b*x^(5/2)*PolyLog[3, E^(I*(c + d*Sqrt[x]))])/d^3 - ((420*I)*b*x^ 
2*PolyLog[4, -E^(I*(c + d*Sqrt[x]))])/d^4 + ((420*I)*b*x^2*PolyLog[4, E^(I 
*(c + d*Sqrt[x]))])/d^4 + (1680*b*x^(3/2)*PolyLog[5, -E^(I*(c + d*Sqrt[x]) 
)])/d^5 - (1680*b*x^(3/2)*PolyLog[5, E^(I*(c + d*Sqrt[x]))])/d^5 + ((5040* 
I)*b*x*PolyLog[6, -E^(I*(c + d*Sqrt[x]))])/d^6 - ((5040*I)*b*x*PolyLog[6, 
E^(I*(c + d*Sqrt[x]))])/d^6 - (10080*b*Sqrt[x]*PolyLog[7, -E^(I*(c + d*Sqr 
t[x]))])/d^7 + (10080*b*Sqrt[x]*PolyLog[7, E^(I*(c + d*Sqrt[x]))])/d^7 - ( 
(10080*I)*b*PolyLog[8, -E^(I*(c + d*Sqrt[x]))])/d^8 + ((10080*I)*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 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 \csc \left (c +d \sqrt {x}\right )\right )d x\]

Input:

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

Output:

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

Fricas [F]

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

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

Output:

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

Sympy [F]

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

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

Output:

Integral(x**3*(a + b*csc(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. 1498 vs. \(2 (338) = 676\).

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

integrate(x^3*(a+b*csc(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(cot(d*sqrt(x) + c) + csc(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(sin(d*sqrt(x) + c), cos( 
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* 
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(sin(d*sqrt(x) + c), -cos(d*sqrt(x) + c) + 1) + 56*(I*(d*sqr 
t(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(-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(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)^2...
 

Giac [F]

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

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

Output:

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

Mupad [F(-1)]

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

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

Output:

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

Reduce [F]

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

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

Output:

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