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

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

Optimal result

Integrand size = 25, antiderivative size = 159 \[ \int (a+b x) (c+d x) \sqrt {e+f x} (g+h x) \, dx=\frac {2 (b e-a f) (d e-c f) (f g-e h) (e+f x)^{3/2}}{3 f^4}-\frac {2 (b d e (2 f g-3 e h)-b c f (f g-2 e h)-a f (d f g-2 d e h+c f h)) (e+f x)^{5/2}}{5 f^4}+\frac {2 (a d f h+b (d f g-3 d e h+c f h)) (e+f x)^{7/2}}{7 f^4}+\frac {2 b d h (e+f x)^{9/2}}{9 f^4} \] Output:

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

Mathematica [A] (verified)

Time = 0.12 (sec) , antiderivative size = 166, normalized size of antiderivative = 1.04 \[ \int (a+b x) (c+d x) \sqrt {e+f x} (g+h x) \, dx=\frac {2 (e+f x)^{3/2} \left (3 a f \left (7 c f (5 f g-2 e h+3 f h x)+d \left (8 e^2 h+3 f^2 x (7 g+5 h x)-2 e f (7 g+6 h x)\right )\right )+b \left (3 c f \left (8 e^2 h+3 f^2 x (7 g+5 h x)-2 e f (7 g+6 h x)\right )+d \left (-16 e^3 h+24 e^2 f (g+h x)-6 e f^2 x (6 g+5 h x)+5 f^3 x^2 (9 g+7 h x)\right )\right )\right )}{315 f^4} \] Input:

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

Output:

(2*(e + f*x)^(3/2)*(3*a*f*(7*c*f*(5*f*g - 2*e*h + 3*f*h*x) + d*(8*e^2*h + 
3*f^2*x*(7*g + 5*h*x) - 2*e*f*(7*g + 6*h*x))) + b*(3*c*f*(8*e^2*h + 3*f^2* 
x*(7*g + 5*h*x) - 2*e*f*(7*g + 6*h*x)) + d*(-16*e^3*h + 24*e^2*f*(g + h*x) 
 - 6*e*f^2*x*(6*g + 5*h*x) + 5*f^3*x^2*(9*g + 7*h*x)))))/(315*f^4)
 

Rubi [A] (verified)

Time = 0.33 (sec) , antiderivative size = 159, normalized size of antiderivative = 1.00, number of steps used = 2, number of rules used = 2, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.080, Rules used = {159, 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 (a+b x) (c+d x) \sqrt {e+f x} (g+h x) \, dx\)

\(\Big \downarrow \) 159

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

\(\Big \downarrow \) 2009

\(\displaystyle \frac {2 (e+f x)^{7/2} (a d f h+b (c f h-3 d e h+d f g))}{7 f^4}-\frac {2 (e+f x)^{5/2} (-a f (c f h-2 d e h+d f g)-b c f (f g-2 e h)+b d e (2 f g-3 e h))}{5 f^4}+\frac {2 (e+f x)^{3/2} (b e-a f) (d e-c f) (f g-e h)}{3 f^4}+\frac {2 b d h (e+f x)^{9/2}}{9 f^4}\)

Input:

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

Output:

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

Defintions of rubi rules used

rule 159
Int[((a_.) + (b_.)*(x_))^(m_.)*((c_.) + (d_.)*(x_))^(n_.)*((e_) + (f_.)*(x_ 
))*((g_.) + (h_.)*(x_)), x_] :> Int[ExpandIntegrand[(a + b*x)^m*(c + d*x)^n 
*(e + f*x)*(g + h*x), x], x] /; FreeQ[{a, b, c, d, e, f, g, h}, x] && (IGtQ 
[m, 0] || IntegersQ[m, n])
 

rule 2009
Int[u_, x_Symbol] :> Simp[IntSum[u, x], x] /; SumQ[u]
 
Maple [A] (verified)

Time = 0.82 (sec) , antiderivative size = 138, normalized size of antiderivative = 0.87

method result size
pseudoelliptic \(-\frac {4 \left (\frac {\left (-3 x \left (\frac {5 x \left (\frac {7 h x}{9}+g \right ) d}{7}+c \left (\frac {5 h x}{7}+g \right )\right ) b -5 a \left (\frac {3 x \left (\frac {5 h x}{7}+g \right ) d}{5}+c \left (\frac {3 h x}{5}+g \right )\right )\right ) f^{3}}{2}+\left (\left (\frac {6 x \left (\frac {5 h x}{6}+g \right ) d}{7}+c \left (\frac {6 h x}{7}+g \right )\right ) b +a \left (\left (\frac {6 h x}{7}+g \right ) d +c h \right )\right ) e \,f^{2}-\frac {4 \left (\left (\left (h x +g \right ) d +c h \right ) b +a d h \right ) e^{2} f}{7}+\frac {8 b d \,e^{3} h}{21}\right ) \left (f x +e \right )^{\frac {3}{2}}}{15 f^{4}}\) \(138\)
derivativedivides \(\frac {\frac {2 d b h \left (f x +e \right )^{\frac {9}{2}}}{9}+\frac {2 \left (\left (\left (a f -b e \right ) d +b \left (c f -d e \right )\right ) h +d b \left (-e h +f g \right )\right ) \left (f x +e \right )^{\frac {7}{2}}}{7}+\frac {2 \left (\left (a f -b e \right ) \left (c f -d e \right ) h +\left (\left (a f -b e \right ) d +b \left (c f -d e \right )\right ) \left (-e h +f g \right )\right ) \left (f x +e \right )^{\frac {5}{2}}}{5}+\frac {2 \left (a f -b e \right ) \left (c f -d e \right ) \left (-e h +f g \right ) \left (f x +e \right )^{\frac {3}{2}}}{3}}{f^{4}}\) \(154\)
default \(\frac {\frac {2 d b h \left (f x +e \right )^{\frac {9}{2}}}{9}+\frac {2 \left (-\left (\left (-a f +b e \right ) d -b \left (c f -d e \right )\right ) h -d b \left (e h -f g \right )\right ) \left (f x +e \right )^{\frac {7}{2}}}{7}+\frac {2 \left (-\left (-a f +b e \right ) \left (c f -d e \right ) h +\left (\left (-a f +b e \right ) d -b \left (c f -d e \right )\right ) \left (e h -f g \right )\right ) \left (f x +e \right )^{\frac {5}{2}}}{5}+\frac {2 \left (-a f +b e \right ) \left (c f -d e \right ) \left (e h -f g \right ) \left (f x +e \right )^{\frac {3}{2}}}{3}}{f^{4}}\) \(159\)
gosper \(-\frac {2 \left (f x +e \right )^{\frac {3}{2}} \left (-35 b d h \,x^{3} f^{3}-45 a d \,f^{3} h \,x^{2}-45 b c \,f^{3} h \,x^{2}+30 b d e \,f^{2} h \,x^{2}-45 b d \,f^{3} g \,x^{2}-63 a c \,f^{3} h x +36 a d e \,f^{2} h x -63 a d \,f^{3} g x +36 b c e \,f^{2} h x -63 b c \,f^{3} g x -24 b d \,e^{2} f h x +36 b d e \,f^{2} g x +42 a c e \,f^{2} h -105 a c g \,f^{3}-24 a d \,e^{2} f h +42 a d e \,f^{2} g -24 b c \,e^{2} f h +42 b c e \,f^{2} g +16 b d \,e^{3} h -24 b d \,e^{2} f g \right )}{315 f^{4}}\) \(207\)
orering \(-\frac {2 \left (f x +e \right )^{\frac {3}{2}} \left (-35 b d h \,x^{3} f^{3}-45 a d \,f^{3} h \,x^{2}-45 b c \,f^{3} h \,x^{2}+30 b d e \,f^{2} h \,x^{2}-45 b d \,f^{3} g \,x^{2}-63 a c \,f^{3} h x +36 a d e \,f^{2} h x -63 a d \,f^{3} g x +36 b c e \,f^{2} h x -63 b c \,f^{3} g x -24 b d \,e^{2} f h x +36 b d e \,f^{2} g x +42 a c e \,f^{2} h -105 a c g \,f^{3}-24 a d \,e^{2} f h +42 a d e \,f^{2} g -24 b c \,e^{2} f h +42 b c e \,f^{2} g +16 b d \,e^{3} h -24 b d \,e^{2} f g \right )}{315 f^{4}}\) \(207\)
trager \(-\frac {2 \left (-35 d b h \,f^{4} x^{4}-45 a d \,f^{4} h \,x^{3}-45 b c \,f^{4} h \,x^{3}-5 b d e \,f^{3} h \,x^{3}-45 b d \,f^{4} g \,x^{3}-63 a c \,f^{4} h \,x^{2}-9 a d e \,f^{3} h \,x^{2}-63 a d \,f^{4} g \,x^{2}-9 b c e \,f^{3} h \,x^{2}-63 b c \,f^{4} g \,x^{2}+6 b d \,e^{2} f^{2} h \,x^{2}-9 b d e \,f^{3} g \,x^{2}-21 a c e \,f^{3} h x -105 a c \,f^{4} g x +12 a d \,e^{2} f^{2} h x -21 a d e \,f^{3} g x +12 b c \,e^{2} f^{2} h x -21 b c e \,f^{3} g x -8 b d \,e^{3} f h x +12 b d \,e^{2} f^{2} g x +42 a c \,e^{2} f^{2} h -105 a c e \,f^{3} g -24 a d \,e^{3} f h +42 a d \,e^{2} f^{2} g -24 b c \,e^{3} f h +42 b c \,e^{2} f^{2} g +16 b d \,e^{4} h -24 b d \,e^{3} f g \right ) \sqrt {f x +e}}{315 f^{4}}\) \(315\)
risch \(-\frac {2 \left (-35 d b h \,f^{4} x^{4}-45 a d \,f^{4} h \,x^{3}-45 b c \,f^{4} h \,x^{3}-5 b d e \,f^{3} h \,x^{3}-45 b d \,f^{4} g \,x^{3}-63 a c \,f^{4} h \,x^{2}-9 a d e \,f^{3} h \,x^{2}-63 a d \,f^{4} g \,x^{2}-9 b c e \,f^{3} h \,x^{2}-63 b c \,f^{4} g \,x^{2}+6 b d \,e^{2} f^{2} h \,x^{2}-9 b d e \,f^{3} g \,x^{2}-21 a c e \,f^{3} h x -105 a c \,f^{4} g x +12 a d \,e^{2} f^{2} h x -21 a d e \,f^{3} g x +12 b c \,e^{2} f^{2} h x -21 b c e \,f^{3} g x -8 b d \,e^{3} f h x +12 b d \,e^{2} f^{2} g x +42 a c \,e^{2} f^{2} h -105 a c e \,f^{3} g -24 a d \,e^{3} f h +42 a d \,e^{2} f^{2} g -24 b c \,e^{3} f h +42 b c \,e^{2} f^{2} g +16 b d \,e^{4} h -24 b d \,e^{3} f g \right ) \sqrt {f x +e}}{315 f^{4}}\) \(315\)

Input:

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

Output:

-4/15*(1/2*(-3*x*(5/7*x*(7/9*h*x+g)*d+c*(5/7*h*x+g))*b-5*a*(3/5*x*(5/7*h*x 
+g)*d+c*(3/5*h*x+g)))*f^3+((6/7*x*(5/6*h*x+g)*d+c*(6/7*h*x+g))*b+a*((6/7*h 
*x+g)*d+c*h))*e*f^2-4/7*(((h*x+g)*d+c*h)*b+a*d*h)*e^2*f+8/21*b*d*e^3*h)*(f 
*x+e)^(3/2)/f^4
 

Fricas [A] (verification not implemented)

Time = 0.07 (sec) , antiderivative size = 265, normalized size of antiderivative = 1.67 \[ \int (a+b x) (c+d x) \sqrt {e+f x} (g+h x) \, dx=\frac {2 \, {\left (35 \, b d f^{4} h x^{4} + 5 \, {\left (9 \, b d f^{4} g + {\left (b d e f^{3} + 9 \, {\left (b c + a d\right )} f^{4}\right )} h\right )} x^{3} + 3 \, {\left (3 \, {\left (b d e f^{3} + 7 \, {\left (b c + a d\right )} f^{4}\right )} g - {\left (2 \, b d e^{2} f^{2} - 21 \, a c f^{4} - 3 \, {\left (b c + a d\right )} e f^{3}\right )} h\right )} x^{2} + 3 \, {\left (8 \, b d e^{3} f + 35 \, a c e f^{3} - 14 \, {\left (b c + a d\right )} e^{2} f^{2}\right )} g - 2 \, {\left (8 \, b d e^{4} + 21 \, a c e^{2} f^{2} - 12 \, {\left (b c + a d\right )} e^{3} f\right )} h - {\left (3 \, {\left (4 \, b d e^{2} f^{2} - 35 \, a c f^{4} - 7 \, {\left (b c + a d\right )} e f^{3}\right )} g - {\left (8 \, b d e^{3} f + 21 \, a c e f^{3} - 12 \, {\left (b c + a d\right )} e^{2} f^{2}\right )} h\right )} x\right )} \sqrt {f x + e}}{315 \, f^{4}} \] Input:

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

Output:

2/315*(35*b*d*f^4*h*x^4 + 5*(9*b*d*f^4*g + (b*d*e*f^3 + 9*(b*c + a*d)*f^4) 
*h)*x^3 + 3*(3*(b*d*e*f^3 + 7*(b*c + a*d)*f^4)*g - (2*b*d*e^2*f^2 - 21*a*c 
*f^4 - 3*(b*c + a*d)*e*f^3)*h)*x^2 + 3*(8*b*d*e^3*f + 35*a*c*e*f^3 - 14*(b 
*c + a*d)*e^2*f^2)*g - 2*(8*b*d*e^4 + 21*a*c*e^2*f^2 - 12*(b*c + a*d)*e^3* 
f)*h - (3*(4*b*d*e^2*f^2 - 35*a*c*f^4 - 7*(b*c + a*d)*e*f^3)*g - (8*b*d*e^ 
3*f + 21*a*c*e*f^3 - 12*(b*c + a*d)*e^2*f^2)*h)*x)*sqrt(f*x + e)/f^4
 

Sympy [A] (verification not implemented)

Time = 1.21 (sec) , antiderivative size = 303, normalized size of antiderivative = 1.91 \[ \int (a+b x) (c+d x) \sqrt {e+f x} (g+h x) \, dx=\begin {cases} \frac {2 \left (\frac {b d h \left (e + f x\right )^{\frac {9}{2}}}{9 f^{3}} + \frac {\left (e + f x\right )^{\frac {7}{2}} \left (a d f h + b c f h - 3 b d e h + b d f g\right )}{7 f^{3}} + \frac {\left (e + f x\right )^{\frac {5}{2}} \left (a c f^{2} h - 2 a d e f h + a d f^{2} g - 2 b c e f h + b c f^{2} g + 3 b d e^{2} h - 2 b d e f g\right )}{5 f^{3}} + \frac {\left (e + f x\right )^{\frac {3}{2}} \left (- a c e f^{2} h + a c f^{3} g + a d e^{2} f h - a d e f^{2} g + b c e^{2} f h - b c e f^{2} g - b d e^{3} h + b d e^{2} f g\right )}{3 f^{3}}\right )}{f} & \text {for}\: f \neq 0 \\\sqrt {e} \left (a c g x + \frac {b d h x^{4}}{4} + \frac {x^{3} \left (a d h + b c h + b d g\right )}{3} + \frac {x^{2} \left (a c h + a d g + b c g\right )}{2}\right ) & \text {otherwise} \end {cases} \] Input:

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

Output:

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

Maxima [A] (verification not implemented)

Time = 0.04 (sec) , antiderivative size = 180, normalized size of antiderivative = 1.13 \[ \int (a+b x) (c+d x) \sqrt {e+f x} (g+h x) \, dx=\frac {2 \, {\left (35 \, {\left (f x + e\right )}^{\frac {9}{2}} b d h + 45 \, {\left (b d f g - {\left (3 \, b d e - {\left (b c + a d\right )} f\right )} h\right )} {\left (f x + e\right )}^{\frac {7}{2}} - 63 \, {\left ({\left (2 \, b d e f - {\left (b c + a d\right )} f^{2}\right )} g - {\left (3 \, b d e^{2} + a c f^{2} - 2 \, {\left (b c + a d\right )} e f\right )} h\right )} {\left (f x + e\right )}^{\frac {5}{2}} + 105 \, {\left ({\left (b d e^{2} f + a c f^{3} - {\left (b c + a d\right )} e f^{2}\right )} g - {\left (b d e^{3} + a c e f^{2} - {\left (b c + a d\right )} e^{2} f\right )} h\right )} {\left (f x + e\right )}^{\frac {3}{2}}\right )}}{315 \, f^{4}} \] Input:

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

Output:

2/315*(35*(f*x + e)^(9/2)*b*d*h + 45*(b*d*f*g - (3*b*d*e - (b*c + a*d)*f)* 
h)*(f*x + e)^(7/2) - 63*((2*b*d*e*f - (b*c + a*d)*f^2)*g - (3*b*d*e^2 + a* 
c*f^2 - 2*(b*c + a*d)*e*f)*h)*(f*x + e)^(5/2) + 105*((b*d*e^2*f + a*c*f^3 
- (b*c + a*d)*e*f^2)*g - (b*d*e^3 + a*c*e*f^2 - (b*c + a*d)*e^2*f)*h)*(f*x 
 + e)^(3/2))/f^4
 

Giac [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 638 vs. \(2 (143) = 286\).

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

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

Output:

2/315*(315*sqrt(f*x + e)*a*c*e*g + 105*((f*x + e)^(3/2) - 3*sqrt(f*x + e)* 
e)*a*c*g + 105*((f*x + e)^(3/2) - 3*sqrt(f*x + e)*e)*b*c*e*g/f + 105*((f*x 
 + e)^(3/2) - 3*sqrt(f*x + e)*e)*a*d*e*g/f + 105*((f*x + e)^(3/2) - 3*sqrt 
(f*x + e)*e)*a*c*e*h/f + 21*(3*(f*x + e)^(5/2) - 10*(f*x + e)^(3/2)*e + 15 
*sqrt(f*x + e)*e^2)*b*d*e*g/f^2 + 21*(3*(f*x + e)^(5/2) - 10*(f*x + e)^(3/ 
2)*e + 15*sqrt(f*x + e)*e^2)*b*c*g/f + 21*(3*(f*x + e)^(5/2) - 10*(f*x + e 
)^(3/2)*e + 15*sqrt(f*x + e)*e^2)*a*d*g/f + 21*(3*(f*x + e)^(5/2) - 10*(f* 
x + e)^(3/2)*e + 15*sqrt(f*x + e)*e^2)*b*c*e*h/f^2 + 21*(3*(f*x + e)^(5/2) 
 - 10*(f*x + e)^(3/2)*e + 15*sqrt(f*x + e)*e^2)*a*d*e*h/f^2 + 21*(3*(f*x + 
 e)^(5/2) - 10*(f*x + e)^(3/2)*e + 15*sqrt(f*x + e)*e^2)*a*c*h/f + 9*(5*(f 
*x + e)^(7/2) - 21*(f*x + e)^(5/2)*e + 35*(f*x + e)^(3/2)*e^2 - 35*sqrt(f* 
x + e)*e^3)*b*d*g/f^2 + 9*(5*(f*x + e)^(7/2) - 21*(f*x + e)^(5/2)*e + 35*( 
f*x + e)^(3/2)*e^2 - 35*sqrt(f*x + e)*e^3)*b*d*e*h/f^3 + 9*(5*(f*x + e)^(7 
/2) - 21*(f*x + e)^(5/2)*e + 35*(f*x + e)^(3/2)*e^2 - 35*sqrt(f*x + e)*e^3 
)*b*c*h/f^2 + 9*(5*(f*x + e)^(7/2) - 21*(f*x + e)^(5/2)*e + 35*(f*x + e)^( 
3/2)*e^2 - 35*sqrt(f*x + e)*e^3)*a*d*h/f^2 + (35*(f*x + e)^(9/2) - 180*(f* 
x + e)^(7/2)*e + 378*(f*x + e)^(5/2)*e^2 - 420*(f*x + e)^(3/2)*e^3 + 315*s 
qrt(f*x + e)*e^4)*b*d*h/f^3)/f
 

Mupad [B] (verification not implemented)

Time = 1.94 (sec) , antiderivative size = 155, normalized size of antiderivative = 0.97 \[ \int (a+b x) (c+d x) \sqrt {e+f x} (g+h x) \, dx=\frac {{\left (e+f\,x\right )}^{5/2}\,\left (2\,a\,c\,f^2\,h+2\,a\,d\,f^2\,g+2\,b\,c\,f^2\,g+6\,b\,d\,e^2\,h-4\,a\,d\,e\,f\,h-4\,b\,c\,e\,f\,h-4\,b\,d\,e\,f\,g\right )}{5\,f^4}+\frac {{\left (e+f\,x\right )}^{7/2}\,\left (2\,a\,d\,f\,h+2\,b\,c\,f\,h-6\,b\,d\,e\,h+2\,b\,d\,f\,g\right )}{7\,f^4}-\frac {2\,{\left (e+f\,x\right )}^{3/2}\,\left (a\,f-b\,e\right )\,\left (c\,f-d\,e\right )\,\left (e\,h-f\,g\right )}{3\,f^4}+\frac {2\,b\,d\,h\,{\left (e+f\,x\right )}^{9/2}}{9\,f^4} \] Input:

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

Output:

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

Reduce [B] (verification not implemented)

Time = 0.16 (sec) , antiderivative size = 313, normalized size of antiderivative = 1.97 \[ \int (a+b x) (c+d x) \sqrt {e+f x} (g+h x) \, dx=\frac {2 \sqrt {f x +e}\, \left (35 b d \,f^{4} h \,x^{4}+45 a d \,f^{4} h \,x^{3}+45 b c \,f^{4} h \,x^{3}+5 b d e \,f^{3} h \,x^{3}+45 b d \,f^{4} g \,x^{3}+63 a c \,f^{4} h \,x^{2}+9 a d e \,f^{3} h \,x^{2}+63 a d \,f^{4} g \,x^{2}+9 b c e \,f^{3} h \,x^{2}+63 b c \,f^{4} g \,x^{2}-6 b d \,e^{2} f^{2} h \,x^{2}+9 b d e \,f^{3} g \,x^{2}+21 a c e \,f^{3} h x +105 a c \,f^{4} g x -12 a d \,e^{2} f^{2} h x +21 a d e \,f^{3} g x -12 b c \,e^{2} f^{2} h x +21 b c e \,f^{3} g x +8 b d \,e^{3} f h x -12 b d \,e^{2} f^{2} g x -42 a c \,e^{2} f^{2} h +105 a c e \,f^{3} g +24 a d \,e^{3} f h -42 a d \,e^{2} f^{2} g +24 b c \,e^{3} f h -42 b c \,e^{2} f^{2} g -16 b d \,e^{4} h +24 b d \,e^{3} f g \right )}{315 f^{4}} \] Input:

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

Output:

(2*sqrt(e + f*x)*( - 42*a*c*e**2*f**2*h + 105*a*c*e*f**3*g + 21*a*c*e*f**3 
*h*x + 105*a*c*f**4*g*x + 63*a*c*f**4*h*x**2 + 24*a*d*e**3*f*h - 42*a*d*e* 
*2*f**2*g - 12*a*d*e**2*f**2*h*x + 21*a*d*e*f**3*g*x + 9*a*d*e*f**3*h*x**2 
 + 63*a*d*f**4*g*x**2 + 45*a*d*f**4*h*x**3 + 24*b*c*e**3*f*h - 42*b*c*e**2 
*f**2*g - 12*b*c*e**2*f**2*h*x + 21*b*c*e*f**3*g*x + 9*b*c*e*f**3*h*x**2 + 
 63*b*c*f**4*g*x**2 + 45*b*c*f**4*h*x**3 - 16*b*d*e**4*h + 24*b*d*e**3*f*g 
 + 8*b*d*e**3*f*h*x - 12*b*d*e**2*f**2*g*x - 6*b*d*e**2*f**2*h*x**2 + 9*b* 
d*e*f**3*g*x**2 + 5*b*d*e*f**3*h*x**3 + 45*b*d*f**4*g*x**3 + 35*b*d*f**4*h 
*x**4))/(315*f**4)