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

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

Optimal result

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

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

Mathematica [A] (verified)

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

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

Output:

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

Rubi [A] (verified)

Time = 0.27 (sec) , antiderivative size = 123, normalized size of antiderivative = 1.07, number of steps used = 4, number of rules used = 3, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.097, Rules used = {1148, 1450, 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 {\sqrt {e+f x}}{x (a d+b c)+a c+b d x^2} \, dx\)

\(\Big \downarrow \) 1148

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

\(\Big \downarrow \) 1450

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

\(\Big \downarrow \) 221

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

Input:

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

Output:

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

Defintions of rubi rules used

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

rule 1450
Int[((d_.)*(x_))^(m_)/((a_) + (b_.)*(x_)^2 + (c_.)*(x_)^4), x_Symbol] :> Wi 
th[{q = Rt[b^2 - 4*a*c, 2]}, Simp[(d^2/2)*(b/q + 1)   Int[(d*x)^(m - 2)/(b/ 
2 + q/2 + c*x^2), x], x] - Simp[(d^2/2)*(b/q - 1)   Int[(d*x)^(m - 2)/(b/2 
- q/2 + c*x^2), x], x]] /; FreeQ[{a, b, c, d}, x] && NeQ[b^2 - 4*a*c, 0] && 
 GeQ[m, 2]
 
Maple [A] (verified)

Time = 1.26 (sec) , antiderivative size = 101, normalized size of antiderivative = 0.88

method result size
pseudoelliptic \(\frac {\frac {2 \left (a f -b e \right ) \arctan \left (\frac {b \sqrt {f x +e}}{\sqrt {\left (a f -b e \right ) b}}\right )}{\sqrt {\left (a f -b e \right ) b}}-\frac {2 \left (c f -d e \right ) \arctan \left (\frac {d \sqrt {f x +e}}{\sqrt {\left (c f -d e \right ) d}}\right )}{\sqrt {\left (c f -d e \right ) d}}}{a d -b c}\) \(101\)
derivativedivides \(2 f \left (\frac {\left (-c f +d e \right ) \arctan \left (\frac {d \sqrt {f x +e}}{\sqrt {\left (c f -d e \right ) d}}\right )}{f \left (a d -b c \right ) \sqrt {\left (c f -d e \right ) d}}+\frac {\left (a f -b e \right ) \arctan \left (\frac {b \sqrt {f x +e}}{\sqrt {\left (a f -b e \right ) b}}\right )}{f \left (a d -b c \right ) \sqrt {\left (a f -b e \right ) b}}\right )\) \(117\)
default \(2 f \left (\frac {\left (-c f +d e \right ) \arctan \left (\frac {d \sqrt {f x +e}}{\sqrt {\left (c f -d e \right ) d}}\right )}{f \left (a d -b c \right ) \sqrt {\left (c f -d e \right ) d}}+\frac {\left (a f -b e \right ) \arctan \left (\frac {b \sqrt {f x +e}}{\sqrt {\left (a f -b e \right ) b}}\right )}{f \left (a d -b c \right ) \sqrt {\left (a f -b e \right ) b}}\right )\) \(117\)

Input:

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

Output:

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

Fricas [A] (verification not implemented)

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

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

Output:

[-(sqrt((b*e - a*f)/b)*log((b*f*x + 2*b*e - a*f + 2*sqrt(f*x + e)*b*sqrt(( 
b*e - a*f)/b))/(b*x + a)) + sqrt((d*e - c*f)/d)*log((d*f*x + 2*d*e - c*f - 
 2*sqrt(f*x + e)*d*sqrt((d*e - c*f)/d))/(d*x + c)))/(b*c - a*d), -(2*sqrt( 
-(b*e - a*f)/b)*arctan(-sqrt(f*x + e)*b*sqrt(-(b*e - a*f)/b)/(b*e - a*f)) 
+ sqrt((d*e - c*f)/d)*log((d*f*x + 2*d*e - c*f - 2*sqrt(f*x + e)*d*sqrt((d 
*e - c*f)/d))/(d*x + c)))/(b*c - a*d), (2*sqrt(-(d*e - c*f)/d)*arctan(-sqr 
t(f*x + e)*d*sqrt(-(d*e - c*f)/d)/(d*e - c*f)) - sqrt((b*e - a*f)/b)*log(( 
b*f*x + 2*b*e - a*f + 2*sqrt(f*x + e)*b*sqrt((b*e - a*f)/b))/(b*x + a)))/( 
b*c - a*d), -2*(sqrt(-(b*e - a*f)/b)*arctan(-sqrt(f*x + e)*b*sqrt(-(b*e - 
a*f)/b)/(b*e - a*f)) - sqrt(-(d*e - c*f)/d)*arctan(-sqrt(f*x + e)*d*sqrt(- 
(d*e - c*f)/d)/(d*e - c*f)))/(b*c - a*d)]
 

Sympy [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 270 vs. \(2 (97) = 194\).

Time = 4.35 (sec) , antiderivative size = 270, normalized size of antiderivative = 2.35 \[ \int \frac {\sqrt {e+f x}}{a c+(b c+a d) x+b d x^2} \, dx=\begin {cases} \frac {2 \left (- \frac {f \left (c f - d e\right ) \operatorname {atan}{\left (\frac {\sqrt {e + f x}}{\sqrt {\frac {c f - d e}{d}}} \right )}}{d \sqrt {\frac {c f - d e}{d}} \left (a d - b c\right )} + \frac {f \left (a f - b e\right ) \operatorname {atan}{\left (\frac {\sqrt {e + f x}}{\sqrt {\frac {a f - b e}{b}}} \right )}}{b \sqrt {\frac {a f - b e}{b}} \left (a d - b c\right )}\right )}{f} & \text {for}\: f \neq 0 \\\sqrt {e} \left (- \frac {2 b d \left (\begin {cases} \frac {x + \frac {a d + b c}{2 b d}}{a d} & \text {for}\: b = 0 \\- \frac {x + \frac {a d + b c}{2 b d}}{b c} & \text {for}\: d = 0 \\- \frac {\log {\left (a d - b c - 2 b d \left (x + \frac {a d + b c}{2 b d}\right ) \right )}}{2 b d} & \text {otherwise} \end {cases}\right )}{a d - b c} - \frac {2 b d \left (\begin {cases} \frac {x + \frac {a d + b c}{2 b d}}{a d} & \text {for}\: b = 0 \\- \frac {x + \frac {a d + b c}{2 b d}}{b c} & \text {for}\: d = 0 \\\frac {\log {\left (a d - b c + 2 b d \left (x + \frac {a d + b c}{2 b d}\right ) \right )}}{2 b d} & \text {otherwise} \end {cases}\right )}{a d - b c}\right ) & \text {otherwise} \end {cases} \] Input:

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

Output:

Piecewise((2*(-f*(c*f - d*e)*atan(sqrt(e + f*x)/sqrt((c*f - d*e)/d))/(d*sq 
rt((c*f - d*e)/d)*(a*d - b*c)) + f*(a*f - b*e)*atan(sqrt(e + f*x)/sqrt((a* 
f - b*e)/b))/(b*sqrt((a*f - b*e)/b)*(a*d - b*c)))/f, Ne(f, 0)), (sqrt(e)*( 
-2*b*d*Piecewise(((x + (a*d + b*c)/(2*b*d))/(a*d), Eq(b, 0)), (-(x + (a*d 
+ b*c)/(2*b*d))/(b*c), Eq(d, 0)), (-log(a*d - b*c - 2*b*d*(x + (a*d + b*c) 
/(2*b*d)))/(2*b*d), True))/(a*d - b*c) - 2*b*d*Piecewise(((x + (a*d + b*c) 
/(2*b*d))/(a*d), Eq(b, 0)), (-(x + (a*d + b*c)/(2*b*d))/(b*c), Eq(d, 0)), 
(log(a*d - b*c + 2*b*d*(x + (a*d + b*c)/(2*b*d)))/(2*b*d), True))/(a*d - b 
*c)), True))
 

Maxima [F(-2)]

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

integrate((f*x+e)^(1/2)/(a*c+(a*d+b*c)*x+b*d*x^2),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(c*f-d*e>0)', see `assume?` for m 
ore detail
 

Giac [A] (verification not implemented)

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

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

Output:

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

Mupad [B] (verification not implemented)

Time = 6.08 (sec) , antiderivative size = 631, normalized size of antiderivative = 5.49 \[ \int \frac {\sqrt {e+f x}}{a c+(b c+a d) x+b d x^2} \, dx=\frac {2\,\mathrm {atanh}\left (\frac {\left (2\,\sqrt {e+f\,x}\,\left (8\,a^2\,b\,d^3\,f^4-16\,a\,b^2\,d^3\,e\,f^3+8\,b^3\,c^2\,d\,f^4-16\,b^3\,c\,d^2\,e\,f^3+16\,b^3\,d^3\,e^2\,f^2\right )-\frac {2\,\sqrt {e+f\,x}\,\left (b^2\,e-a\,b\,f\right )\,\left (-8\,a^3\,b^2\,d^5\,f^3+8\,a^2\,b^3\,c\,d^4\,f^3+16\,e\,a^2\,b^3\,d^5\,f^2+8\,a\,b^4\,c^2\,d^3\,f^3-32\,e\,a\,b^4\,c\,d^4\,f^2-8\,b^5\,c^3\,d^2\,f^3+16\,e\,b^5\,c^2\,d^3\,f^2\right )}{{\left (b^2\,c-a\,b\,d\right )}^2}\right )\,\sqrt {b^2\,e-a\,b\,f}}{\left (b^2\,c-a\,b\,d\right )\,\left (16\,b^2\,d^2\,e^2\,f^3-16\,c\,b^2\,d\,e\,f^4-16\,a\,b\,d^2\,e\,f^4+16\,a\,c\,b\,d\,f^5\right )}\right )\,\sqrt {b^2\,e-a\,b\,f}}{b^2\,c-a\,b\,d}+\frac {2\,\mathrm {atanh}\left (\frac {2\,\left (\sqrt {e+f\,x}\,\left (8\,a^2\,b\,d^3\,f^4-16\,a\,b^2\,d^3\,e\,f^3+8\,b^3\,c^2\,d\,f^4-16\,b^3\,c\,d^2\,e\,f^3+16\,b^3\,d^3\,e^2\,f^2\right )-\frac {\sqrt {e+f\,x}\,\left (d^2\,e-c\,d\,f\right )\,\left (-8\,a^3\,b^2\,d^5\,f^3+8\,a^2\,b^3\,c\,d^4\,f^3+16\,e\,a^2\,b^3\,d^5\,f^2+8\,a\,b^4\,c^2\,d^3\,f^3-32\,e\,a\,b^4\,c\,d^4\,f^2-8\,b^5\,c^3\,d^2\,f^3+16\,e\,b^5\,c^2\,d^3\,f^2\right )}{{\left (a\,d^2-b\,c\,d\right )}^2}\right )\,\sqrt {d^2\,e-c\,d\,f}}{\left (a\,d^2-b\,c\,d\right )\,\left (16\,b^2\,d^2\,e^2\,f^3-16\,c\,b^2\,d\,e\,f^4-16\,a\,b\,d^2\,e\,f^4+16\,a\,c\,b\,d\,f^5\right )}\right )\,\sqrt {d^2\,e-c\,d\,f}}{a\,d^2-b\,c\,d} \] Input:

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

Output:

(2*atanh(((2*(e + f*x)^(1/2)*(8*a^2*b*d^3*f^4 + 8*b^3*c^2*d*f^4 + 16*b^3*d 
^3*e^2*f^2 - 16*a*b^2*d^3*e*f^3 - 16*b^3*c*d^2*e*f^3) - (2*(e + f*x)^(1/2) 
*(b^2*e - a*b*f)*(8*a*b^4*c^2*d^3*f^3 - 8*b^5*c^3*d^2*f^3 - 8*a^3*b^2*d^5* 
f^3 + 8*a^2*b^3*c*d^4*f^3 + 16*a^2*b^3*d^5*e*f^2 + 16*b^5*c^2*d^3*e*f^2 - 
32*a*b^4*c*d^4*e*f^2))/(b^2*c - a*b*d)^2)*(b^2*e - a*b*f)^(1/2))/((b^2*c - 
 a*b*d)*(16*b^2*d^2*e^2*f^3 - 16*a*b*d^2*e*f^4 - 16*b^2*c*d*e*f^4 + 16*a*b 
*c*d*f^5)))*(b^2*e - a*b*f)^(1/2))/(b^2*c - a*b*d) + (2*atanh((2*((e + f*x 
)^(1/2)*(8*a^2*b*d^3*f^4 + 8*b^3*c^2*d*f^4 + 16*b^3*d^3*e^2*f^2 - 16*a*b^2 
*d^3*e*f^3 - 16*b^3*c*d^2*e*f^3) - ((e + f*x)^(1/2)*(d^2*e - c*d*f)*(8*a*b 
^4*c^2*d^3*f^3 - 8*b^5*c^3*d^2*f^3 - 8*a^3*b^2*d^5*f^3 + 8*a^2*b^3*c*d^4*f 
^3 + 16*a^2*b^3*d^5*e*f^2 + 16*b^5*c^2*d^3*e*f^2 - 32*a*b^4*c*d^4*e*f^2))/ 
(a*d^2 - b*c*d)^2)*(d^2*e - c*d*f)^(1/2))/((a*d^2 - b*c*d)*(16*b^2*d^2*e^2 
*f^3 - 16*a*b*d^2*e*f^4 - 16*b^2*c*d*e*f^4 + 16*a*b*c*d*f^5)))*(d^2*e - c* 
d*f)^(1/2))/(a*d^2 - b*c*d)
 

Reduce [B] (verification not implemented)

Time = 0.24 (sec) , antiderivative size = 94, normalized size of antiderivative = 0.82 \[ \int \frac {\sqrt {e+f x}}{a c+(b c+a d) x+b d x^2} \, dx=\frac {2 \sqrt {b}\, \sqrt {a f -b e}\, \mathit {atan} \left (\frac {\sqrt {f x +e}\, b}{\sqrt {b}\, \sqrt {a f -b e}}\right ) d -2 \sqrt {d}\, \sqrt {c f -d e}\, \mathit {atan} \left (\frac {\sqrt {f x +e}\, d}{\sqrt {d}\, \sqrt {c f -d e}}\right ) b}{b d \left (a d -b c \right )} \] Input:

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

Output:

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