\(\int \frac {\sqrt {e+f x} (g+h x)}{(a+b x) (c+d x)} \, dx\) [37]

Optimal result
Mathematica [A] (verified)
Rubi [A] (verified)
Maple [A] (verified)
Fricas [A] (verification not implemented)
Sympy [A] (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 = 29, antiderivative size = 149 \[ \int \frac {\sqrt {e+f x} (g+h x)}{(a+b x) (c+d x)} \, dx=\frac {2 h \sqrt {e+f x}}{b d}-\frac {2 \sqrt {b e-a f} (b g-a h) \text {arctanh}\left (\frac {\sqrt {b} \sqrt {e+f x}}{\sqrt {b e-a f}}\right )}{b^{3/2} (b c-a d)}+\frac {2 \sqrt {d e-c f} (d g-c h) \text {arctanh}\left (\frac {\sqrt {d} \sqrt {e+f x}}{\sqrt {d e-c f}}\right )}{d^{3/2} (b c-a d)} \] Output:

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

Mathematica [A] (verified)

Time = 0.44 (sec) , antiderivative size = 159, normalized size of antiderivative = 1.07 \[ \int \frac {\sqrt {e+f x} (g+h x)}{(a+b x) (c+d x)} \, dx=\frac {-2 d^{3/2} \sqrt {-b e+a f} (b g-a h) \arctan \left (\frac {\sqrt {b} \sqrt {e+f x}}{\sqrt {-b e+a f}}\right )+2 \sqrt {b} \left (\sqrt {d} (b c-a d) h \sqrt {e+f x}+b \sqrt {-d e+c f} (d g-c h) \arctan \left (\frac {\sqrt {d} \sqrt {e+f x}}{\sqrt {-d e+c f}}\right )\right )}{b^{3/2} d^{3/2} (b c-a d)} \] Input:

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

Output:

(-2*d^(3/2)*Sqrt[-(b*e) + a*f]*(b*g - a*h)*ArcTan[(Sqrt[b]*Sqrt[e + f*x])/ 
Sqrt[-(b*e) + a*f]] + 2*Sqrt[b]*(Sqrt[d]*(b*c - a*d)*h*Sqrt[e + f*x] + b*S 
qrt[-(d*e) + c*f]*(d*g - c*h)*ArcTan[(Sqrt[d]*Sqrt[e + f*x])/Sqrt[-(d*e) + 
 c*f]]))/(b^(3/2)*d^(3/2)*(b*c - a*d))
 

Rubi [A] (verified)

Time = 0.40 (sec) , antiderivative size = 159, normalized size of antiderivative = 1.07, number of steps used = 6, number of rules used = 5, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.172, Rules used = {171, 27, 174, 73, 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} (g+h x)}{(a+b x) (c+d x)} \, dx\)

\(\Big \downarrow \) 171

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

\(\Big \downarrow \) 27

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

\(\Big \downarrow \) 174

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

\(\Big \downarrow \) 73

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

\(\Big \downarrow \) 221

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

Input:

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

Output:

(2*h*Sqrt[e + f*x])/(b*d) + ((-2*d*Sqrt[b*e - a*f]*(b*g - a*h)*ArcTanh[(Sq 
rt[b]*Sqrt[e + f*x])/Sqrt[b*e - a*f]])/(Sqrt[b]*(b*c - a*d)) + (2*b*Sqrt[d 
*e - c*f]*(d*g - c*h)*ArcTanh[(Sqrt[d]*Sqrt[e + f*x])/Sqrt[d*e - c*f]])/(S 
qrt[d]*(b*c - a*d)))/(b*d)
 

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 73
Int[((a_.) + (b_.)*(x_))^(m_)*((c_.) + (d_.)*(x_))^(n_), x_Symbol] :> With[ 
{p = Denominator[m]}, Simp[p/b   Subst[Int[x^(p*(m + 1) - 1)*(c - a*(d/b) + 
 d*(x^p/b))^n, x], x, (a + b*x)^(1/p)], x]] /; FreeQ[{a, b, c, d}, x] && Lt 
Q[-1, m, 0] && LeQ[-1, n, 0] && LeQ[Denominator[n], Denominator[m]] && IntL 
inearQ[a, b, c, d, m, n, x]
 

rule 171
Int[((a_.) + (b_.)*(x_))^(m_)*((c_.) + (d_.)*(x_))^(n_)*((e_.) + (f_.)*(x_) 
)^(p_)*((g_.) + (h_.)*(x_)), x_] :> Simp[h*(a + b*x)^m*(c + d*x)^(n + 1)*(( 
e + f*x)^(p + 1)/(d*f*(m + n + p + 2))), x] + Simp[1/(d*f*(m + n + p + 2)) 
  Int[(a + b*x)^(m - 1)*(c + d*x)^n*(e + f*x)^p*Simp[a*d*f*g*(m + n + p + 2 
) - h*(b*c*e*m + a*(d*e*(n + 1) + c*f*(p + 1))) + (b*d*f*g*(m + n + p + 2) 
+ h*(a*d*f*m - b*(d*e*(m + n + 1) + c*f*(m + p + 1))))*x, x], x], x] /; Fre 
eQ[{a, b, c, d, e, f, g, h, n, p}, x] && GtQ[m, 0] && NeQ[m + n + p + 2, 0] 
 && IntegersQ[2*m, 2*n, 2*p]
 

rule 174
Int[(((e_.) + (f_.)*(x_))^(p_)*((g_.) + (h_.)*(x_)))/(((a_.) + (b_.)*(x_))* 
((c_.) + (d_.)*(x_))), x_] :> Simp[(b*g - a*h)/(b*c - a*d)   Int[(e + f*x)^ 
p/(a + b*x), x], x] - Simp[(d*g - c*h)/(b*c - a*d)   Int[(e + f*x)^p/(c + d 
*x), x], x] /; FreeQ[{a, b, c, d, e, f, g, h}, x]
 

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]
 
Maple [A] (verified)

Time = 0.68 (sec) , antiderivative size = 166, normalized size of antiderivative = 1.11

method result size
derivativedivides \(\frac {2 h \sqrt {f x +e}}{b d}+\frac {2 \left (-a^{2} f h +a b e h +a b f g -b^{2} e g \right ) \arctan \left (\frac {b \sqrt {f x +e}}{\sqrt {\left (a f -b e \right ) b}}\right )}{\left (a d -b c \right ) b \sqrt {\left (a f -b e \right ) b}}+\frac {2 \left (c^{2} f h -c d e h -c d f g +d^{2} e g \right ) \arctan \left (\frac {d \sqrt {f x +e}}{\sqrt {\left (c f -d e \right ) d}}\right )}{d \left (a d -b c \right ) \sqrt {\left (c f -d e \right ) d}}\) \(166\)
default \(\frac {2 h \sqrt {f x +e}}{b d}+\frac {2 \left (-a^{2} f h +a b e h +a b f g -b^{2} e g \right ) \arctan \left (\frac {b \sqrt {f x +e}}{\sqrt {\left (a f -b e \right ) b}}\right )}{\left (a d -b c \right ) b \sqrt {\left (a f -b e \right ) b}}+\frac {2 \left (c^{2} f h -c d e h -c d f g +d^{2} e g \right ) \arctan \left (\frac {d \sqrt {f x +e}}{\sqrt {\left (c f -d e \right ) d}}\right )}{d \left (a d -b c \right ) \sqrt {\left (c f -d e \right ) d}}\) \(166\)
risch \(\frac {2 h \sqrt {f x +e}}{b d}-\frac {\frac {2 d \left (a^{2} f h -a b e h -a b f g +b^{2} e g \right ) \arctan \left (\frac {b \sqrt {f x +e}}{\sqrt {\left (a f -b e \right ) b}}\right )}{\left (a d -b c \right ) \sqrt {\left (a f -b e \right ) b}}-\frac {2 b \left (c^{2} f h -c d e h -c d f g +d^{2} e g \right ) \arctan \left (\frac {d \sqrt {f x +e}}{\sqrt {\left (c f -d e \right ) d}}\right )}{\left (a d -b c \right ) \sqrt {\left (c f -d e \right ) d}}}{b d}\) \(171\)
pseudoelliptic \(\frac {-2 \left (a h -b g \right ) d \sqrt {\left (c f -d e \right ) d}\, \left (a f -b e \right ) \arctan \left (\frac {b \sqrt {f x +e}}{\sqrt {\left (a f -b e \right ) b}}\right )+2 \sqrt {\left (a f -b e \right ) b}\, \left (b \left (c h -d g \right ) \left (c f -d e \right ) \arctan \left (\frac {d \sqrt {f x +e}}{\sqrt {\left (c f -d e \right ) d}}\right )+\left (a d -b c \right ) \sqrt {f x +e}\, \sqrt {\left (c f -d e \right ) d}\, h \right )}{b d \left (a d -b c \right ) \sqrt {\left (a f -b e \right ) b}\, \sqrt {\left (c f -d e \right ) d}}\) \(180\)

Input:

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

Output:

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

Fricas [A] (verification not implemented)

Time = 0.54 (sec) , antiderivative size = 680, normalized size of antiderivative = 4.56 \[ \int \frac {\sqrt {e+f x} (g+h x)}{(a+b x) (c+d x)} \, dx=\left [\frac {2 \, {\left (b c - a d\right )} \sqrt {f x + e} h + {\left (b d g - a d h\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 ) + {\left (b d g - b c h\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^{2} c d - a b d^{2}}, \frac {2 \, {\left (b c - a d\right )} \sqrt {f x + e} h - 2 \, {\left (b d g - a d h\right )} \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 ) + {\left (b d g - b c h\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^{2} c d - a b d^{2}}, \frac {2 \, {\left (b c - a d\right )} \sqrt {f x + e} h + 2 \, {\left (b d g - b c h\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 ) + {\left (b d g - a d h\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^{2} c d - a b d^{2}}, \frac {2 \, {\left ({\left (b c - a d\right )} \sqrt {f x + e} h - {\left (b d g - a d h\right )} \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 ) + {\left (b d g - b c h\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^{2} c d - a b d^{2}}\right ] \] Input:

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

Output:

[(2*(b*c - a*d)*sqrt(f*x + e)*h + (b*d*g - a*d*h)*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*d*g - b*c*h)*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^2*c*d - a*b*d^2), (2*(b*c - a* 
d)*sqrt(f*x + e)*h - 2*(b*d*g - a*d*h)*sqrt(-(b*e - a*f)/b)*arctan(-sqrt(f 
*x + e)*b*sqrt(-(b*e - a*f)/b)/(b*e - a*f)) + (b*d*g - b*c*h)*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^2*c*d - a*b*d^2), (2*(b*c - a*d)*sqrt(f*x + e)*h + 2*(b*d*g 
 - b*c*h)*sqrt(-(d*e - c*f)/d)*arctan(-sqrt(f*x + e)*d*sqrt(-(d*e - c*f)/d 
)/(d*e - c*f)) + (b*d*g - a*d*h)*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^2*c*d - a*b*d^ 
2), 2*((b*c - a*d)*sqrt(f*x + e)*h - (b*d*g - a*d*h)*sqrt(-(b*e - a*f)/b)* 
arctan(-sqrt(f*x + e)*b*sqrt(-(b*e - a*f)/b)/(b*e - a*f)) + (b*d*g - b*c*h 
)*sqrt(-(d*e - c*f)/d)*arctan(-sqrt(f*x + e)*d*sqrt(-(d*e - c*f)/d)/(d*e - 
 c*f)))/(b^2*c*d - a*b*d^2)]
                                                                                    
                                                                                    
 

Sympy [A] (verification not implemented)

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

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

Output:

Piecewise((2*(f*(c*f - d*e)*(c*h - d*g)*atan(sqrt(e + f*x)/sqrt((c*f - d*e 
)/d))/(d**2*sqrt((c*f - d*e)/d)*(a*d - b*c)) + f*h*sqrt(e + f*x)/(b*d) - f 
*(a*f - b*e)*(a*h - b*g)*atan(sqrt(e + f*x)/sqrt((a*f - b*e)/b))/(b**2*sqr 
t((a*f - b*e)/b)*(a*d - b*c)))/f, Ne(f, 0)), (sqrt(e)*((a*h - b*g)*Piecewi 
se((x/a, Eq(b, 0)), (log(a + b*x)/b, True))/(a*d - b*c) - (c*h - d*g)*Piec 
ewise((x/c, Eq(d, 0)), (log(c + d*x)/d, True))/(a*d - b*c)), True))
 

Maxima [F(-2)]

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

integrate((f*x+e)^(1/2)*(h*x+g)/(b*x+a)/(d*x+c),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.12 (sec) , antiderivative size = 169, normalized size of antiderivative = 1.13 \[ \int \frac {\sqrt {e+f x} (g+h x)}{(a+b x) (c+d x)} \, dx=\frac {2 \, {\left (b^{2} e g - a b f g - a b e h + a^{2} f h\right )} \arctan \left (\frac {\sqrt {f x + e} b}{\sqrt {-b^{2} e + a b f}}\right )}{{\left (b^{2} c - a b d\right )} \sqrt {-b^{2} e + a b f}} - \frac {2 \, {\left (d^{2} e g - c d f g - c d e h + c^{2} f h\right )} \arctan \left (\frac {\sqrt {f x + e} d}{\sqrt {-d^{2} e + c d f}}\right )}{{\left (b c d - a d^{2}\right )} \sqrt {-d^{2} e + c d f}} + \frac {2 \, \sqrt {f x + e} h}{b d} \] Input:

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

Output:

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

Mupad [B] (verification not implemented)

Time = 3.38 (sec) , antiderivative size = 6793, normalized size of antiderivative = 45.59 \[ \int \frac {\sqrt {e+f x} (g+h x)}{(a+b x) (c+d x)} \, dx=\text {Too large to display} \] Input:

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

Output:

(2*h*(e + f*x)^(1/2))/(b*d) - (atan(((((((8*(a*b^4*c^3*d^2*f^4*h + a^3*b^2 
*c*d^4*f^4*h - a^3*b^2*d^5*e*f^3*h - b^5*c^3*d^2*e*f^3*h - 2*a^2*b^3*c^2*d 
^3*f^4*h + a^2*b^3*d^5*e^2*f^2*h + b^5*c^2*d^3*e^2*f^2*h - 2*a*b^4*c*d^4*e 
^2*f^2*h + a*b^4*c^2*d^3*e*f^3*h + a^2*b^3*c*d^4*e*f^3*h))/(b*d) - (8*(e + 
 f*x)^(1/2)*(a*h - b*g)*(-b^3*(a*f - b*e))^(1/2)*(a*b^5*c^2*d^4*f^3 - b^6* 
c^3*d^3*f^3 - a^3*b^3*d^6*f^3 + a^2*b^4*c*d^5*f^3 + 2*a^2*b^4*d^6*e*f^2 + 
2*b^6*c^2*d^4*e*f^2 - 4*a*b^5*c*d^5*e*f^2))/(b*d*(b^4*c - a*b^3*d)))*(a*h 
- b*g)*(-b^3*(a*f - b*e))^(1/2))/(b^4*c - a*b^3*d) + (8*(e + f*x)^(1/2)*(a 
^4*d^4*f^4*h^2 + b^4*c^4*f^4*h^2 + a^2*b^2*d^4*f^4*g^2 + b^4*c^2*d^2*f^4*g 
^2 + 2*b^4*d^4*e^2*f^2*g^2 - 2*a*b^3*d^4*e*f^3*g^2 - 2*a^3*b*d^4*e*f^3*h^2 
 - 2*b^4*c*d^3*e*f^3*g^2 - 2*b^4*c^3*d*e*f^3*h^2 - 2*a^3*b*d^4*f^4*g*h - 2 
*b^4*c^3*d*f^4*g*h + a^2*b^2*d^4*e^2*f^2*h^2 + b^4*c^2*d^2*e^2*f^2*h^2 - 2 
*a*b^3*d^4*e^2*f^2*g*h + 4*a^2*b^2*d^4*e*f^3*g*h - 2*b^4*c*d^3*e^2*f^2*g*h 
 + 4*b^4*c^2*d^2*e*f^3*g*h))/(b*d))*(a*h - b*g)*(-b^3*(a*f - b*e))^(1/2)*1 
i)/(b^4*c - a*b^3*d) - (((((8*(a*b^4*c^3*d^2*f^4*h + a^3*b^2*c*d^4*f^4*h - 
 a^3*b^2*d^5*e*f^3*h - b^5*c^3*d^2*e*f^3*h - 2*a^2*b^3*c^2*d^3*f^4*h + a^2 
*b^3*d^5*e^2*f^2*h + b^5*c^2*d^3*e^2*f^2*h - 2*a*b^4*c*d^4*e^2*f^2*h + a*b 
^4*c^2*d^3*e*f^3*h + a^2*b^3*c*d^4*e*f^3*h))/(b*d) + (8*(e + f*x)^(1/2)*(a 
*h - b*g)*(-b^3*(a*f - b*e))^(1/2)*(a*b^5*c^2*d^4*f^3 - b^6*c^3*d^3*f^3 - 
a^3*b^3*d^6*f^3 + a^2*b^4*c*d^5*f^3 + 2*a^2*b^4*d^6*e*f^2 + 2*b^6*c^2*d...
 

Reduce [B] (verification not implemented)

Time = 0.15 (sec) , antiderivative size = 212, normalized size of antiderivative = 1.42 \[ \int \frac {\sqrt {e+f x} (g+h x)}{(a+b x) (c+d x)} \, 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 ) a \,d^{2} h +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 ) b \,d^{2} g +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^{2} c h -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^{2} d g +2 \sqrt {f x +e}\, a b \,d^{2} h -2 \sqrt {f x +e}\, b^{2} c d h}{b^{2} d^{2} \left (a d -b c \right )} \] Input:

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

Output:

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