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

Optimal result
Mathematica [A] (verified)
Rubi [A] (verified)
Maple [A] (verified)
Fricas [A] (verification not implemented)
Sympy [B] (verification not implemented)
Maxima [B] (verification not implemented)
Giac [A] (verification not implemented)
Mupad [B] (verification not implemented)
Reduce [B] (verification not implemented)

Optimal result

Integrand size = 20, antiderivative size = 148 \[ \int \left (c+\frac {d}{x}\right )^{3/2} x^2 (a+b x) \, dx=\frac {d^2 (8 a c-3 b d) \sqrt {c+\frac {d}{x}} x}{64 c^2}+\frac {d (56 a c+3 b d) \sqrt {c+\frac {d}{x}} x^2}{96 c}+\frac {1}{24} (8 a c+3 b d) \sqrt {c+\frac {d}{x}} x^3+\frac {1}{4} b \left (c+\frac {d}{x}\right )^{3/2} x^4-\frac {d^3 (8 a c-3 b d) \text {arctanh}\left (\frac {\sqrt {c+\frac {d}{x}}}{\sqrt {c}}\right )}{64 c^{5/2}} \] Output:

1/64*d^2*(8*a*c-3*b*d)*(c+d/x)^(1/2)*x/c^2+1/96*d*(56*a*c+3*b*d)*(c+d/x)^( 
1/2)*x^2/c+1/24*(8*a*c+3*b*d)*(c+d/x)^(1/2)*x^3+1/4*b*(c+d/x)^(3/2)*x^4-1/ 
64*d^3*(8*a*c-3*b*d)*arctanh((c+d/x)^(1/2)/c^(1/2))/c^(5/2)
 

Mathematica [A] (verified)

Time = 0.21 (sec) , antiderivative size = 117, normalized size of antiderivative = 0.79 \[ \int \left (c+\frac {d}{x}\right )^{3/2} x^2 (a+b x) \, dx=\frac {\sqrt {c} \sqrt {c+\frac {d}{x}} x \left (8 a c \left (3 d^2+14 c d x+8 c^2 x^2\right )+3 b \left (-3 d^3+2 c d^2 x+24 c^2 d x^2+16 c^3 x^3\right )\right )+3 d^3 (-8 a c+3 b d) \text {arctanh}\left (\frac {\sqrt {c+\frac {d}{x}}}{\sqrt {c}}\right )}{192 c^{5/2}} \] Input:

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

Output:

(Sqrt[c]*Sqrt[c + d/x]*x*(8*a*c*(3*d^2 + 14*c*d*x + 8*c^2*x^2) + 3*b*(-3*d 
^3 + 2*c*d^2*x + 24*c^2*d*x^2 + 16*c^3*x^3)) + 3*d^3*(-8*a*c + 3*b*d)*ArcT 
anh[Sqrt[c + d/x]/Sqrt[c]])/(192*c^(5/2))
 

Rubi [A] (verified)

Time = 0.42 (sec) , antiderivative size = 130, normalized size of antiderivative = 0.88, number of steps used = 9, number of rules used = 8, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.400, Rules used = {1016, 948, 87, 51, 51, 52, 73, 221}

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^2 (a+b x) \left (c+\frac {d}{x}\right )^{3/2} \, dx\)

\(\Big \downarrow \) 1016

\(\displaystyle \int x^3 \left (\frac {a}{x}+b\right ) \left (c+\frac {d}{x}\right )^{3/2}dx\)

\(\Big \downarrow \) 948

\(\displaystyle -\int \left (\frac {a}{x}+b\right ) \left (c+\frac {d}{x}\right )^{3/2} x^5d\frac {1}{x}\)

\(\Big \downarrow \) 87

\(\displaystyle \frac {b x^4 \left (c+\frac {d}{x}\right )^{5/2}}{4 c}-\frac {(8 a c-3 b d) \int \left (c+\frac {d}{x}\right )^{3/2} x^4d\frac {1}{x}}{8 c}\)

\(\Big \downarrow \) 51

\(\displaystyle \frac {b x^4 \left (c+\frac {d}{x}\right )^{5/2}}{4 c}-\frac {(8 a c-3 b d) \left (\frac {1}{2} d \int \sqrt {c+\frac {d}{x}} x^3d\frac {1}{x}-\frac {1}{3} x^3 \left (c+\frac {d}{x}\right )^{3/2}\right )}{8 c}\)

\(\Big \downarrow \) 51

\(\displaystyle \frac {b x^4 \left (c+\frac {d}{x}\right )^{5/2}}{4 c}-\frac {(8 a c-3 b d) \left (\frac {1}{2} d \left (\frac {1}{4} d \int \frac {x^2}{\sqrt {c+\frac {d}{x}}}d\frac {1}{x}-\frac {1}{2} x^2 \sqrt {c+\frac {d}{x}}\right )-\frac {1}{3} x^3 \left (c+\frac {d}{x}\right )^{3/2}\right )}{8 c}\)

\(\Big \downarrow \) 52

\(\displaystyle \frac {b x^4 \left (c+\frac {d}{x}\right )^{5/2}}{4 c}-\frac {(8 a c-3 b d) \left (\frac {1}{2} d \left (\frac {1}{4} d \left (-\frac {d \int \frac {x}{\sqrt {c+\frac {d}{x}}}d\frac {1}{x}}{2 c}-\frac {x \sqrt {c+\frac {d}{x}}}{c}\right )-\frac {1}{2} x^2 \sqrt {c+\frac {d}{x}}\right )-\frac {1}{3} x^3 \left (c+\frac {d}{x}\right )^{3/2}\right )}{8 c}\)

\(\Big \downarrow \) 73

\(\displaystyle \frac {b x^4 \left (c+\frac {d}{x}\right )^{5/2}}{4 c}-\frac {(8 a c-3 b d) \left (\frac {1}{2} d \left (\frac {1}{4} d \left (-\frac {\int \frac {1}{\frac {1}{d x^2}-\frac {c}{d}}d\sqrt {c+\frac {d}{x}}}{c}-\frac {x \sqrt {c+\frac {d}{x}}}{c}\right )-\frac {1}{2} x^2 \sqrt {c+\frac {d}{x}}\right )-\frac {1}{3} x^3 \left (c+\frac {d}{x}\right )^{3/2}\right )}{8 c}\)

\(\Big \downarrow \) 221

\(\displaystyle \frac {b x^4 \left (c+\frac {d}{x}\right )^{5/2}}{4 c}-\frac {(8 a c-3 b d) \left (\frac {1}{2} d \left (\frac {1}{4} d \left (\frac {d \text {arctanh}\left (\frac {\sqrt {c+\frac {d}{x}}}{\sqrt {c}}\right )}{c^{3/2}}-\frac {x \sqrt {c+\frac {d}{x}}}{c}\right )-\frac {1}{2} x^2 \sqrt {c+\frac {d}{x}}\right )-\frac {1}{3} x^3 \left (c+\frac {d}{x}\right )^{3/2}\right )}{8 c}\)

Input:

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

Output:

(b*(c + d/x)^(5/2)*x^4)/(4*c) - ((8*a*c - 3*b*d)*(-1/3*((c + d/x)^(3/2)*x^ 
3) + (d*(-1/2*(Sqrt[c + d/x]*x^2) + (d*(-((Sqrt[c + d/x]*x)/c) + (d*ArcTan 
h[Sqrt[c + d/x]/Sqrt[c]])/c^(3/2)))/4))/2))/(8*c)
 

Defintions of rubi rules used

rule 51
Int[((a_.) + (b_.)*(x_))^(m_)*((c_.) + (d_.)*(x_))^(n_), x_Symbol] :> Simp[ 
(a + b*x)^(m + 1)*((c + d*x)^n/(b*(m + 1))), x] - Simp[d*(n/(b*(m + 1))) 
Int[(a + b*x)^(m + 1)*(c + d*x)^(n - 1), x], x] /; FreeQ[{a, b, c, d, n}, x 
] && ILtQ[m, -1] && FractionQ[n] && GtQ[n, 0]
 

rule 52
Int[((a_.) + (b_.)*(x_))^(m_)*((c_.) + (d_.)*(x_))^(n_), x_Symbol] :> Simp[ 
(a + b*x)^(m + 1)*((c + d*x)^(n + 1)/((b*c - a*d)*(m + 1))), x] - Simp[d*(( 
m + n + 2)/((b*c - a*d)*(m + 1)))   Int[(a + b*x)^(m + 1)*(c + d*x)^n, x], 
x] /; FreeQ[{a, b, c, d, n}, x] && ILtQ[m, -1] && FractionQ[n] && LtQ[n, 0]
 

rule 73
Int[((a_.) + (b_.)*(x_))^(m_)*((c_.) + (d_.)*(x_))^(n_), x_Symbol] :> With[ 
{p = Denominator[m]}, Simp[p/b   Subst[Int[x^(p*(m + 1) - 1)*(c - a*(d/b) + 
 d*(x^p/b))^n, x], x, (a + b*x)^(1/p)], x]] /; FreeQ[{a, b, c, d}, x] && Lt 
Q[-1, m, 0] && LeQ[-1, n, 0] && LeQ[Denominator[n], Denominator[m]] && IntL 
inearQ[a, b, c, d, m, n, x]
 

rule 87
Int[((a_.) + (b_.)*(x_))*((c_.) + (d_.)*(x_))^(n_.)*((e_.) + (f_.)*(x_))^(p 
_.), x_] :> Simp[(-(b*e - a*f))*(c + d*x)^(n + 1)*((e + f*x)^(p + 1)/(f*(p 
+ 1)*(c*f - d*e))), x] - Simp[(a*d*f*(n + p + 2) - b*(d*e*(n + 1) + c*f*(p 
+ 1)))/(f*(p + 1)*(c*f - d*e))   Int[(c + d*x)^n*(e + f*x)^(p + 1), x], x] 
/; FreeQ[{a, b, c, d, e, f, n}, x] && LtQ[p, -1] && ( !LtQ[n, -1] || Intege 
rQ[p] ||  !(IntegerQ[n] ||  !(EqQ[e, 0] ||  !(EqQ[c, 0] || LtQ[p, n]))))
 

rule 221
Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(Rt[-a/b, 2]/a)*ArcTanh[x 
/Rt[-a/b, 2]], x] /; FreeQ[{a, b}, x] && NegQ[a/b]
 

rule 948
Int[(x_)^(m_.)*((a_) + (b_.)*(x_)^(n_))^(p_.)*((c_) + (d_.)*(x_)^(n_))^(q_. 
), x_Symbol] :> Simp[1/n   Subst[Int[x^(Simplify[(m + 1)/n] - 1)*(a + b*x)^ 
p*(c + d*x)^q, x], x, x^n], x] /; FreeQ[{a, b, c, d, m, n, p, q}, x] && NeQ 
[b*c - a*d, 0] && IntegerQ[Simplify[(m + 1)/n]]
 

rule 1016
Int[(x_)^(m_.)*((c_) + (d_.)*(x_)^(mn_.))^(q_.)*((a_) + (b_.)*(x_)^(n_.))^( 
p_.), x_Symbol] :> Int[x^(m - n*q)*(a + b*x^n)^p*(d + c*x^n)^q, x] /; FreeQ 
[{a, b, c, d, m, n, p}, x] && EqQ[mn, -n] && IntegerQ[q] && (PosQ[n] ||  !I 
ntegerQ[p])
 
Maple [A] (verified)

Time = 0.07 (sec) , antiderivative size = 145, normalized size of antiderivative = 0.98

method result size
risch \(\frac {\left (48 b \,c^{3} x^{3}+64 a \,c^{3} x^{2}+72 b \,c^{2} d \,x^{2}+112 a d x \,c^{2}+6 x b c \,d^{2}+24 a \,d^{2} c -9 b \,d^{3}\right ) x \sqrt {\frac {c x +d}{x}}}{192 c^{2}}-\frac {d^{3} \left (8 a c -3 b d \right ) \ln \left (\frac {\frac {d}{2}+c x}{\sqrt {c}}+\sqrt {c \,x^{2}+d x}\right ) \sqrt {\frac {c x +d}{x}}\, \sqrt {\left (c x +d \right ) x}}{128 c^{\frac {5}{2}} \left (c x +d \right )}\) \(145\)
default \(\frac {\sqrt {\frac {c x +d}{x}}\, x \left (96 \left (c \,x^{2}+d x \right )^{\frac {3}{2}} c^{\frac {7}{2}} b x +128 \left (c \,x^{2}+d x \right )^{\frac {3}{2}} c^{\frac {7}{2}} a +48 \left (c \,x^{2}+d x \right )^{\frac {3}{2}} c^{\frac {5}{2}} b d +96 \sqrt {c \,x^{2}+d x}\, c^{\frac {7}{2}} a d x -36 \sqrt {c \,x^{2}+d x}\, c^{\frac {5}{2}} b \,d^{2} x +48 \sqrt {c \,x^{2}+d x}\, c^{\frac {5}{2}} a \,d^{2}-18 \sqrt {c \,x^{2}+d x}\, c^{\frac {3}{2}} b \,d^{3}-24 \ln \left (\frac {2 \sqrt {c \,x^{2}+d x}\, \sqrt {c}+2 c x +d}{2 \sqrt {c}}\right ) a \,c^{2} d^{3}+9 \ln \left (\frac {2 \sqrt {c \,x^{2}+d x}\, \sqrt {c}+2 c x +d}{2 \sqrt {c}}\right ) b c \,d^{4}\right )}{384 c^{\frac {7}{2}} \sqrt {\left (c x +d \right ) x}}\) \(233\)

Input:

int((c+d/x)^(3/2)*x^2*(b*x+a),x,method=_RETURNVERBOSE)
 

Output:

1/192/c^2*(48*b*c^3*x^3+64*a*c^3*x^2+72*b*c^2*d*x^2+112*a*c^2*d*x+6*b*c*d^ 
2*x+24*a*c*d^2-9*b*d^3)*x*((c*x+d)/x)^(1/2)-1/128*d^3*(8*a*c-3*b*d)/c^(5/2 
)*ln((1/2*d+c*x)/c^(1/2)+(c*x^2+d*x)^(1/2))/(c*x+d)*((c*x+d)/x)^(1/2)*((c* 
x+d)*x)^(1/2)
 

Fricas [A] (verification not implemented)

Time = 0.11 (sec) , antiderivative size = 270, normalized size of antiderivative = 1.82 \[ \int \left (c+\frac {d}{x}\right )^{3/2} x^2 (a+b x) \, dx=\left [-\frac {3 \, {\left (8 \, a c d^{3} - 3 \, b d^{4}\right )} \sqrt {c} \log \left (2 \, c x + 2 \, \sqrt {c} x \sqrt {\frac {c x + d}{x}} + d\right ) - 2 \, {\left (48 \, b c^{4} x^{4} + 8 \, {\left (8 \, a c^{4} + 9 \, b c^{3} d\right )} x^{3} + 2 \, {\left (56 \, a c^{3} d + 3 \, b c^{2} d^{2}\right )} x^{2} + 3 \, {\left (8 \, a c^{2} d^{2} - 3 \, b c d^{3}\right )} x\right )} \sqrt {\frac {c x + d}{x}}}{384 \, c^{3}}, \frac {3 \, {\left (8 \, a c d^{3} - 3 \, b d^{4}\right )} \sqrt {-c} \arctan \left (\frac {\sqrt {-c} x \sqrt {\frac {c x + d}{x}}}{c x + d}\right ) + {\left (48 \, b c^{4} x^{4} + 8 \, {\left (8 \, a c^{4} + 9 \, b c^{3} d\right )} x^{3} + 2 \, {\left (56 \, a c^{3} d + 3 \, b c^{2} d^{2}\right )} x^{2} + 3 \, {\left (8 \, a c^{2} d^{2} - 3 \, b c d^{3}\right )} x\right )} \sqrt {\frac {c x + d}{x}}}{192 \, c^{3}}\right ] \] Input:

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

Output:

[-1/384*(3*(8*a*c*d^3 - 3*b*d^4)*sqrt(c)*log(2*c*x + 2*sqrt(c)*x*sqrt((c*x 
 + d)/x) + d) - 2*(48*b*c^4*x^4 + 8*(8*a*c^4 + 9*b*c^3*d)*x^3 + 2*(56*a*c^ 
3*d + 3*b*c^2*d^2)*x^2 + 3*(8*a*c^2*d^2 - 3*b*c*d^3)*x)*sqrt((c*x + d)/x)) 
/c^3, 1/192*(3*(8*a*c*d^3 - 3*b*d^4)*sqrt(-c)*arctan(sqrt(-c)*x*sqrt((c*x 
+ d)/x)/(c*x + d)) + (48*b*c^4*x^4 + 8*(8*a*c^4 + 9*b*c^3*d)*x^3 + 2*(56*a 
*c^3*d + 3*b*c^2*d^2)*x^2 + 3*(8*a*c^2*d^2 - 3*b*c*d^3)*x)*sqrt((c*x + d)/ 
x))/c^3]
 

Sympy [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 298 vs. \(2 (128) = 256\).

Time = 30.17 (sec) , antiderivative size = 298, normalized size of antiderivative = 2.01 \[ \int \left (c+\frac {d}{x}\right )^{3/2} x^2 (a+b x) \, dx=\frac {a c^{2} x^{\frac {7}{2}}}{3 \sqrt {d} \sqrt {\frac {c x}{d} + 1}} + \frac {11 a c \sqrt {d} x^{\frac {5}{2}}}{12 \sqrt {\frac {c x}{d} + 1}} + \frac {17 a d^{\frac {3}{2}} x^{\frac {3}{2}}}{24 \sqrt {\frac {c x}{d} + 1}} + \frac {a d^{\frac {5}{2}} \sqrt {x}}{8 c \sqrt {\frac {c x}{d} + 1}} - \frac {a d^{3} \operatorname {asinh}{\left (\frac {\sqrt {c} \sqrt {x}}{\sqrt {d}} \right )}}{8 c^{\frac {3}{2}}} + \frac {b c^{2} x^{\frac {9}{2}}}{4 \sqrt {d} \sqrt {\frac {c x}{d} + 1}} + \frac {5 b c \sqrt {d} x^{\frac {7}{2}}}{8 \sqrt {\frac {c x}{d} + 1}} + \frac {13 b d^{\frac {3}{2}} x^{\frac {5}{2}}}{32 \sqrt {\frac {c x}{d} + 1}} - \frac {b d^{\frac {5}{2}} x^{\frac {3}{2}}}{64 c \sqrt {\frac {c x}{d} + 1}} - \frac {3 b d^{\frac {7}{2}} \sqrt {x}}{64 c^{2} \sqrt {\frac {c x}{d} + 1}} + \frac {3 b d^{4} \operatorname {asinh}{\left (\frac {\sqrt {c} \sqrt {x}}{\sqrt {d}} \right )}}{64 c^{\frac {5}{2}}} \] Input:

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

Output:

a*c**2*x**(7/2)/(3*sqrt(d)*sqrt(c*x/d + 1)) + 11*a*c*sqrt(d)*x**(5/2)/(12* 
sqrt(c*x/d + 1)) + 17*a*d**(3/2)*x**(3/2)/(24*sqrt(c*x/d + 1)) + a*d**(5/2 
)*sqrt(x)/(8*c*sqrt(c*x/d + 1)) - a*d**3*asinh(sqrt(c)*sqrt(x)/sqrt(d))/(8 
*c**(3/2)) + b*c**2*x**(9/2)/(4*sqrt(d)*sqrt(c*x/d + 1)) + 5*b*c*sqrt(d)*x 
**(7/2)/(8*sqrt(c*x/d + 1)) + 13*b*d**(3/2)*x**(5/2)/(32*sqrt(c*x/d + 1)) 
- b*d**(5/2)*x**(3/2)/(64*c*sqrt(c*x/d + 1)) - 3*b*d**(7/2)*sqrt(x)/(64*c* 
*2*sqrt(c*x/d + 1)) + 3*b*d**4*asinh(sqrt(c)*sqrt(x)/sqrt(d))/(64*c**(5/2) 
)
 

Maxima [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 308 vs. \(2 (124) = 248\).

Time = 0.12 (sec) , antiderivative size = 308, normalized size of antiderivative = 2.08 \[ \int \left (c+\frac {d}{x}\right )^{3/2} x^2 (a+b x) \, dx=\frac {1}{48} \, {\left (\frac {3 \, d^{3} \log \left (\frac {\sqrt {c + \frac {d}{x}} - \sqrt {c}}{\sqrt {c + \frac {d}{x}} + \sqrt {c}}\right )}{c^{\frac {3}{2}}} + \frac {2 \, {\left (3 \, {\left (c + \frac {d}{x}\right )}^{\frac {5}{2}} d^{3} + 8 \, {\left (c + \frac {d}{x}\right )}^{\frac {3}{2}} c d^{3} - 3 \, \sqrt {c + \frac {d}{x}} c^{2} d^{3}\right )}}{{\left (c + \frac {d}{x}\right )}^{3} c - 3 \, {\left (c + \frac {d}{x}\right )}^{2} c^{2} + 3 \, {\left (c + \frac {d}{x}\right )} c^{3} - c^{4}}\right )} a - \frac {1}{128} \, {\left (\frac {3 \, d^{4} \log \left (\frac {\sqrt {c + \frac {d}{x}} - \sqrt {c}}{\sqrt {c + \frac {d}{x}} + \sqrt {c}}\right )}{c^{\frac {5}{2}}} + \frac {2 \, {\left (3 \, {\left (c + \frac {d}{x}\right )}^{\frac {7}{2}} d^{4} - 11 \, {\left (c + \frac {d}{x}\right )}^{\frac {5}{2}} c d^{4} - 11 \, {\left (c + \frac {d}{x}\right )}^{\frac {3}{2}} c^{2} d^{4} + 3 \, \sqrt {c + \frac {d}{x}} c^{3} d^{4}\right )}}{{\left (c + \frac {d}{x}\right )}^{4} c^{2} - 4 \, {\left (c + \frac {d}{x}\right )}^{3} c^{3} + 6 \, {\left (c + \frac {d}{x}\right )}^{2} c^{4} - 4 \, {\left (c + \frac {d}{x}\right )} c^{5} + c^{6}}\right )} b \] Input:

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

Output:

1/48*(3*d^3*log((sqrt(c + d/x) - sqrt(c))/(sqrt(c + d/x) + sqrt(c)))/c^(3/ 
2) + 2*(3*(c + d/x)^(5/2)*d^3 + 8*(c + d/x)^(3/2)*c*d^3 - 3*sqrt(c + d/x)* 
c^2*d^3)/((c + d/x)^3*c - 3*(c + d/x)^2*c^2 + 3*(c + d/x)*c^3 - c^4))*a - 
1/128*(3*d^4*log((sqrt(c + d/x) - sqrt(c))/(sqrt(c + d/x) + sqrt(c)))/c^(5 
/2) + 2*(3*(c + d/x)^(7/2)*d^4 - 11*(c + d/x)^(5/2)*c*d^4 - 11*(c + d/x)^( 
3/2)*c^2*d^4 + 3*sqrt(c + d/x)*c^3*d^4)/((c + d/x)^4*c^2 - 4*(c + d/x)^3*c 
^3 + 6*(c + d/x)^2*c^4 - 4*(c + d/x)*c^5 + c^6))*b
 

Giac [A] (verification not implemented)

Time = 0.13 (sec) , antiderivative size = 181, normalized size of antiderivative = 1.22 \[ \int \left (c+\frac {d}{x}\right )^{3/2} x^2 (a+b x) \, dx=\frac {1}{192} \, \sqrt {c x^{2} + d x} {\left (2 \, {\left (4 \, {\left (6 \, b c x \mathrm {sgn}\left (x\right ) + \frac {8 \, a c^{4} \mathrm {sgn}\left (x\right ) + 9 \, b c^{3} d \mathrm {sgn}\left (x\right )}{c^{3}}\right )} x + \frac {56 \, a c^{3} d \mathrm {sgn}\left (x\right ) + 3 \, b c^{2} d^{2} \mathrm {sgn}\left (x\right )}{c^{3}}\right )} x + \frac {3 \, {\left (8 \, a c^{2} d^{2} \mathrm {sgn}\left (x\right ) - 3 \, b c d^{3} \mathrm {sgn}\left (x\right )\right )}}{c^{3}}\right )} + \frac {{\left (8 \, a c d^{3} \mathrm {sgn}\left (x\right ) - 3 \, b d^{4} \mathrm {sgn}\left (x\right )\right )} \log \left ({\left | 2 \, {\left (\sqrt {c} x - \sqrt {c x^{2} + d x}\right )} \sqrt {c} + d \right |}\right )}{128 \, c^{\frac {5}{2}}} - \frac {{\left (8 \, a c d^{3} \log \left ({\left | d \right |}\right ) - 3 \, b d^{4} \log \left ({\left | d \right |}\right )\right )} \mathrm {sgn}\left (x\right )}{128 \, c^{\frac {5}{2}}} \] Input:

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

Output:

1/192*sqrt(c*x^2 + d*x)*(2*(4*(6*b*c*x*sgn(x) + (8*a*c^4*sgn(x) + 9*b*c^3* 
d*sgn(x))/c^3)*x + (56*a*c^3*d*sgn(x) + 3*b*c^2*d^2*sgn(x))/c^3)*x + 3*(8* 
a*c^2*d^2*sgn(x) - 3*b*c*d^3*sgn(x))/c^3) + 1/128*(8*a*c*d^3*sgn(x) - 3*b* 
d^4*sgn(x))*log(abs(2*(sqrt(c)*x - sqrt(c*x^2 + d*x))*sqrt(c) + d))/c^(5/2 
) - 1/128*(8*a*c*d^3*log(abs(d)) - 3*b*d^4*log(abs(d)))*sgn(x)/c^(5/2)
 

Mupad [B] (verification not implemented)

Time = 7.42 (sec) , antiderivative size = 169, normalized size of antiderivative = 1.14 \[ \int \left (c+\frac {d}{x}\right )^{3/2} x^2 (a+b x) \, dx=\frac {a\,x^3\,{\left (c+\frac {d}{x}\right )}^{3/2}}{3}+\frac {11\,b\,x^4\,{\left (c+\frac {d}{x}\right )}^{3/2}}{64}+\frac {a\,x^3\,{\left (c+\frac {d}{x}\right )}^{5/2}}{8\,c}+\frac {11\,b\,x^4\,{\left (c+\frac {d}{x}\right )}^{5/2}}{64\,c}-\frac {3\,b\,x^4\,{\left (c+\frac {d}{x}\right )}^{7/2}}{64\,c^2}-\frac {a\,c\,x^3\,\sqrt {c+\frac {d}{x}}}{8}-\frac {3\,b\,c\,x^4\,\sqrt {c+\frac {d}{x}}}{64}+\frac {a\,d^3\,\mathrm {atan}\left (\frac {\sqrt {c+\frac {d}{x}}\,1{}\mathrm {i}}{\sqrt {c}}\right )\,1{}\mathrm {i}}{8\,c^{3/2}}-\frac {b\,d^4\,\mathrm {atan}\left (\frac {\sqrt {c+\frac {d}{x}}\,1{}\mathrm {i}}{\sqrt {c}}\right )\,3{}\mathrm {i}}{64\,c^{5/2}} \] Input:

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

Output:

(a*x^3*(c + d/x)^(3/2))/3 + (11*b*x^4*(c + d/x)^(3/2))/64 + (a*x^3*(c + d/ 
x)^(5/2))/(8*c) + (11*b*x^4*(c + d/x)^(5/2))/(64*c) - (3*b*x^4*(c + d/x)^( 
7/2))/(64*c^2) + (a*d^3*atan(((c + d/x)^(1/2)*1i)/c^(1/2))*1i)/(8*c^(3/2)) 
 - (b*d^4*atan(((c + d/x)^(1/2)*1i)/c^(1/2))*3i)/(64*c^(5/2)) - (a*c*x^3*( 
c + d/x)^(1/2))/8 - (3*b*c*x^4*(c + d/x)^(1/2))/64
 

Reduce [B] (verification not implemented)

Time = 0.16 (sec) , antiderivative size = 177, normalized size of antiderivative = 1.20 \[ \int \left (c+\frac {d}{x}\right )^{3/2} x^2 (a+b x) \, dx=\frac {64 \sqrt {x}\, \sqrt {c x +d}\, a \,c^{4} x^{2}+112 \sqrt {x}\, \sqrt {c x +d}\, a \,c^{3} d x +24 \sqrt {x}\, \sqrt {c x +d}\, a \,c^{2} d^{2}+48 \sqrt {x}\, \sqrt {c x +d}\, b \,c^{4} x^{3}+72 \sqrt {x}\, \sqrt {c x +d}\, b \,c^{3} d \,x^{2}+6 \sqrt {x}\, \sqrt {c x +d}\, b \,c^{2} d^{2} x -9 \sqrt {x}\, \sqrt {c x +d}\, b c \,d^{3}-24 \sqrt {c}\, \mathrm {log}\left (\frac {\sqrt {c x +d}+\sqrt {x}\, \sqrt {c}}{\sqrt {d}}\right ) a c \,d^{3}+9 \sqrt {c}\, \mathrm {log}\left (\frac {\sqrt {c x +d}+\sqrt {x}\, \sqrt {c}}{\sqrt {d}}\right ) b \,d^{4}}{192 c^{3}} \] Input:

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

Output:

(64*sqrt(x)*sqrt(c*x + d)*a*c**4*x**2 + 112*sqrt(x)*sqrt(c*x + d)*a*c**3*d 
*x + 24*sqrt(x)*sqrt(c*x + d)*a*c**2*d**2 + 48*sqrt(x)*sqrt(c*x + d)*b*c** 
4*x**3 + 72*sqrt(x)*sqrt(c*x + d)*b*c**3*d*x**2 + 6*sqrt(x)*sqrt(c*x + d)* 
b*c**2*d**2*x - 9*sqrt(x)*sqrt(c*x + d)*b*c*d**3 - 24*sqrt(c)*log((sqrt(c* 
x + d) + sqrt(x)*sqrt(c))/sqrt(d))*a*c*d**3 + 9*sqrt(c)*log((sqrt(c*x + d) 
 + sqrt(x)*sqrt(c))/sqrt(d))*b*d**4)/(192*c**3)