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

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

Optimal result

Integrand size = 22, antiderivative size = 152 \[ \int \frac {\sqrt {a+b x+c x^2}}{d+e x} \, dx=\frac {\sqrt {a+b x+c x^2}}{e}-\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} e^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 )}{e^2} \] Output:

(c*x^2+b*x+a)^(1/2)/e-1/2*(-b*e+2*c*d)*arctanh(1/2*(2*c*x+b)/c^(1/2)/(c*x^ 
2+b*x+a)^(1/2))/c^(1/2)/e^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))/e^2
 

Mathematica [A] (verified)

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

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

Output:

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

Rubi [A] (verified)

Time = 0.37 (sec) , antiderivative size = 158, normalized size of antiderivative = 1.04, number of steps used = 7, number of rules used = 6, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.273, Rules used = {1162, 1269, 1092, 219, 1154, 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+b x+c x^2}}{d+e x} \, dx\)

\(\Big \downarrow \) 1162

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

\(\Big \downarrow \) 1269

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

\(\Big \downarrow \) 1092

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

\(\Big \downarrow \) 219

\(\displaystyle \frac {\sqrt {a+b x+c x^2}}{e}-\frac {\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 )}{\sqrt {c} e}-\frac {2 \left (a e^2-b d e+c d^2\right ) \int \frac {1}{(d+e x) \sqrt {c x^2+b x+a}}dx}{e}}{2 e}\)

\(\Big \downarrow \) 1154

\(\displaystyle \frac {\sqrt {a+b x+c x^2}}{e}-\frac {\frac {4 \left (a e^2-b d e+c d^2\right ) \int \frac {1}{4 \left (c d^2-b e d+a e^2\right )-\frac {(b d-2 a e+(2 c d-b e) x)^2}{c x^2+b x+a}}d\left (-\frac {b d-2 a e+(2 c d-b e) x}{\sqrt {c x^2+b x+a}}\right )}{e}+\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 )}{\sqrt {c} e}}{2 e}\)

\(\Big \downarrow \) 219

\(\displaystyle \frac {\sqrt {a+b x+c x^2}}{e}-\frac {\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 )}{\sqrt {c} e}-\frac {2 \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 )}{e}}{2 e}\)

Input:

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

Output:

Sqrt[a + b*x + c*x^2]/e - (((2*c*d - b*e)*ArcTanh[(b + 2*c*x)/(2*Sqrt[c]*S 
qrt[a + b*x + c*x^2])])/(Sqrt[c]*e) - (2*Sqrt[c*d^2 - b*d*e + a*e^2]*ArcTa 
nh[(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])])/e)/(2*e)
 

Defintions of rubi rules used

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 1092
Int[1/Sqrt[(a_) + (b_.)*(x_) + (c_.)*(x_)^2], x_Symbol] :> Simp[2   Subst[I 
nt[1/(4*c - x^2), x], x, (b + 2*c*x)/Sqrt[a + b*x + c*x^2]], x] /; FreeQ[{a 
, b, c}, x]
 

rule 1154
Int[1/(((d_.) + (e_.)*(x_))*Sqrt[(a_.) + (b_.)*(x_) + (c_.)*(x_)^2]), x_Sym 
bol] :> Simp[-2   Subst[Int[1/(4*c*d^2 - 4*b*d*e + 4*a*e^2 - x^2), x], x, ( 
2*a*e - b*d - (2*c*d - b*e)*x)/Sqrt[a + b*x + c*x^2]], x] /; FreeQ[{a, b, c 
, d, e}, x]
 

rule 1162
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/(e*(m + 2*p + 1))   Int[(d + e*x)^m*Simp[b*d - 2*a*e + (2*c*d - 
b*e)*x, x]*(a + b*x + c*x^2)^(p - 1), x], x] /; FreeQ[{a, b, c, d, e, m}, x 
] && GtQ[p, 0] && NeQ[m + 2*p + 1, 0] && ( !RationalQ[m] || LtQ[m, 1]) && 
!ILtQ[m + 2*p, 0] && IntQuadraticQ[a, b, c, d, e, m, p, x]
 

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

Time = 1.12 (sec) , antiderivative size = 236, normalized size of antiderivative = 1.55

method result size
risch \(\frac {\sqrt {c \,x^{2}+b x +a}}{e}+\frac {\frac {\left (b e -2 c d \right ) \ln \left (\frac {\frac {b}{2}+c x}{\sqrt {c}}+\sqrt {c \,x^{2}+b x +a}\right )}{e \sqrt {c}}-\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 )}{e^{2} \sqrt {\frac {a \,e^{2}-b d e +c \,d^{2}}{e^{2}}}}}{2 e}\) \(236\)
default \(\frac {\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}}}}}{e}\) \(329\)

Input:

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

Output:

(c*x^2+b*x+a)^(1/2)/e+1/2/e*((b*e-2*c*d)/e*ln((1/2*b+c*x)/c^(1/2)+(c*x^2+b 
*x+a)^(1/2))/c^(1/2)-2*(a*e^2-b*d*e+c*d^2)/e^2/((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.70 (sec) , antiderivative size = 992, normalized size of antiderivative = 6.53 \[ \int \frac {\sqrt {a+b x+c x^2}}{d+e x} \, dx =\text {Too large to display} \] Input:

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

Output:

[1/4*(4*sqrt(c*x^2 + b*x + a)*c*e - (2*c*d - b*e)*sqrt(c)*log(-8*c^2*x^2 - 
 8*b*c*x - b^2 - 4*sqrt(c*x^2 + b*x + a)*(2*c*x + b)*sqrt(c) - 4*a*c) + 2* 
sqrt(c*d^2 - b*d*e + a*e^2)*c*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)))/(c 
*e^2), 1/2*(2*sqrt(c*x^2 + b*x + a)*c*e + (2*c*d - b*e)*sqrt(-c)*arctan(1/ 
2*sqrt(c*x^2 + b*x + a)*(2*c*x + b)*sqrt(-c)/(c^2*x^2 + b*c*x + a*c)) + sq 
rt(c*d^2 - b*d*e + a*e^2)*c*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)))/(c*e 
^2), 1/4*(4*sqrt(c*x^2 + b*x + a)*c*e + 4*sqrt(-c*d^2 + b*d*e - a*e^2)*c*a 
rctan(-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 + (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)) - (2*c*d - b*e)*sqrt(c)*log 
(-8*c^2*x^2 - 8*b*c*x - b^2 - 4*sqrt(c*x^2 + b*x + a)*(2*c*x + b)*sqrt(c) 
- 4*a*c))/(c*e^2), 1/2*(2*sqrt(c*x^2 + b*x + a)*c*e + 2*sqrt(-c*d^2 + b*d* 
e - a*e^2)*c*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 + (c^2*d...
 

Sympy [F]

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

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

Output:

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

Maxima [F(-2)]

Exception generated. \[ \int \frac {\sqrt {a+b x+c x^2}}{d+e x} \, dx=\text {Exception raised: ValueError} \] Input:

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

Output:

Exception raised: ValueError >> Computation failed since Maxima requested 
additional constraints; using the 'assume' command before evaluation *may* 
 help (example of legal syntax is 'assume(a*e^2-b*d*e>0)', see `assume?` f 
or more de
 

Giac [F(-2)]

Exception generated. \[ \int \frac {\sqrt {a+b x+c x^2}}{d+e x} \, dx=\text {Exception raised: TypeError} \] Input:

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

Output:

Exception raised: TypeError >> an error occurred running a Giac command:IN 
PUT:sage2:=int(sage0,sageVARx):;OUTPUT:Error: Bad Argument Type
 

Mupad [F(-1)]

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

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

Output:

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

Reduce [B] (verification not implemented)

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

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

Output:

( - 2*sqrt(4*sqrt(c)*sqrt(a*e**2 - b*d*e + c*d**2)*b*e - 8*sqrt(c)*sqrt(a* 
e**2 - b*d*e + c*d**2)*c*d - 4*a*c*e**2 - b**2*e**2 + 8*b*c*d*e - 8*c**2*d 
**2)*sqrt(a*e**2 - b*d*e + c*d**2)*atan((2*sqrt(c)*sqrt(a + b*x + c*x**2)* 
e + b*e + 2*c*e*x)/sqrt(4*sqrt(c)*sqrt(a*e**2 - b*d*e + c*d**2)*b*e - 8*sq 
rt(c)*sqrt(a*e**2 - b*d*e + c*d**2)*c*d - 4*a*c*e**2 - b**2*e**2 + 8*b*c*d 
*e - 8*c**2*d**2))*b*c*e + 4*sqrt(4*sqrt(c)*sqrt(a*e**2 - b*d*e + c*d**2)* 
b*e - 8*sqrt(c)*sqrt(a*e**2 - b*d*e + c*d**2)*c*d - 4*a*c*e**2 - b**2*e**2 
 + 8*b*c*d*e - 8*c**2*d**2)*sqrt(a*e**2 - b*d*e + c*d**2)*atan((2*sqrt(c)* 
sqrt(a + b*x + c*x**2)*e + b*e + 2*c*e*x)/sqrt(4*sqrt(c)*sqrt(a*e**2 - b*d 
*e + c*d**2)*b*e - 8*sqrt(c)*sqrt(a*e**2 - b*d*e + c*d**2)*c*d - 4*a*c*e** 
2 - b**2*e**2 + 8*b*c*d*e - 8*c**2*d**2))*c**2*d - 4*sqrt(c)*sqrt(4*sqrt(c 
)*sqrt(a*e**2 - b*d*e + c*d**2)*b*e - 8*sqrt(c)*sqrt(a*e**2 - b*d*e + c*d* 
*2)*c*d - 4*a*c*e**2 - b**2*e**2 + 8*b*c*d*e - 8*c**2*d**2)*atan((2*sqrt(c 
)*sqrt(a + b*x + c*x**2)*e + b*e + 2*c*e*x)/sqrt(4*sqrt(c)*sqrt(a*e**2 - b 
*d*e + c*d**2)*b*e - 8*sqrt(c)*sqrt(a*e**2 - b*d*e + c*d**2)*c*d - 4*a*c*e 
**2 - b**2*e**2 + 8*b*c*d*e - 8*c**2*d**2))*a*c*e**2 + 4*sqrt(c)*sqrt(4*sq 
rt(c)*sqrt(a*e**2 - b*d*e + c*d**2)*b*e - 8*sqrt(c)*sqrt(a*e**2 - b*d*e + 
c*d**2)*c*d - 4*a*c*e**2 - b**2*e**2 + 8*b*c*d*e - 8*c**2*d**2)*atan((2*sq 
rt(c)*sqrt(a + b*x + c*x**2)*e + b*e + 2*c*e*x)/sqrt(4*sqrt(c)*sqrt(a*e**2 
 - b*d*e + c*d**2)*b*e - 8*sqrt(c)*sqrt(a*e**2 - b*d*e + c*d**2)*c*d - ...