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

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

Optimal result

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

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

Mathematica [A] (verified)

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

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

Output:

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

Rubi [A] (verified)

Time = 0.53 (sec) , antiderivative size = 129, normalized size of antiderivative = 0.92, number of steps used = 7, number of rules used = 6, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.250, Rules used = {1262, 27, 1220, 1131, 1091, 219}

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 {\sqrt {a x+b x^2} (c+d x)^2}{x^2} \, dx\)

\(\Big \downarrow \) 1262

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

\(\Big \downarrow \) 27

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

\(\Big \downarrow \) 1220

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

\(\Big \downarrow \) 1131

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

\(\Big \downarrow \) 1091

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

\(\Big \downarrow \) 219

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

Input:

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

Output:

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

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 219
Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(1/(Rt[a, 2]*Rt[-b, 2]))* 
ArcTanh[Rt[-b, 2]*(x/Rt[a, 2])], x] /; FreeQ[{a, b}, x] && NegQ[a/b] && (Gt 
Q[a, 0] || LtQ[b, 0])
 

rule 1091
Int[1/Sqrt[(b_.)*(x_) + (c_.)*(x_)^2], x_Symbol] :> Simp[2   Subst[Int[1/(1 
 - c*x^2), x], x, x/Sqrt[b*x + c*x^2]], x] /; FreeQ[{b, c}, x]
 

rule 1131
Int[((d_.) + (e_.)*(x_))^(m_)*((a_.) + (b_.)*(x_) + (c_.)*(x_)^2)^(p_), x_S 
ymbol] :> Simp[(d + e*x)^(m + 1)*((a + b*x + c*x^2)^p/(e*(m + 2*p + 1))), x 
] - Simp[p*((2*c*d - b*e)/(e^2*(m + 2*p + 1)))   Int[(d + e*x)^(m + 1)*(a + 
 b*x + c*x^2)^(p - 1), x], x] /; FreeQ[{a, b, c, d, e}, x] && EqQ[c*d^2 - b 
*d*e + a*e^2, 0] && GtQ[p, 0] && (LeQ[-2, m, 0] || EqQ[m + p + 1, 0]) && Ne 
Q[m + 2*p + 1, 0] && IntegerQ[2*p]
 

rule 1220
Int[((d_.) + (e_.)*(x_))^(m_)*((f_.) + (g_.)*(x_))*((a_.) + (b_.)*(x_) + (c 
_.)*(x_)^2)^(p_), x_Symbol] :> Simp[(d*g - e*f)*(d + e*x)^m*((a + b*x + c*x 
^2)^(p + 1)/((2*c*d - b*e)*(m + p + 1))), x] + Simp[(m*(g*(c*d - b*e) + c*e 
*f) + e*(p + 1)*(2*c*f - b*g))/(e*(2*c*d - b*e)*(m + p + 1))   Int[(d + e*x 
)^(m + 1)*(a + b*x + c*x^2)^p, x], x] /; FreeQ[{a, b, c, d, e, f, g, m, p}, 
 x] && EqQ[c*d^2 - b*d*e + a*e^2, 0] && ((LtQ[m, -1] &&  !IGtQ[m + p + 1, 0 
]) || (LtQ[m, 0] && LtQ[p, -1]) || EqQ[m + 2*p + 2, 0]) && NeQ[m + p + 1, 0 
]
 

rule 1262
Int[((d_.) + (e_.)*(x_))^(m_.)*((f_) + (g_.)*(x_))^(n_.)*((a_.) + (b_.)*(x_ 
) + (c_.)*(x_)^2)^(p_), x_Symbol] :> Simp[g^n*(d + e*x)^(m + n - 1)*((a + b 
*x + c*x^2)^(p + 1)/(c*e^(n - 1)*(m + n + 2*p + 1))), x] + Simp[1/(c*e^n*(m 
 + n + 2*p + 1))   Int[(d + e*x)^m*(a + b*x + c*x^2)^p*ExpandToSum[c*e^n*(m 
 + n + 2*p + 1)*(f + g*x)^n - c*g^n*(m + n + 2*p + 1)*(d + e*x)^n + e*g^n*( 
m + p + n)*(d + e*x)^(n - 2)*(b*d - 2*a*e + (2*c*d - b*e)*x), x], x], x] /; 
 FreeQ[{a, b, c, d, e, f, g, m, p}, x] && EqQ[c*d^2 - b*d*e + a*e^2, 0] && 
IGtQ[n, 0] && NeQ[m + n + 2*p + 1, 0]
 
Maple [A] (verified)

Time = 0.51 (sec) , antiderivative size = 95, normalized size of antiderivative = 0.68

method result size
pseudoelliptic \(-\frac {x \left (a^{2} d^{2}-8 a b c d -8 b^{2} c^{2}\right ) \operatorname {arctanh}\left (\frac {\sqrt {x \left (b x +a \right )}}{x \sqrt {b}}\right )-\left (\left (2 d^{2} x^{2}+8 c d x -8 c^{2}\right ) b^{\frac {3}{2}}+\sqrt {b}\, a \,d^{2} x \right ) \sqrt {x \left (b x +a \right )}}{4 b^{\frac {3}{2}} x}\) \(95\)
risch \(\frac {\left (b x +a \right ) \left (2 b \,x^{2} d^{2}+a \,d^{2} x +8 b c d x -8 b \,c^{2}\right )}{4 b \sqrt {x \left (b x +a \right )}}-\frac {\left (a^{2} d^{2}-8 a b c d -8 b^{2} c^{2}\right ) \ln \left (\frac {\frac {a}{2}+b x}{\sqrt {b}}+\sqrt {b \,x^{2}+a x}\right )}{8 b^{\frac {3}{2}}}\) \(100\)
default \(d^{2} \left (\frac {\left (2 b x +a \right ) \sqrt {b \,x^{2}+a x}}{4 b}-\frac {a^{2} \ln \left (\frac {\frac {a}{2}+b x}{\sqrt {b}}+\sqrt {b \,x^{2}+a x}\right )}{8 b^{\frac {3}{2}}}\right )+c^{2} \left (-\frac {2 \left (b \,x^{2}+a x \right )^{\frac {3}{2}}}{a \,x^{2}}+\frac {2 b \left (\sqrt {b \,x^{2}+a x}+\frac {a \ln \left (\frac {\frac {a}{2}+b x}{\sqrt {b}}+\sqrt {b \,x^{2}+a x}\right )}{2 \sqrt {b}}\right )}{a}\right )+2 c d \left (\sqrt {b \,x^{2}+a x}+\frac {a \ln \left (\frac {\frac {a}{2}+b x}{\sqrt {b}}+\sqrt {b \,x^{2}+a x}\right )}{2 \sqrt {b}}\right )\) \(179\)

Input:

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

Output:

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

Fricas [A] (verification not implemented)

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

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

Output:

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

Sympy [F]

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

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

Output:

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

Maxima [A] (verification not implemented)

Time = 0.03 (sec) , antiderivative size = 166, normalized size of antiderivative = 1.19 \[ \int \frac {(c+d x)^2 \sqrt {a x+b x^2}}{x^2} \, dx=\frac {1}{2} \, \sqrt {b x^{2} + a x} d^{2} x + \sqrt {b} c^{2} \log \left (2 \, b x + a + 2 \, \sqrt {b x^{2} + a x} \sqrt {b}\right ) + \frac {a c d \log \left (2 \, b x + a + 2 \, \sqrt {b x^{2} + a x} \sqrt {b}\right )}{\sqrt {b}} - \frac {a^{2} d^{2} \log \left (2 \, b x + a + 2 \, \sqrt {b x^{2} + a x} \sqrt {b}\right )}{8 \, b^{\frac {3}{2}}} + 2 \, \sqrt {b x^{2} + a x} c d + \frac {\sqrt {b x^{2} + a x} a d^{2}}{4 \, b} - \frac {2 \, \sqrt {b x^{2} + a x} c^{2}}{x} \] Input:

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

Output:

1/2*sqrt(b*x^2 + a*x)*d^2*x + sqrt(b)*c^2*log(2*b*x + a + 2*sqrt(b*x^2 + a 
*x)*sqrt(b)) + a*c*d*log(2*b*x + a + 2*sqrt(b*x^2 + a*x)*sqrt(b))/sqrt(b) 
- 1/8*a^2*d^2*log(2*b*x + a + 2*sqrt(b*x^2 + a*x)*sqrt(b))/b^(3/2) + 2*sqr 
t(b*x^2 + a*x)*c*d + 1/4*sqrt(b*x^2 + a*x)*a*d^2/b - 2*sqrt(b*x^2 + a*x)*c 
^2/x
 

Giac [A] (verification not implemented)

Time = 0.14 (sec) , antiderivative size = 119, normalized size of antiderivative = 0.85 \[ \int \frac {(c+d x)^2 \sqrt {a x+b x^2}}{x^2} \, dx=\frac {2 \, a c^{2}}{\sqrt {b} x - \sqrt {b x^{2} + a x}} + \frac {1}{4} \, {\left (2 \, d^{2} x + \frac {8 \, b c d + a d^{2}}{b}\right )} \sqrt {b x^{2} + a x} - \frac {{\left (8 \, b^{2} c^{2} + 8 \, a b c d - a^{2} d^{2}\right )} \log \left ({\left | 2 \, {\left (\sqrt {b} x - \sqrt {b x^{2} + a x}\right )} \sqrt {b} + a \right |}\right )}{8 \, b^{\frac {3}{2}}} \] Input:

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

Output:

2*a*c^2/(sqrt(b)*x - sqrt(b*x^2 + a*x)) + 1/4*(2*d^2*x + (8*b*c*d + a*d^2) 
/b)*sqrt(b*x^2 + a*x) - 1/8*(8*b^2*c^2 + 8*a*b*c*d - a^2*d^2)*log(abs(2*(s 
qrt(b)*x - sqrt(b*x^2 + a*x))*sqrt(b) + a))/b^(3/2)
 

Mupad [F(-1)]

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

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

Output:

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

Reduce [B] (verification not implemented)

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

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

Output:

(sqrt(x)*sqrt(a + b*x)*a*b*d**2*x - 8*sqrt(x)*sqrt(a + b*x)*b**2*c**2 + 8* 
sqrt(x)*sqrt(a + b*x)*b**2*c*d*x + 2*sqrt(x)*sqrt(a + b*x)*b**2*d**2*x**2 
- sqrt(b)*log((sqrt(a + b*x) + sqrt(x)*sqrt(b))/sqrt(a))*a**2*d**2*x + 8*s 
qrt(b)*log((sqrt(a + b*x) + sqrt(x)*sqrt(b))/sqrt(a))*a*b*c*d*x + 8*sqrt(b 
)*log((sqrt(a + b*x) + sqrt(x)*sqrt(b))/sqrt(a))*b**2*c**2*x - 2*sqrt(b)*a 
*b*c*d*x - 8*sqrt(b)*b**2*c**2*x)/(4*b**2*x)