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

Optimal result
Mathematica [A] (verified)
Rubi [B] (verified)
Maple [B] (warning: unable to verify)
Fricas [F(-1)]
Sympy [F]
Maxima [F]
Giac [F(-2)]
Mupad [F(-1)]
Reduce [F]

Optimal result

Integrand size = 23, antiderivative size = 361 \[ \int \frac {1}{d+e x+f \sqrt {a+b x+c x^2}} \, dx=\frac {2 \sqrt {c} f \text {arctanh}\left (\frac {\sqrt {a}-\sqrt {a+b x+c x^2}}{\sqrt {c} x}\right )}{e^2-c f^2}+\frac {2 (2 c d-b e) f \text {arctanh}\left (\frac {2 a f+b f x+2 d \sqrt {a+x (b+c x)}-2 \sqrt {a} \left (d+e x+f \sqrt {a+x (b+c x)}\right )}{\sqrt {-4 b d e+4 a e^2+b^2 f^2+4 c \left (d^2-a f^2\right )} x}\right )}{\left (e^2-c f^2\right ) \sqrt {-4 b d e+4 a e^2+b^2 f^2+4 c \left (d^2-a f^2\right )}}-\frac {e \log \left (c-\frac {\left (\sqrt {a}-\sqrt {a+b x+c x^2}\right )^2}{x^2}\right )}{e^2-c f^2}+\frac {e \log \left (b e-c \left (d+\sqrt {a} f\right )+\frac {\left (2 \sqrt {a} e-b f\right ) \left (\sqrt {a}-\sqrt {a+b x+c x^2}\right )}{x}+\frac {\left (d-\sqrt {a} f\right ) \left (\sqrt {a}-\sqrt {a+b x+c x^2}\right )^2}{x^2}\right )}{e^2-c f^2} \] Output:

2*c^(1/2)*f*arctanh((a^(1/2)-(c*x^2+b*x+a)^(1/2))/c^(1/2)/x)/(-c*f^2+e^2)+ 
2*(-b*e+2*c*d)*f*arctanh((2*a*f+b*f*x+2*d*(a+x*(c*x+b))^(1/2)-2*a^(1/2)*(d 
+e*x+f*(a+x*(c*x+b))^(1/2)))/(-4*b*d*e+4*a*e^2+b^2*f^2+4*c*(-a*f^2+d^2))^( 
1/2)/x)/(-c*f^2+e^2)/(-4*b*d*e+4*a*e^2+b^2*f^2+4*c*(-a*f^2+d^2))^(1/2)-e*l 
n(c-(a^(1/2)-(c*x^2+b*x+a)^(1/2))^2/x^2)/(-c*f^2+e^2)+e*ln(b*e-c*(d+a^(1/2 
)*f)+(2*a^(1/2)*e-b*f)*(a^(1/2)-(c*x^2+b*x+a)^(1/2))/x+(d-a^(1/2)*f)*(a^(1 
/2)-(c*x^2+b*x+a)^(1/2))^2/x^2)/(-c*f^2+e^2)
 

Mathematica [A] (verified)

Time = 3.17 (sec) , antiderivative size = 323, normalized size of antiderivative = 0.89 \[ \int \frac {1}{d+e x+f \sqrt {a+b x+c x^2}} \, dx=\frac {\frac {2 (2 c d-b e) f \arctan \left (\frac {\sqrt {-4 c d^2+4 b d e-4 a e^2-b^2 f^2+4 a c f^2} x}{2 a f+b f x+2 d \sqrt {a+x (b+c x)}-2 \sqrt {a} \left (d+e x+f \sqrt {a+x (b+c x)}\right )}\right )}{\sqrt {-4 c d^2+4 b d e-4 a e^2-b^2 f^2+4 a c f^2}}+2 \sqrt {c} f \text {arctanh}\left (\frac {\sqrt {c} x}{\sqrt {a}-\sqrt {a+x (b+c x)}}\right )+e \left (-\log \left (-2 a-b x+2 \sqrt {a} \sqrt {a+x (b+c x)}\right )+\log \left (-2 a^{3/2} f+2 a \left (d+e x+f \sqrt {a+x (b+c x)}\right )+b x \left (d+e x+f \sqrt {a+x (b+c x)}\right )-2 \sqrt {a} \left (b f x+c f x^2+(d+e x) \sqrt {a+x (b+c x)}\right )\right )\right )}{e^2-c f^2} \] Input:

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

Output:

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

Rubi [B] (verified)

Leaf count is larger than twice the leaf count of optimal. \(1087\) vs. \(2(361)=722\).

Time = 10.42 (sec) , antiderivative size = 1087, normalized size of antiderivative = 3.01, number of steps used = 2, number of rules used = 2, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.087, Rules used = {7293, 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 {1}{f \sqrt {a+b x+c x^2}+d+e x} \, dx\)

\(\Big \downarrow \) 7293

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

\(\Big \downarrow \) 2009

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

Input:

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

Output:

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

Defintions of rubi rules used

rule 2009
Int[u_, x_Symbol] :> Simp[IntSum[u, x], x] /; SumQ[u]
 

rule 7293
Int[u_, x_Symbol] :> With[{v = ExpandIntegrand[u, x]}, Int[v, x] /; SumQ[v] 
]
 
Maple [B] (warning: unable to verify)

Leaf count of result is larger than twice the leaf count of optimal. \(4878\) vs. \(2(325)=650\).

Time = 0.15 (sec) , antiderivative size = 4879, normalized size of antiderivative = 13.52

method result size
default \(\text {Expression too large to display}\) \(4879\)

Input:

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

Output:

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

Fricas [F(-1)]

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

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

Output:

Timed out
 

Sympy [F]

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

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

Output:

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

Maxima [F]

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

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

Output:

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

Giac [F(-2)]

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

integrate(1/(d+e*x+f*(c*x^2+b*x+a)^(1/2)),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 {1}{d+e x+f \sqrt {a+b x+c x^2}} \, dx=\int \frac {1}{d+e\,x+f\,\sqrt {c\,x^2+b\,x+a}} \,d x \] Input:

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

Output:

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

Reduce [F]

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

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

Output:

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