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

Optimal result
Mathematica [A] (verified)
Rubi [B] (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 = 25, antiderivative size = 156 \[ \int \frac {\sqrt {a+b x+c x^2}}{x^2 (d+e x)} \, dx=-\frac {\sqrt {a+b x+c x^2}}{d x}-\frac {(b d-2 a e) \text {arctanh}\left (\frac {2 a+b x}{2 \sqrt {a} \sqrt {a+b x+c x^2}}\right )}{2 \sqrt {a} d^2}+\frac {\sqrt {c d^2-b d e+a e^2} \text {arctanh}\left (\frac {b d-2 a e+(2 c d-b e) x}{2 \sqrt {c d^2-b d e+a e^2} \sqrt {a+b x+c x^2}}\right )}{d^2} \] Output:

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

Mathematica [A] (verified)

Time = 0.85 (sec) , antiderivative size = 142, normalized size of antiderivative = 0.91 \[ \int \frac {\sqrt {a+b x+c x^2}}{x^2 (d+e x)} \, dx=\frac {-\frac {d \sqrt {a+x (b+c x)}}{x}+2 \sqrt {-c d^2+e (b d-a e)} \arctan \left (\frac {\sqrt {c} (d+e x)-e \sqrt {a+x (b+c x)}}{\sqrt {-c d^2+e (b d-a e)}}\right )+\frac {(b d-2 a e) \text {arctanh}\left (\frac {\sqrt {c} x-\sqrt {a+x (b+c x)}}{\sqrt {a}}\right )}{\sqrt {a}}}{d^2} \] Input:

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

Output:

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

Rubi [B] (verified)

Leaf count is larger than twice the leaf count of optimal. \(324\) vs. \(2(156)=312\).

Time = 0.60 (sec) , antiderivative size = 324, normalized size of antiderivative = 2.08, number of steps used = 2, number of rules used = 2, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.080, Rules used = {1289, 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 \frac {\sqrt {a+b x+c x^2}}{x^2 (d+e x)} \, dx\)

\(\Big \downarrow \) 1289

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

\(\Big \downarrow \) 2009

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

Input:

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

Output:

-(Sqrt[a + b*x + c*x^2]/(d*x)) - (b*ArcTanh[(2*a + b*x)/(2*Sqrt[a]*Sqrt[a 
+ b*x + c*x^2])])/(2*Sqrt[a]*d) + (Sqrt[a]*e*ArcTanh[(2*a + b*x)/(2*Sqrt[a 
]*Sqrt[a + b*x + c*x^2])])/d^2 + (Sqrt[c]*ArcTanh[(b + 2*c*x)/(2*Sqrt[c]*S 
qrt[a + b*x + c*x^2])])/d - (b*e*ArcTanh[(b + 2*c*x)/(2*Sqrt[c]*Sqrt[a + b 
*x + c*x^2])])/(2*Sqrt[c]*d^2) - ((2*c*d - b*e)*ArcTanh[(b + 2*c*x)/(2*Sqr 
t[c]*Sqrt[a + b*x + c*x^2])])/(2*Sqrt[c]*d^2) + (Sqrt[c*d^2 - b*d*e + a*e^ 
2]*ArcTanh[(b*d - 2*a*e + (2*c*d - b*e)*x)/(2*Sqrt[c*d^2 - b*d*e + a*e^2]* 
Sqrt[a + b*x + c*x^2])])/d^2
 

Defintions of rubi rules used

rule 1289
Int[((d_.) + (e_.)*(x_))^(m_.)*((f_.) + (g_.)*(x_))^(n_.)*((a_.) + (b_.)*(x 
_) + (c_.)*(x_)^2)^(p_.), x_Symbol] :> Int[ExpandIntegrand[(d + e*x)^m*(f + 
 g*x)^n*(a + b*x + c*x^2)^p, x], x] /; FreeQ[{a, b, c, d, e, f, g}, x] && ( 
IntegerQ[p] || (ILtQ[m, 0] && ILtQ[n, 0]))
 

rule 2009
Int[u_, x_Symbol] :> Simp[IntSum[u, x], x] /; SumQ[u]
 
Maple [A] (verified)

Time = 1.53 (sec) , antiderivative size = 249, normalized size of antiderivative = 1.60

method result size
risch \(-\frac {\sqrt {c \,x^{2}+b x +a}}{d x}-\frac {-\frac {\left (2 a e -b d \right ) \ln \left (\frac {2 a +b x +2 \sqrt {a}\, \sqrt {c \,x^{2}+b x +a}}{x}\right )}{d \sqrt {a}}+\frac {2 \left (a \,e^{2}-b d e +c \,d^{2}\right ) \ln \left (\frac {\frac {2 a \,e^{2}-2 b d e +2 c \,d^{2}}{e^{2}}+\frac {\left (b e -2 c d \right ) \left (x +\frac {d}{e}\right )}{e}+2 \sqrt {\frac {a \,e^{2}-b d e +c \,d^{2}}{e^{2}}}\, \sqrt {c \left (x +\frac {d}{e}\right )^{2}+\frac {\left (b e -2 c d \right ) \left (x +\frac {d}{e}\right )}{e}+\frac {a \,e^{2}-b d e +c \,d^{2}}{e^{2}}}}{x +\frac {d}{e}}\right )}{d e \sqrt {\frac {a \,e^{2}-b d e +c \,d^{2}}{e^{2}}}}}{2 d}\) \(249\)
default \(\frac {-\frac {\left (c \,x^{2}+b x +a \right )^{\frac {3}{2}}}{a x}+\frac {b \left (\sqrt {c \,x^{2}+b x +a}+\frac {b \ln \left (\frac {\frac {b}{2}+c x}{\sqrt {c}}+\sqrt {c \,x^{2}+b x +a}\right )}{2 \sqrt {c}}-\sqrt {a}\, \ln \left (\frac {2 a +b x +2 \sqrt {a}\, \sqrt {c \,x^{2}+b x +a}}{x}\right )\right )}{2 a}+\frac {2 c \left (\frac {\left (2 c x +b \right ) \sqrt {c \,x^{2}+b x +a}}{4 c}+\frac {\left (4 a c -b^{2}\right ) \ln \left (\frac {\frac {b}{2}+c x}{\sqrt {c}}+\sqrt {c \,x^{2}+b x +a}\right )}{8 c^{\frac {3}{2}}}\right )}{a}}{d}+\frac {e \left (\sqrt {c \left (x +\frac {d}{e}\right )^{2}+\frac {\left (b e -2 c d \right ) \left (x +\frac {d}{e}\right )}{e}+\frac {a \,e^{2}-b d e +c \,d^{2}}{e^{2}}}+\frac {\left (b e -2 c d \right ) \ln \left (\frac {\frac {b e -2 c d}{2 e}+c \left (x +\frac {d}{e}\right )}{\sqrt {c}}+\sqrt {c \left (x +\frac {d}{e}\right )^{2}+\frac {\left (b e -2 c d \right ) \left (x +\frac {d}{e}\right )}{e}+\frac {a \,e^{2}-b d e +c \,d^{2}}{e^{2}}}\right )}{2 e \sqrt {c}}-\frac {\left (a \,e^{2}-b d e +c \,d^{2}\right ) \ln \left (\frac {\frac {2 a \,e^{2}-2 b d e +2 c \,d^{2}}{e^{2}}+\frac {\left (b e -2 c d \right ) \left (x +\frac {d}{e}\right )}{e}+2 \sqrt {\frac {a \,e^{2}-b d e +c \,d^{2}}{e^{2}}}\, \sqrt {c \left (x +\frac {d}{e}\right )^{2}+\frac {\left (b e -2 c d \right ) \left (x +\frac {d}{e}\right )}{e}+\frac {a \,e^{2}-b d e +c \,d^{2}}{e^{2}}}}{x +\frac {d}{e}}\right )}{e^{2} \sqrt {\frac {a \,e^{2}-b d e +c \,d^{2}}{e^{2}}}}\right )}{d^{2}}-\frac {e \left (\sqrt {c \,x^{2}+b x +a}+\frac {b \ln \left (\frac {\frac {b}{2}+c x}{\sqrt {c}}+\sqrt {c \,x^{2}+b x +a}\right )}{2 \sqrt {c}}-\sqrt {a}\, \ln \left (\frac {2 a +b x +2 \sqrt {a}\, \sqrt {c \,x^{2}+b x +a}}{x}\right )\right )}{d^{2}}\) \(594\)

Input:

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

Output:

-(c*x^2+b*x+a)^(1/2)/d/x-1/2/d*(-(2*a*e-b*d)/d/a^(1/2)*ln((2*a+b*x+2*a^(1/ 
2)*(c*x^2+b*x+a)^(1/2))/x)+2*(a*e^2-b*d*e+c*d^2)/d/e/((a*e^2-b*d*e+c*d^2)/ 
e^2)^(1/2)*ln((2*(a*e^2-b*d*e+c*d^2)/e^2+(b*e-2*c*d)/e*(x+d/e)+2*((a*e^2-b 
*d*e+c*d^2)/e^2)^(1/2)*(c*(x+d/e)^2+(b*e-2*c*d)/e*(x+d/e)+(a*e^2-b*d*e+c*d 
^2)/e^2)^(1/2))/(x+d/e)))
 

Fricas [A] (verification not implemented)

Time = 0.27 (sec) , antiderivative size = 1020, normalized size of antiderivative = 6.54 \[ \int \frac {\sqrt {a+b x+c x^2}}{x^2 (d+e x)} \, dx =\text {Too large to display} \] Input:

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

Output:

[1/4*(2*sqrt(c*d^2 - b*d*e + a*e^2)*a*x*log((8*a*b*d*e - 8*a^2*e^2 - (b^2 
+ 4*a*c)*d^2 - (8*c^2*d^2 - 8*b*c*d*e + (b^2 + 4*a*c)*e^2)*x^2 - 4*sqrt(c* 
d^2 - b*d*e + a*e^2)*sqrt(c*x^2 + b*x + a)*(b*d - 2*a*e + (2*c*d - b*e)*x) 
 - 2*(4*b*c*d^2 + 4*a*b*e^2 - (3*b^2 + 4*a*c)*d*e)*x)/(e^2*x^2 + 2*d*e*x + 
 d^2)) - (b*d - 2*a*e)*sqrt(a)*x*log(-(8*a*b*x + (b^2 + 4*a*c)*x^2 + 4*sqr 
t(c*x^2 + b*x + a)*(b*x + 2*a)*sqrt(a) + 8*a^2)/x^2) - 4*sqrt(c*x^2 + b*x 
+ a)*a*d)/(a*d^2*x), 1/4*(4*sqrt(-c*d^2 + b*d*e - a*e^2)*a*x*arctan(-1/2*s 
qrt(-c*d^2 + b*d*e - a*e^2)*sqrt(c*x^2 + b*x + a)*(b*d - 2*a*e + (2*c*d - 
b*e)*x)/(a*c*d^2 - a*b*d*e + a^2*e^2 + (c^2*d^2 - b*c*d*e + a*c*e^2)*x^2 + 
 (b*c*d^2 - b^2*d*e + a*b*e^2)*x)) - (b*d - 2*a*e)*sqrt(a)*x*log(-(8*a*b*x 
 + (b^2 + 4*a*c)*x^2 + 4*sqrt(c*x^2 + b*x + a)*(b*x + 2*a)*sqrt(a) + 8*a^2 
)/x^2) - 4*sqrt(c*x^2 + b*x + a)*a*d)/(a*d^2*x), 1/2*((b*d - 2*a*e)*sqrt(- 
a)*x*arctan(1/2*sqrt(c*x^2 + b*x + a)*(b*x + 2*a)*sqrt(-a)/(a*c*x^2 + a*b* 
x + a^2)) + sqrt(c*d^2 - b*d*e + a*e^2)*a*x*log((8*a*b*d*e - 8*a^2*e^2 - ( 
b^2 + 4*a*c)*d^2 - (8*c^2*d^2 - 8*b*c*d*e + (b^2 + 4*a*c)*e^2)*x^2 - 4*sqr 
t(c*d^2 - b*d*e + a*e^2)*sqrt(c*x^2 + b*x + a)*(b*d - 2*a*e + (2*c*d - b*e 
)*x) - 2*(4*b*c*d^2 + 4*a*b*e^2 - (3*b^2 + 4*a*c)*d*e)*x)/(e^2*x^2 + 2*d*e 
*x + d^2)) - 2*sqrt(c*x^2 + b*x + a)*a*d)/(a*d^2*x), 1/2*(2*sqrt(-c*d^2 + 
b*d*e - a*e^2)*a*x*arctan(-1/2*sqrt(-c*d^2 + b*d*e - a*e^2)*sqrt(c*x^2 + b 
*x + a)*(b*d - 2*a*e + (2*c*d - b*e)*x)/(a*c*d^2 - a*b*d*e + a^2*e^2 + ...
 

Sympy [F]

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

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

Output:

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

Maxima [F]

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

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

Output:

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

Giac [A] (verification not implemented)

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

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

Output:

2*(c*d^2 - b*d*e + a*e^2)*arctan(-((sqrt(c)*x - sqrt(c*x^2 + b*x + a))*e + 
 sqrt(c)*d)/sqrt(-c*d^2 + b*d*e - a*e^2))/(sqrt(-c*d^2 + b*d*e - a*e^2)*d^ 
2) + (b*d - 2*a*e)*arctan(-(sqrt(c)*x - sqrt(c*x^2 + b*x + a))/sqrt(-a))/( 
sqrt(-a)*d^2) + ((sqrt(c)*x - sqrt(c*x^2 + b*x + a))*b + 2*a*sqrt(c))/(((s 
qrt(c)*x - sqrt(c*x^2 + b*x + a))^2 - a)*d)
 

Mupad [F(-1)]

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

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

Output:

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

Reduce [B] (verification not implemented)

Time = 0.27 (sec) , antiderivative size = 203, normalized size of antiderivative = 1.30 \[ \int \frac {\sqrt {a+b x+c x^2}}{x^2 (d+e x)} \, dx=\frac {2 \sqrt {a \,e^{2}-b d e +c \,d^{2}}\, \mathrm {log}\left (2 \sqrt {c \,x^{2}+b x +a}\, \sqrt {a \,e^{2}-b d e +c \,d^{2}}-2 a e +b d -b e x +2 c d x \right ) a x -2 \sqrt {a \,e^{2}-b d e +c \,d^{2}}\, \mathrm {log}\left (e x +d \right ) a x -2 \sqrt {c \,x^{2}+b x +a}\, a d +2 \sqrt {a}\, \mathrm {log}\left (-2 \sqrt {a}\, \sqrt {c \,x^{2}+b x +a}-2 a -b x \right ) a e x -\sqrt {a}\, \mathrm {log}\left (-2 \sqrt {a}\, \sqrt {c \,x^{2}+b x +a}-2 a -b x \right ) b d x -2 \sqrt {a}\, \mathrm {log}\left (x \right ) a e x +\sqrt {a}\, \mathrm {log}\left (x \right ) b d x}{2 a \,d^{2} x} \] Input:

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

Output:

(2*sqrt(a*e**2 - b*d*e + c*d**2)*log(2*sqrt(a + b*x + c*x**2)*sqrt(a*e**2 
- b*d*e + c*d**2) - 2*a*e + b*d - b*e*x + 2*c*d*x)*a*x - 2*sqrt(a*e**2 - b 
*d*e + c*d**2)*log(d + e*x)*a*x - 2*sqrt(a + b*x + c*x**2)*a*d + 2*sqrt(a) 
*log( - 2*sqrt(a)*sqrt(a + b*x + c*x**2) - 2*a - b*x)*a*e*x - sqrt(a)*log( 
 - 2*sqrt(a)*sqrt(a + b*x + c*x**2) - 2*a - b*x)*b*d*x - 2*sqrt(a)*log(x)* 
a*e*x + sqrt(a)*log(x)*b*d*x)/(2*a*d**2*x)