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

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 [B] (verification not implemented)
Mupad [B] (verification not implemented)
Reduce [B] (verification not implemented)

Optimal result

Integrand size = 27, antiderivative size = 156 \[ \int \frac {(a+b x) \sqrt {e+f x} (g+h x)}{c+d x} \, dx=-\frac {2 (b c-a d) (d g-c h) \sqrt {e+f x}}{d^3}-\frac {2 (b (d e+c f) h-d f (b g+a h)) (e+f x)^{3/2}}{3 d^2 f^2}+\frac {2 b h (e+f x)^{5/2}}{5 d f^2}+\frac {2 (b c-a d) \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^{7/2}} \] Output:

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

Mathematica [A] (verified)

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

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

Output:

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

Rubi [A] (verified)

Time = 0.28 (sec) , antiderivative size = 134, normalized size of antiderivative = 0.86, number of steps used = 5, number of rules used = 4, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.148, Rules used = {164, 60, 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 {(a+b x) \sqrt {e+f x} (g+h x)}{c+d x} \, dx\)

\(\Big \downarrow \) 164

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

\(\Big \downarrow \) 60

\(\displaystyle -\frac {(b c-a d) (d g-c h) \left (\frac {(d e-c f) \int \frac {1}{(c+d x) \sqrt {e+f x}}dx}{d}+\frac {2 \sqrt {e+f x}}{d}\right )}{d^2}-\frac {2 (e+f x)^{3/2} (-5 d f (a h+b g)+5 b c f h+2 b d e h-3 b d f h x)}{15 d^2 f^2}\)

\(\Big \downarrow \) 73

\(\displaystyle -\frac {(b c-a d) (d g-c h) \left (\frac {2 (d e-c f) \int \frac {1}{c+\frac {d (e+f x)}{f}-\frac {d e}{f}}d\sqrt {e+f x}}{d f}+\frac {2 \sqrt {e+f x}}{d}\right )}{d^2}-\frac {2 (e+f x)^{3/2} (-5 d f (a h+b g)+5 b c f h+2 b d e h-3 b d f h x)}{15 d^2 f^2}\)

\(\Big \downarrow \) 221

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

Input:

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

Output:

(-2*(e + f*x)^(3/2)*(2*b*d*e*h + 5*b*c*f*h - 5*d*f*(b*g + a*h) - 3*b*d*f*h 
*x))/(15*d^2*f^2) - ((b*c - a*d)*(d*g - c*h)*((2*Sqrt[e + f*x])/d - (2*Sqr 
t[d*e - c*f]*ArcTanh[(Sqrt[d]*Sqrt[e + f*x])/Sqrt[d*e - c*f]])/d^(3/2)))/d 
^2
 

Defintions of rubi rules used

rule 60
Int[((a_.) + (b_.)*(x_))^(m_)*((c_.) + (d_.)*(x_))^(n_), x_Symbol] :> Simp[ 
(a + b*x)^(m + 1)*((c + d*x)^n/(b*(m + n + 1))), x] + Simp[n*((b*c - a*d)/( 
b*(m + n + 1)))   Int[(a + b*x)^m*(c + d*x)^(n - 1), x], x] /; FreeQ[{a, b, 
 c, d}, x] && GtQ[n, 0] && NeQ[m + n + 1, 0] &&  !(IGtQ[m, 0] && ( !Integer 
Q[n] || (GtQ[m, 0] && LtQ[m - n, 0]))) &&  !ILtQ[m + n + 2, 0] && IntLinear 
Q[a, b, c, d, m, n, 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 164
Int[((a_.) + (b_.)*(x_))^(m_.)*((c_.) + (d_.)*(x_))^(n_.)*((e_) + (f_.)*(x_ 
))*((g_.) + (h_.)*(x_)), x_] :> Simp[(-(a*d*f*h*(n + 2) + b*c*f*h*(m + 2) - 
 b*d*(f*g + e*h)*(m + n + 3) - b*d*f*h*(m + n + 2)*x))*(a + b*x)^(m + 1)*(( 
c + d*x)^(n + 1)/(b^2*d^2*(m + n + 2)*(m + n + 3))), x] + Simp[(a^2*d^2*f*h 
*(n + 1)*(n + 2) + a*b*d*(n + 1)*(2*c*f*h*(m + 1) - d*(f*g + e*h)*(m + n + 
3)) + b^2*(c^2*f*h*(m + 1)*(m + 2) - c*d*(f*g + e*h)*(m + 1)*(m + n + 3) + 
d^2*e*g*(m + n + 2)*(m + n + 3)))/(b^2*d^2*(m + n + 2)*(m + n + 3))   Int[( 
a + b*x)^m*(c + d*x)^n, x], x] /; FreeQ[{a, b, c, d, e, f, g, h, m, n}, x] 
&& NeQ[m + n + 2, 0] && NeQ[m + n + 3, 0]
 

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.44 (sec) , antiderivative size = 171, normalized size of antiderivative = 1.10

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

Input:

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

Output:

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

Fricas [A] (verification not implemented)

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

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

Output:

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

Sympy [A] (verification not implemented)

Time = 15.14 (sec) , antiderivative size = 236, normalized size of antiderivative = 1.51 \[ \int \frac {(a+b x) \sqrt {e+f x} (g+h x)}{c+d x} \, dx=\begin {cases} \frac {2 \left (\frac {b h \left (e + f x\right )^{\frac {5}{2}}}{5 d f} + \frac {\left (e + f x\right )^{\frac {3}{2}} \left (a d f h - b c f h - b d e h + b d f g\right )}{3 d^{2} f} + \frac {\sqrt {e + f x} \left (- a c d f h + a d^{2} f g + b c^{2} f h - b c d f g\right )}{d^{3}} + \frac {f \left (a d - b c\right ) \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^{4} \sqrt {\frac {c f - d e}{d}}}\right )}{f} & \text {for}\: f \neq 0 \\\sqrt {e} \left (\frac {b h x^{2}}{2 d} + \frac {x \left (a d h - b c h + b d g\right )}{d^{2}} - \frac {\left (a d - b c\right ) \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 )}{d^{2}}\right ) & \text {otherwise} \end {cases} \] Input:

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

Output:

Piecewise((2*(b*h*(e + f*x)**(5/2)/(5*d*f) + (e + f*x)**(3/2)*(a*d*f*h - b 
*c*f*h - b*d*e*h + b*d*f*g)/(3*d**2*f) + sqrt(e + f*x)*(-a*c*d*f*h + a*d** 
2*f*g + b*c**2*f*h - b*c*d*f*g)/d**3 + f*(a*d - b*c)*(c*f - d*e)*(c*h - d* 
g)*atan(sqrt(e + f*x)/sqrt((c*f - d*e)/d))/(d**4*sqrt((c*f - d*e)/d)))/f, 
Ne(f, 0)), (sqrt(e)*(b*h*x**2/(2*d) + x*(a*d*h - b*c*h + b*d*g)/d**2 - (a* 
d - b*c)*(c*h - d*g)*Piecewise((x/c, Eq(d, 0)), (log(c + d*x)/d, True))/d* 
*2), True))
 

Maxima [F(-2)]

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

integrate((b*x+a)*(f*x+e)^(1/2)*(h*x+g)/(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 [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 278 vs. \(2 (136) = 272\).

Time = 0.14 (sec) , antiderivative size = 278, normalized size of antiderivative = 1.78 \[ \int \frac {(a+b x) \sqrt {e+f x} (g+h x)}{c+d x} \, dx=-\frac {2 \, {\left (b c d^{2} e g - a d^{3} e g - b c^{2} d f g + a c d^{2} f g - b c^{2} d e h + a c d^{2} e h + b c^{3} f h - a c^{2} d f h\right )} \arctan \left (\frac {\sqrt {f x + e} d}{\sqrt {-d^{2} e + c d f}}\right )}{\sqrt {-d^{2} e + c d f} d^{3}} + \frac {2 \, {\left (5 \, {\left (f x + e\right )}^{\frac {3}{2}} b d^{4} f^{9} g - 15 \, \sqrt {f x + e} b c d^{3} f^{10} g + 15 \, \sqrt {f x + e} a d^{4} f^{10} g + 3 \, {\left (f x + e\right )}^{\frac {5}{2}} b d^{4} f^{8} h - 5 \, {\left (f x + e\right )}^{\frac {3}{2}} b d^{4} e f^{8} h - 5 \, {\left (f x + e\right )}^{\frac {3}{2}} b c d^{3} f^{9} h + 5 \, {\left (f x + e\right )}^{\frac {3}{2}} a d^{4} f^{9} h + 15 \, \sqrt {f x + e} b c^{2} d^{2} f^{10} h - 15 \, \sqrt {f x + e} a c d^{3} f^{10} h\right )}}{15 \, d^{5} f^{10}} \] Input:

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

Output:

-2*(b*c*d^2*e*g - a*d^3*e*g - b*c^2*d*f*g + a*c*d^2*f*g - b*c^2*d*e*h + a* 
c*d^2*e*h + b*c^3*f*h - a*c^2*d*f*h)*arctan(sqrt(f*x + e)*d/sqrt(-d^2*e + 
c*d*f))/(sqrt(-d^2*e + c*d*f)*d^3) + 2/15*(5*(f*x + e)^(3/2)*b*d^4*f^9*g - 
 15*sqrt(f*x + e)*b*c*d^3*f^10*g + 15*sqrt(f*x + e)*a*d^4*f^10*g + 3*(f*x 
+ e)^(5/2)*b*d^4*f^8*h - 5*(f*x + e)^(3/2)*b*d^4*e*f^8*h - 5*(f*x + e)^(3/ 
2)*b*c*d^3*f^9*h + 5*(f*x + e)^(3/2)*a*d^4*f^9*h + 15*sqrt(f*x + e)*b*c^2* 
d^2*f^10*h - 15*sqrt(f*x + e)*a*c*d^3*f^10*h)/(d^5*f^10)
 

Mupad [B] (verification not implemented)

Time = 0.14 (sec) , antiderivative size = 231, normalized size of antiderivative = 1.48 \[ \int \frac {(a+b x) \sqrt {e+f x} (g+h x)}{c+d x} \, dx={\left (e+f\,x\right )}^{3/2}\,\left (\frac {2\,a\,f\,h-4\,b\,e\,h+2\,b\,f\,g}{3\,d\,f^2}-\frac {2\,b\,h\,\left (c\,f^3-d\,e\,f^2\right )}{3\,d^2\,f^4}\right )-\sqrt {e+f\,x}\,\left (\frac {2\,\left (a\,f-b\,e\right )\,\left (e\,h-f\,g\right )}{d\,f^2}+\frac {\left (c\,f^3-d\,e\,f^2\right )\,\left (\frac {2\,a\,f\,h-4\,b\,e\,h+2\,b\,f\,g}{d\,f^2}-\frac {2\,b\,h\,\left (c\,f^3-d\,e\,f^2\right )}{d^2\,f^4}\right )}{d\,f^2}\right )+\frac {2\,b\,h\,{\left (e+f\,x\right )}^{5/2}}{5\,d\,f^2}-\frac {\mathrm {atan}\left (\frac {\sqrt {d}\,\sqrt {e+f\,x}\,1{}\mathrm {i}}{\sqrt {d\,e-c\,f}}\right )\,\left (a\,d-b\,c\right )\,\sqrt {d\,e-c\,f}\,\left (c\,h-d\,g\right )\,2{}\mathrm {i}}{d^{7/2}} \] Input:

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

Output:

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

Reduce [B] (verification not implemented)

Time = 0.16 (sec) , antiderivative size = 402, normalized size of antiderivative = 2.58 \[ \int \frac {(a+b x) \sqrt {e+f x} (g+h x)}{c+d x} \, dx=\frac {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 ) a c d \,f^{2} 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 ) a \,d^{2} f^{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 \,c^{2} f^{2} 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 c d \,f^{2} g -2 \sqrt {f x +e}\, a c \,d^{2} f^{2} h +\frac {2 \sqrt {f x +e}\, a \,d^{3} e f h}{3}+2 \sqrt {f x +e}\, a \,d^{3} f^{2} g +\frac {2 \sqrt {f x +e}\, a \,d^{3} f^{2} h x}{3}+2 \sqrt {f x +e}\, b \,c^{2} d \,f^{2} h -\frac {2 \sqrt {f x +e}\, b c \,d^{2} e f h}{3}-2 \sqrt {f x +e}\, b c \,d^{2} f^{2} g -\frac {2 \sqrt {f x +e}\, b c \,d^{2} f^{2} h x}{3}-\frac {4 \sqrt {f x +e}\, b \,d^{3} e^{2} h}{15}+\frac {2 \sqrt {f x +e}\, b \,d^{3} e f g}{3}+\frac {2 \sqrt {f x +e}\, b \,d^{3} e f h x}{15}+\frac {2 \sqrt {f x +e}\, b \,d^{3} f^{2} g x}{3}+\frac {2 \sqrt {f x +e}\, b \,d^{3} f^{2} h \,x^{2}}{5}}{d^{4} f^{2}} \] Input:

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

Output:

(2*(15*sqrt(d)*sqrt(c*f - d*e)*atan((sqrt(e + f*x)*d)/(sqrt(d)*sqrt(c*f - 
d*e)))*a*c*d*f**2*h - 15*sqrt(d)*sqrt(c*f - d*e)*atan((sqrt(e + f*x)*d)/(s 
qrt(d)*sqrt(c*f - d*e)))*a*d**2*f**2*g - 15*sqrt(d)*sqrt(c*f - d*e)*atan(( 
sqrt(e + f*x)*d)/(sqrt(d)*sqrt(c*f - d*e)))*b*c**2*f**2*h + 15*sqrt(d)*sqr 
t(c*f - d*e)*atan((sqrt(e + f*x)*d)/(sqrt(d)*sqrt(c*f - d*e)))*b*c*d*f**2* 
g - 15*sqrt(e + f*x)*a*c*d**2*f**2*h + 5*sqrt(e + f*x)*a*d**3*e*f*h + 15*s 
qrt(e + f*x)*a*d**3*f**2*g + 5*sqrt(e + f*x)*a*d**3*f**2*h*x + 15*sqrt(e + 
 f*x)*b*c**2*d*f**2*h - 5*sqrt(e + f*x)*b*c*d**2*e*f*h - 15*sqrt(e + f*x)* 
b*c*d**2*f**2*g - 5*sqrt(e + f*x)*b*c*d**2*f**2*h*x - 2*sqrt(e + f*x)*b*d* 
*3*e**2*h + 5*sqrt(e + f*x)*b*d**3*e*f*g + sqrt(e + f*x)*b*d**3*e*f*h*x + 
5*sqrt(e + f*x)*b*d**3*f**2*g*x + 3*sqrt(e + f*x)*b*d**3*f**2*h*x**2))/(15 
*d**4*f**2)