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

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

Optimal result

Integrand size = 26, antiderivative size = 93 \[ \int \frac {(c+d x)^2}{x \sqrt {a x^2+b x^3}} \, dx=-\frac {c^2 \sqrt {a x^2+b x^3}}{a x^2}+\frac {2 d^2 \sqrt {a x^2+b x^3}}{b x}+\frac {c (b c-4 a d) \text {arctanh}\left (\frac {\sqrt {a x^2+b x^3}}{\sqrt {a} x}\right )}{a^{3/2}} \] Output:

-c^2*(b*x^3+a*x^2)^(1/2)/a/x^2+2*d^2*(b*x^3+a*x^2)^(1/2)/b/x+c*(-4*a*d+b*c 
)*arctanh((b*x^3+a*x^2)^(1/2)/a^(1/2)/x)/a^(3/2)
 

Mathematica [A] (verified)

Time = 0.12 (sec) , antiderivative size = 85, normalized size of antiderivative = 0.91 \[ \int \frac {(c+d x)^2}{x \sqrt {a x^2+b x^3}} \, dx=\frac {\sqrt {a} (a+b x) \left (-b c^2+2 a d^2 x\right )+b c (b c-4 a d) x \sqrt {a+b x} \text {arctanh}\left (\frac {\sqrt {a+b x}}{\sqrt {a}}\right )}{a^{3/2} b \sqrt {x^2 (a+b x)}} \] Input:

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

Output:

(Sqrt[a]*(a + b*x)*(-(b*c^2) + 2*a*d^2*x) + b*c*(b*c - 4*a*d)*x*Sqrt[a + b 
*x]*ArcTanh[Sqrt[a + b*x]/Sqrt[a]])/(a^(3/2)*b*Sqrt[x^2*(a + b*x)])
 

Rubi [A] (verified)

Time = 0.41 (sec) , antiderivative size = 105, normalized size of antiderivative = 1.13, number of steps used = 7, number of rules used = 6, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.231, Rules used = {1948, 100, 27, 90, 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 \frac {(c+d x)^2}{x \sqrt {a x^2+b x^3}} \, dx\)

\(\Big \downarrow \) 1948

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

\(\Big \downarrow \) 100

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

\(\Big \downarrow \) 27

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

\(\Big \downarrow \) 90

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

\(\Big \downarrow \) 73

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

\(\Big \downarrow \) 221

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

Input:

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

Output:

(x*Sqrt[a + b*x]*(-((c^2*Sqrt[a + b*x])/(a*x)) - ((-4*a*d^2*Sqrt[a + b*x]) 
/b - (2*c*(b*c - 4*a*d)*ArcTanh[Sqrt[a + b*x]/Sqrt[a]])/Sqrt[a])/(2*a)))/S 
qrt[a*x^2 + b*x^3]
 

Defintions of rubi rules used

rule 27
Int[(a_)*(Fx_), x_Symbol] :> Simp[a   Int[Fx, x], x] /; FreeQ[a, x] &&  !Ma 
tchQ[Fx, (b_)*(Gx_) /; FreeQ[b, x]]
 

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 90
Int[((a_.) + (b_.)*(x_))*((c_.) + (d_.)*(x_))^(n_.)*((e_.) + (f_.)*(x_))^(p 
_.), x_] :> Simp[b*(c + d*x)^(n + 1)*((e + f*x)^(p + 1)/(d*f*(n + p + 2))), 
 x] + Simp[(a*d*f*(n + p + 2) - b*(d*e*(n + 1) + c*f*(p + 1)))/(d*f*(n + p 
+ 2))   Int[(c + d*x)^n*(e + f*x)^p, x], x] /; FreeQ[{a, b, c, d, e, f, n, 
p}, x] && NeQ[n + p + 2, 0]
 

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

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 1948
Int[((e_.)*(x_))^(m_.)*((a_.)*(x_)^(j_.) + (b_.)*(x_)^(jn_.))^(p_)*((c_) + 
(d_.)*(x_)^(n_.))^(q_.), x_Symbol] :> Simp[e^IntPart[m]*(e*x)^FracPart[m]*( 
(a*x^j + b*x^(j + n))^FracPart[p]/(x^(FracPart[m] + j*FracPart[p])*(a + b*x 
^n)^FracPart[p]))   Int[x^(m + j*p)*(a + b*x^n)^p*(c + d*x^n)^q, x], x] /; 
FreeQ[{a, b, c, d, e, j, m, n, p, q}, x] && EqQ[jn, j + n] &&  !IntegerQ[p] 
 && NeQ[b*c - a*d, 0] &&  !(EqQ[n, 1] && EqQ[j, 1])
 
Maple [A] (verified)

Time = 0.54 (sec) , antiderivative size = 57, normalized size of antiderivative = 0.61

method result size
pseudoelliptic \(-\frac {2 \left (b^{2} c^{2} \operatorname {arctanh}\left (\frac {\sqrt {b x +a}}{\sqrt {a}}\right )-2 d \left (-\frac {a^{\frac {3}{2}} d}{3}+b \sqrt {a}\, \left (\frac {d x}{6}+c \right )\right ) \sqrt {b x +a}\right )}{\sqrt {a}\, b^{2}}\) \(57\)
risch \(-\frac {c^{2} \left (b x +a \right )}{a \sqrt {x^{2} \left (b x +a \right )}}+\frac {\left (2 a \,d^{2} \sqrt {b x +a}-\frac {b c \left (4 a d -b c \right ) \operatorname {arctanh}\left (\frac {\sqrt {b x +a}}{\sqrt {a}}\right )}{\sqrt {a}}\right ) \sqrt {b x +a}\, x}{a b \sqrt {x^{2} \left (b x +a \right )}}\) \(94\)
default \(\frac {\sqrt {b x +a}\, \left (2 d^{2} \sqrt {b x +a}\, a^{\frac {5}{2}} x -a^{\frac {3}{2}} \sqrt {b x +a}\, b \,c^{2}-4 \,\operatorname {arctanh}\left (\frac {\sqrt {b x +a}}{\sqrt {a}}\right ) a^{2} b c d x +\operatorname {arctanh}\left (\frac {\sqrt {b x +a}}{\sqrt {a}}\right ) a \,b^{2} c^{2} x \right )}{\sqrt {b \,x^{3}+a \,x^{2}}\, b \,a^{\frac {5}{2}}}\) \(103\)

Input:

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

Output:

-2/a^(1/2)*(b^2*c^2*arctanh((b*x+a)^(1/2)/a^(1/2))-2*d*(-1/3*a^(3/2)*d+b*a 
^(1/2)*(1/6*d*x+c))*(b*x+a)^(1/2))/b^2
 

Fricas [A] (verification not implemented)

Time = 0.09 (sec) , antiderivative size = 197, normalized size of antiderivative = 2.12 \[ \int \frac {(c+d x)^2}{x \sqrt {a x^2+b x^3}} \, dx=\left [-\frac {{\left (b^{2} c^{2} - 4 \, a b c d\right )} \sqrt {a} x^{2} \log \left (\frac {b x^{2} + 2 \, a x - 2 \, \sqrt {b x^{3} + a x^{2}} \sqrt {a}}{x^{2}}\right ) - 2 \, {\left (2 \, a^{2} d^{2} x - a b c^{2}\right )} \sqrt {b x^{3} + a x^{2}}}{2 \, a^{2} b x^{2}}, -\frac {{\left (b^{2} c^{2} - 4 \, a b c d\right )} \sqrt {-a} x^{2} \arctan \left (\frac {\sqrt {b x^{3} + a x^{2}} \sqrt {-a}}{b x^{2} + a x}\right ) - {\left (2 \, a^{2} d^{2} x - a b c^{2}\right )} \sqrt {b x^{3} + a x^{2}}}{a^{2} b x^{2}}\right ] \] Input:

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

Output:

[-1/2*((b^2*c^2 - 4*a*b*c*d)*sqrt(a)*x^2*log((b*x^2 + 2*a*x - 2*sqrt(b*x^3 
 + a*x^2)*sqrt(a))/x^2) - 2*(2*a^2*d^2*x - a*b*c^2)*sqrt(b*x^3 + a*x^2))/( 
a^2*b*x^2), -((b^2*c^2 - 4*a*b*c*d)*sqrt(-a)*x^2*arctan(sqrt(b*x^3 + a*x^2 
)*sqrt(-a)/(b*x^2 + a*x)) - (2*a^2*d^2*x - a*b*c^2)*sqrt(b*x^3 + a*x^2))/( 
a^2*b*x^2)]
 

Sympy [F]

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

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

Output:

Integral((c + d*x)**2/(x*sqrt(x**2*(a + b*x))), x)
 

Maxima [F]

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

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

Output:

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

Giac [A] (verification not implemented)

Time = 0.15 (sec) , antiderivative size = 81, normalized size of antiderivative = 0.87 \[ \int \frac {(c+d x)^2}{x \sqrt {a x^2+b x^3}} \, dx=\frac {b {\left (\frac {2 \, \sqrt {b x + a} d^{2}}{b^{2}} - \frac {\sqrt {b x + a} c^{2}}{a b x} - \frac {{\left (b c^{2} - 4 \, a c d\right )} \arctan \left (\frac {\sqrt {b x + a}}{\sqrt {-a}}\right )}{\sqrt {-a} a b}\right )}}{\mathrm {sgn}\left (x\right )} \] Input:

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

Output:

b*(2*sqrt(b*x + a)*d^2/b^2 - sqrt(b*x + a)*c^2/(a*b*x) - (b*c^2 - 4*a*c*d) 
*arctan(sqrt(b*x + a)/sqrt(-a))/(sqrt(-a)*a*b))/sgn(x)
 

Mupad [F(-1)]

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

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

Output:

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

Reduce [B] (verification not implemented)

Time = 0.21 (sec) , antiderivative size = 123, normalized size of antiderivative = 1.32 \[ \int \frac {(c+d x)^2}{x \sqrt {a x^2+b x^3}} \, dx=\frac {4 \sqrt {b x +a}\, a^{2} d^{2} x -2 \sqrt {b x +a}\, a b \,c^{2}+4 \sqrt {a}\, \mathrm {log}\left (\sqrt {b x +a}-\sqrt {a}\right ) a b c d x -\sqrt {a}\, \mathrm {log}\left (\sqrt {b x +a}-\sqrt {a}\right ) b^{2} c^{2} x -4 \sqrt {a}\, \mathrm {log}\left (\sqrt {b x +a}+\sqrt {a}\right ) a b c d x +\sqrt {a}\, \mathrm {log}\left (\sqrt {b x +a}+\sqrt {a}\right ) b^{2} c^{2} x}{2 a^{2} b x} \] Input:

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

Output:

(4*sqrt(a + b*x)*a**2*d**2*x - 2*sqrt(a + b*x)*a*b*c**2 + 4*sqrt(a)*log(sq 
rt(a + b*x) - sqrt(a))*a*b*c*d*x - sqrt(a)*log(sqrt(a + b*x) - sqrt(a))*b* 
*2*c**2*x - 4*sqrt(a)*log(sqrt(a + b*x) + sqrt(a))*a*b*c*d*x + sqrt(a)*log 
(sqrt(a + b*x) + sqrt(a))*b**2*c**2*x)/(2*a**2*b*x)