\(\int (c+d x)^2 \sqrt {e+f x} (g+h x) \, dx\) [13]

Optimal result
Mathematica [A] (verified)
Rubi [A] (verified)
Maple [A] (verified)
Fricas [B] (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 = 22, antiderivative size = 126 \[ \int (c+d x)^2 \sqrt {e+f x} (g+h x) \, dx=\frac {2 (d e-c f)^2 (f g-e h) (e+f x)^{3/2}}{3 f^4}-\frac {2 (d e-c f) (2 d f g-3 d e h+c f h) (e+f x)^{5/2}}{5 f^4}+\frac {2 d (d f g-3 d e h+2 c f h) (e+f x)^{7/2}}{7 f^4}+\frac {2 d^2 h (e+f x)^{9/2}}{9 f^4} \] Output:

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

Mathematica [A] (verified)

Time = 0.08 (sec) , antiderivative size = 130, normalized size of antiderivative = 1.03 \[ \int (c+d x)^2 \sqrt {e+f x} (g+h x) \, dx=\frac {2 (e+f x)^{3/2} \left (21 c^2 f^2 (5 f g-2 e h+3 f h x)+6 c d 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^2 \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 )}{315 f^4} \] Input:

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

Output:

(2*(e + f*x)^(3/2)*(21*c^2*f^2*(5*f*g - 2*e*h + 3*f*h*x) + 6*c*d*f*(8*e^2* 
h + 3*f^2*x*(7*g + 5*h*x) - 2*e*f*(7*g + 6*h*x)) + d^2*(-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.28 (sec) , antiderivative size = 126, 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.091, Rules used = {86, 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 (c+d x)^2 \sqrt {e+f x} (g+h x) \, dx\)

\(\Big \downarrow \) 86

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

\(\Big \downarrow \) 2009

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

Input:

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

Output:

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

Defintions of rubi rules used

rule 86
Int[((a_.) + (b_.)*(x_))*((c_) + (d_.)*(x_))^(n_.)*((e_.) + (f_.)*(x_))^(p_ 
.), x_] :> Int[ExpandIntegrand[(a + b*x)*(c + d*x)^n*(e + f*x)^p, x], x] /; 
 FreeQ[{a, b, c, d, e, f, n}, x] && ((ILtQ[n, 0] && ILtQ[p, 0]) || EqQ[p, 1 
] || (IGtQ[p, 0] && ( !IntegerQ[n] || LeQ[9*p + 5*(n + 2), 0] || GeQ[n + p 
+ 1, 0] || (GeQ[n + p + 2, 0] && RationalQ[a, b, c, d, e, f]))))
 

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

Time = 0.67 (sec) , antiderivative size = 116, normalized size of antiderivative = 0.92

method result size
pseudoelliptic \(-\frac {4 \left (\left (-\frac {15 x^{2} \left (\frac {7 h x}{9}+g \right ) d^{2}}{14}-3 x c \left (\frac {5 h x}{7}+g \right ) d -\frac {5 c^{2} \left (\frac {3 h x}{5}+g \right )}{2}\right ) f^{3}+\left (\frac {6 x \left (\frac {5 h x}{6}+g \right ) d^{2}}{7}+2 c \left (\frac {6 h x}{7}+g \right ) d +h \,c^{2}\right ) e \,f^{2}-\frac {8 e^{2} \left (\frac {\left (h x +g \right ) d}{2}+c h \right ) d f}{7}+\frac {8 d^{2} e^{3} h}{21}\right ) \left (f x +e \right )^{\frac {3}{2}}}{15 f^{4}}\) \(116\)
derivativedivides \(\frac {\frac {2 d^{2} h \left (f x +e \right )^{\frac {9}{2}}}{9}+\frac {2 \left (2 d \left (c f -d e \right ) h +d^{2} \left (-e h +f g \right )\right ) \left (f x +e \right )^{\frac {7}{2}}}{7}+\frac {2 \left (\left (c f -d e \right )^{2} h +2 d \left (c f -d e \right ) \left (-e h +f g \right )\right ) \left (f x +e \right )^{\frac {5}{2}}}{5}+\frac {2 \left (c f -d e \right )^{2} \left (-e h +f g \right ) \left (f x +e \right )^{\frac {3}{2}}}{3}}{f^{4}}\) \(122\)
default \(\frac {\frac {2 d^{2} h \left (f x +e \right )^{\frac {9}{2}}}{9}-\frac {2 \left (-2 d \left (c f -d e \right ) h +d^{2} \left (e h -f g \right )\right ) \left (f x +e \right )^{\frac {7}{2}}}{7}-\frac {2 \left (-\left (c f -d e \right )^{2} h +2 d \left (c f -d e \right ) \left (e h -f g \right )\right ) \left (f x +e \right )^{\frac {5}{2}}}{5}-\frac {2 \left (c f -d e \right )^{2} \left (e h -f g \right ) \left (f x +e \right )^{\frac {3}{2}}}{3}}{f^{4}}\) \(123\)
gosper \(-\frac {2 \left (f x +e \right )^{\frac {3}{2}} \left (-35 d^{2} h \,x^{3} f^{3}-90 c d \,f^{3} h \,x^{2}+30 d^{2} e \,f^{2} h \,x^{2}-45 d^{2} f^{3} g \,x^{2}-63 c^{2} f^{3} h x +72 c d e \,f^{2} h x -126 c d \,f^{3} g x -24 d^{2} e^{2} f h x +36 d^{2} e \,f^{2} g x +42 c^{2} e \,f^{2} h -105 c^{2} g \,f^{3}-48 c d \,e^{2} f h +84 c d e \,f^{2} g +16 d^{2} e^{3} h -24 d^{2} e^{2} f g \right )}{315 f^{4}}\) \(169\)
orering \(-\frac {2 \left (f x +e \right )^{\frac {3}{2}} \left (-35 d^{2} h \,x^{3} f^{3}-90 c d \,f^{3} h \,x^{2}+30 d^{2} e \,f^{2} h \,x^{2}-45 d^{2} f^{3} g \,x^{2}-63 c^{2} f^{3} h x +72 c d e \,f^{2} h x -126 c d \,f^{3} g x -24 d^{2} e^{2} f h x +36 d^{2} e \,f^{2} g x +42 c^{2} e \,f^{2} h -105 c^{2} g \,f^{3}-48 c d \,e^{2} f h +84 c d e \,f^{2} g +16 d^{2} e^{3} h -24 d^{2} e^{2} f g \right )}{315 f^{4}}\) \(169\)
trager \(-\frac {2 \left (-35 d^{2} h \,f^{4} x^{4}-90 c d \,f^{4} h \,x^{3}-5 d^{2} e \,f^{3} h \,x^{3}-45 d^{2} f^{4} g \,x^{3}-63 c^{2} f^{4} h \,x^{2}-18 c d e \,f^{3} h \,x^{2}-126 c d \,f^{4} g \,x^{2}+6 d^{2} e^{2} f^{2} h \,x^{2}-9 d^{2} e \,f^{3} g \,x^{2}-21 c^{2} e \,f^{3} h x -105 c^{2} f^{4} g x +24 c d \,e^{2} f^{2} h x -42 c d e \,f^{3} g x -8 d^{2} e^{3} f h x +12 d^{2} e^{2} f^{2} g x +42 c^{2} e^{2} f^{2} h -105 c^{2} e \,f^{3} g -48 c d \,e^{3} f h +84 c d \,e^{2} f^{2} g +16 d^{2} e^{4} h -24 d^{2} e^{3} f g \right ) \sqrt {f x +e}}{315 f^{4}}\) \(253\)
risch \(-\frac {2 \left (-35 d^{2} h \,f^{4} x^{4}-90 c d \,f^{4} h \,x^{3}-5 d^{2} e \,f^{3} h \,x^{3}-45 d^{2} f^{4} g \,x^{3}-63 c^{2} f^{4} h \,x^{2}-18 c d e \,f^{3} h \,x^{2}-126 c d \,f^{4} g \,x^{2}+6 d^{2} e^{2} f^{2} h \,x^{2}-9 d^{2} e \,f^{3} g \,x^{2}-21 c^{2} e \,f^{3} h x -105 c^{2} f^{4} g x +24 c d \,e^{2} f^{2} h x -42 c d e \,f^{3} g x -8 d^{2} e^{3} f h x +12 d^{2} e^{2} f^{2} g x +42 c^{2} e^{2} f^{2} h -105 c^{2} e \,f^{3} g -48 c d \,e^{3} f h +84 c d \,e^{2} f^{2} g +16 d^{2} e^{4} h -24 d^{2} e^{3} f g \right ) \sqrt {f x +e}}{315 f^{4}}\) \(253\)

Input:

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

Output:

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

Fricas [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 244 vs. \(2 (110) = 220\).

Time = 0.07 (sec) , antiderivative size = 244, normalized size of antiderivative = 1.94 \[ \int (c+d x)^2 \sqrt {e+f x} (g+h x) \, dx=\frac {2 \, {\left (35 \, d^{2} f^{4} h x^{4} + 5 \, {\left (9 \, d^{2} f^{4} g + {\left (d^{2} e f^{3} + 18 \, c d f^{4}\right )} h\right )} x^{3} + 3 \, {\left (3 \, {\left (d^{2} e f^{3} + 14 \, c d f^{4}\right )} g - {\left (2 \, d^{2} e^{2} f^{2} - 6 \, c d e f^{3} - 21 \, c^{2} f^{4}\right )} h\right )} x^{2} + 3 \, {\left (8 \, d^{2} e^{3} f - 28 \, c d e^{2} f^{2} + 35 \, c^{2} e f^{3}\right )} g - 2 \, {\left (8 \, d^{2} e^{4} - 24 \, c d e^{3} f + 21 \, c^{2} e^{2} f^{2}\right )} h - {\left (3 \, {\left (4 \, d^{2} e^{2} f^{2} - 14 \, c d e f^{3} - 35 \, c^{2} f^{4}\right )} g - {\left (8 \, d^{2} e^{3} f - 24 \, c d e^{2} f^{2} + 21 \, c^{2} e f^{3}\right )} h\right )} x\right )} \sqrt {f x + e}}{315 \, f^{4}} \] Input:

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

Output:

2/315*(35*d^2*f^4*h*x^4 + 5*(9*d^2*f^4*g + (d^2*e*f^3 + 18*c*d*f^4)*h)*x^3 
 + 3*(3*(d^2*e*f^3 + 14*c*d*f^4)*g - (2*d^2*e^2*f^2 - 6*c*d*e*f^3 - 21*c^2 
*f^4)*h)*x^2 + 3*(8*d^2*e^3*f - 28*c*d*e^2*f^2 + 35*c^2*e*f^3)*g - 2*(8*d^ 
2*e^4 - 24*c*d*e^3*f + 21*c^2*e^2*f^2)*h - (3*(4*d^2*e^2*f^2 - 14*c*d*e*f^ 
3 - 35*c^2*f^4)*g - (8*d^2*e^3*f - 24*c*d*e^2*f^2 + 21*c^2*e*f^3)*h)*x)*sq 
rt(f*x + e)/f^4
 

Sympy [A] (verification not implemented)

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

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

Output:

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

Maxima [A] (verification not implemented)

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

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

Output:

2/315*(35*(f*x + e)^(9/2)*d^2*h + 45*(d^2*f*g - (3*d^2*e - 2*c*d*f)*h)*(f* 
x + e)^(7/2) - 63*(2*(d^2*e*f - c*d*f^2)*g - (3*d^2*e^2 - 4*c*d*e*f + c^2* 
f^2)*h)*(f*x + e)^(5/2) + 105*((d^2*e^2*f - 2*c*d*e*f^2 + c^2*f^3)*g - (d^ 
2*e^3 - 2*c*d*e^2*f + c^2*e*f^2)*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. 486 vs. \(2 (110) = 220\).

Time = 0.13 (sec) , antiderivative size = 486, normalized size of antiderivative = 3.86 \[ \int (c+d x)^2 \sqrt {e+f x} (g+h x) \, dx=\frac {2 \, {\left (315 \, \sqrt {f x + e} c^{2} e g + 105 \, {\left ({\left (f x + e\right )}^{\frac {3}{2}} - 3 \, \sqrt {f x + e} e\right )} c^{2} g + \frac {210 \, {\left ({\left (f x + e\right )}^{\frac {3}{2}} - 3 \, \sqrt {f x + e} e\right )} c d e g}{f} + \frac {105 \, {\left ({\left (f x + e\right )}^{\frac {3}{2}} - 3 \, \sqrt {f x + e} e\right )} c^{2} e h}{f} + \frac {21 \, {\left (3 \, {\left (f x + e\right )}^{\frac {5}{2}} - 10 \, {\left (f x + e\right )}^{\frac {3}{2}} e + 15 \, \sqrt {f x + e} e^{2}\right )} d^{2} e g}{f^{2}} + \frac {42 \, {\left (3 \, {\left (f x + e\right )}^{\frac {5}{2}} - 10 \, {\left (f x + e\right )}^{\frac {3}{2}} e + 15 \, \sqrt {f x + e} e^{2}\right )} c d g}{f} + \frac {42 \, {\left (3 \, {\left (f x + e\right )}^{\frac {5}{2}} - 10 \, {\left (f x + e\right )}^{\frac {3}{2}} e + 15 \, \sqrt {f x + e} e^{2}\right )} c d e h}{f^{2}} + \frac {21 \, {\left (3 \, {\left (f x + e\right )}^{\frac {5}{2}} - 10 \, {\left (f x + e\right )}^{\frac {3}{2}} e + 15 \, \sqrt {f x + e} e^{2}\right )} c^{2} h}{f} + \frac {9 \, {\left (5 \, {\left (f x + e\right )}^{\frac {7}{2}} - 21 \, {\left (f x + e\right )}^{\frac {5}{2}} e + 35 \, {\left (f x + e\right )}^{\frac {3}{2}} e^{2} - 35 \, \sqrt {f x + e} e^{3}\right )} d^{2} g}{f^{2}} + \frac {9 \, {\left (5 \, {\left (f x + e\right )}^{\frac {7}{2}} - 21 \, {\left (f x + e\right )}^{\frac {5}{2}} e + 35 \, {\left (f x + e\right )}^{\frac {3}{2}} e^{2} - 35 \, \sqrt {f x + e} e^{3}\right )} d^{2} e h}{f^{3}} + \frac {18 \, {\left (5 \, {\left (f x + e\right )}^{\frac {7}{2}} - 21 \, {\left (f x + e\right )}^{\frac {5}{2}} e + 35 \, {\left (f x + e\right )}^{\frac {3}{2}} e^{2} - 35 \, \sqrt {f x + e} e^{3}\right )} c d h}{f^{2}} + \frac {{\left (35 \, {\left (f x + e\right )}^{\frac {9}{2}} - 180 \, {\left (f x + e\right )}^{\frac {7}{2}} e + 378 \, {\left (f x + e\right )}^{\frac {5}{2}} e^{2} - 420 \, {\left (f x + e\right )}^{\frac {3}{2}} e^{3} + 315 \, \sqrt {f x + e} e^{4}\right )} d^{2} h}{f^{3}}\right )}}{315 \, f} \] Input:

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

Output:

2/315*(315*sqrt(f*x + e)*c^2*e*g + 105*((f*x + e)^(3/2) - 3*sqrt(f*x + e)* 
e)*c^2*g + 210*((f*x + e)^(3/2) - 3*sqrt(f*x + e)*e)*c*d*e*g/f + 105*((f*x 
 + e)^(3/2) - 3*sqrt(f*x + e)*e)*c^2*e*h/f + 21*(3*(f*x + e)^(5/2) - 10*(f 
*x + e)^(3/2)*e + 15*sqrt(f*x + e)*e^2)*d^2*e*g/f^2 + 42*(3*(f*x + e)^(5/2 
) - 10*(f*x + e)^(3/2)*e + 15*sqrt(f*x + e)*e^2)*c*d*g/f + 42*(3*(f*x + e) 
^(5/2) - 10*(f*x + e)^(3/2)*e + 15*sqrt(f*x + e)*e^2)*c*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)*c^2*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*s 
qrt(f*x + e)*e^3)*d^2*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)*d^2*e*h/f^3 + 18*(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)*c*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*sqrt(f*x + e)*e^4)*d^2*h/ 
f^3)/f
 

Mupad [B] (verification not implemented)

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

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

Output:

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

Reduce [B] (verification not implemented)

Time = 0.19 (sec) , antiderivative size = 251, normalized size of antiderivative = 1.99 \[ \int (c+d x)^2 \sqrt {e+f x} (g+h x) \, dx=\frac {2 \sqrt {f x +e}\, \left (35 d^{2} f^{4} h \,x^{4}+90 c d \,f^{4} h \,x^{3}+5 d^{2} e \,f^{3} h \,x^{3}+45 d^{2} f^{4} g \,x^{3}+63 c^{2} f^{4} h \,x^{2}+18 c d e \,f^{3} h \,x^{2}+126 c d \,f^{4} g \,x^{2}-6 d^{2} e^{2} f^{2} h \,x^{2}+9 d^{2} e \,f^{3} g \,x^{2}+21 c^{2} e \,f^{3} h x +105 c^{2} f^{4} g x -24 c d \,e^{2} f^{2} h x +42 c d e \,f^{3} g x +8 d^{2} e^{3} f h x -12 d^{2} e^{2} f^{2} g x -42 c^{2} e^{2} f^{2} h +105 c^{2} e \,f^{3} g +48 c d \,e^{3} f h -84 c d \,e^{2} f^{2} g -16 d^{2} e^{4} h +24 d^{2} e^{3} f g \right )}{315 f^{4}} \] Input:

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

Output:

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