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

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

Optimal result

Integrand size = 46, antiderivative size = 171 \[ \int \frac {(f+g x)^2 \sqrt {a d e+\left (c d^2+a e^2\right ) x+c d e x^2}}{\sqrt {d+e x}} \, dx=\frac {2 (c d f-a e g)^2 \left (a d e+\left (c d^2+a e^2\right ) x+c d e x^2\right )^{3/2}}{3 c^3 d^3 (d+e x)^{3/2}}+\frac {4 g (c d f-a e g) \left (a d e+\left (c d^2+a e^2\right ) x+c d e x^2\right )^{5/2}}{5 c^3 d^3 (d+e x)^{5/2}}+\frac {2 g^2 \left (a d e+\left (c d^2+a e^2\right ) x+c d e x^2\right )^{7/2}}{7 c^3 d^3 (d+e x)^{7/2}} \] Output:

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

Mathematica [A] (verified)

Time = 0.12 (sec) , antiderivative size = 90, normalized size of antiderivative = 0.53 \[ \int \frac {(f+g x)^2 \sqrt {a d e+\left (c d^2+a e^2\right ) x+c d e x^2}}{\sqrt {d+e x}} \, dx=\frac {2 ((a e+c d x) (d+e x))^{3/2} \left (8 a^2 e^2 g^2-4 a c d e g (7 f+3 g x)+c^2 d^2 \left (35 f^2+42 f g x+15 g^2 x^2\right )\right )}{105 c^3 d^3 (d+e x)^{3/2}} \] Input:

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

Output:

(2*((a*e + c*d*x)*(d + e*x))^(3/2)*(8*a^2*e^2*g^2 - 4*a*c*d*e*g*(7*f + 3*g 
*x) + c^2*d^2*(35*f^2 + 42*f*g*x + 15*g^2*x^2)))/(105*c^3*d^3*(d + e*x)^(3 
/2))
 

Rubi [A] (verified)

Time = 0.69 (sec) , antiderivative size = 199, normalized size of antiderivative = 1.16, number of steps used = 3, number of rules used = 3, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.065, Rules used = {1253, 1221, 1122}

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 {(f+g x)^2 \sqrt {x \left (a e^2+c d^2\right )+a d e+c d e x^2}}{\sqrt {d+e x}} \, dx\)

\(\Big \downarrow \) 1253

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

\(\Big \downarrow \) 1221

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

\(\Big \downarrow \) 1122

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

Input:

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

Output:

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

Defintions of rubi rules used

rule 1122
Int[((d_.) + (e_.)*(x_))^(m_)*((a_.) + (b_.)*(x_) + (c_.)*(x_)^2)^(p_), x_S 
ymbol] :> Simp[e*(d + e*x)^(m - 1)*((a + b*x + c*x^2)^(p + 1)/(c*(p + 1))), 
 x] /; FreeQ[{a, b, c, d, e, m, p}, x] && EqQ[c*d^2 - b*d*e + a*e^2, 0] && 
EqQ[m + p, 0]
 

rule 1221
Int[((d_.) + (e_.)*(x_))^(m_)*((f_.) + (g_.)*(x_))*((a_.) + (b_.)*(x_) + (c 
_.)*(x_)^2)^(p_), x_Symbol] :> Simp[g*(d + e*x)^m*((a + b*x + c*x^2)^(p + 1 
)/(c*(m + 2*p + 2))), x] + Simp[(m*(g*(c*d - b*e) + c*e*f) + e*(p + 1)*(2*c 
*f - b*g))/(c*e*(m + 2*p + 2))   Int[(d + e*x)^m*(a + b*x + c*x^2)^p, x], x 
] /; FreeQ[{a, b, c, d, e, f, g, m, p}, x] && EqQ[c*d^2 - b*d*e + a*e^2, 0] 
 && NeQ[m + 2*p + 2, 0]
 

rule 1253
Int[((d_) + (e_.)*(x_))^(m_)*((f_.) + (g_.)*(x_))^(n_)*((a_.) + (b_.)*(x_) 
+ (c_.)*(x_)^2)^(p_), x_Symbol] :> Simp[(-e)*(d + e*x)^(m - 1)*(f + g*x)^n* 
((a + b*x + c*x^2)^(p + 1)/(c*(m - n - 1))), x] - Simp[n*((c*e*f + c*d*g - 
b*e*g)/(c*e*(m - n - 1)))   Int[(d + e*x)^m*(f + g*x)^(n - 1)*(a + b*x + c* 
x^2)^p, x], x] /; FreeQ[{a, b, c, d, e, f, g, m, p}, x] && EqQ[c*d^2 - b*d* 
e + a*e^2, 0] && EqQ[m + p, 0] && GtQ[n, 0] && NeQ[m - n - 1, 0] && (Intege 
rQ[2*p] || IntegerQ[n])
 
Maple [A] (verified)

Time = 2.86 (sec) , antiderivative size = 106, normalized size of antiderivative = 0.62

method result size
default \(\frac {2 \left (c d x +a e \right ) \left (15 g^{2} x^{2} d^{2} c^{2}-12 a c d e \,g^{2} x +42 c^{2} d^{2} f g x +8 a^{2} e^{2} g^{2}-28 a c d e f g +35 f^{2} c^{2} d^{2}\right ) \sqrt {\left (e x +d \right ) \left (c d x +a e \right )}}{105 d^{3} c^{3} \sqrt {e x +d}}\) \(106\)
gosper \(\frac {2 \left (c d x +a e \right ) \left (15 g^{2} x^{2} d^{2} c^{2}-12 a c d e \,g^{2} x +42 c^{2} d^{2} f g x +8 a^{2} e^{2} g^{2}-28 a c d e f g +35 f^{2} c^{2} d^{2}\right ) \sqrt {c d \,x^{2} e +a \,e^{2} x +c \,d^{2} x +a d e}}{105 d^{3} c^{3} \sqrt {e x +d}}\) \(116\)
orering \(\frac {2 \left (15 g^{2} x^{2} d^{2} c^{2}-12 a c d e \,g^{2} x +42 c^{2} d^{2} f g x +8 a^{2} e^{2} g^{2}-28 a c d e f g +35 f^{2} c^{2} d^{2}\right ) \left (c d x +a e \right ) \sqrt {a d e +\left (a \,e^{2}+c \,d^{2}\right ) x +c d \,x^{2} e}}{105 d^{3} c^{3} \sqrt {e x +d}}\) \(117\)

Input:

int((g*x+f)^2*(a*d*e+(a*e^2+c*d^2)*x+c*d*x^2*e)^(1/2)/(e*x+d)^(1/2),x,meth 
od=_RETURNVERBOSE)
 

Output:

2/105*(c*d*x+a*e)*(15*c^2*d^2*g^2*x^2-12*a*c*d*e*g^2*x+42*c^2*d^2*f*g*x+8* 
a^2*e^2*g^2-28*a*c*d*e*f*g+35*c^2*d^2*f^2)*((e*x+d)*(c*d*x+a*e))^(1/2)/d^3 
/c^3/(e*x+d)^(1/2)
 

Fricas [A] (verification not implemented)

Time = 0.10 (sec) , antiderivative size = 173, normalized size of antiderivative = 1.01 \[ \int \frac {(f+g x)^2 \sqrt {a d e+\left (c d^2+a e^2\right ) x+c d e x^2}}{\sqrt {d+e x}} \, dx=\frac {2 \, {\left (15 \, c^{3} d^{3} g^{2} x^{3} + 35 \, a c^{2} d^{2} e f^{2} - 28 \, a^{2} c d e^{2} f g + 8 \, a^{3} e^{3} g^{2} + 3 \, {\left (14 \, c^{3} d^{3} f g + a c^{2} d^{2} e g^{2}\right )} x^{2} + {\left (35 \, c^{3} d^{3} f^{2} + 14 \, a c^{2} d^{2} e f g - 4 \, a^{2} c d e^{2} g^{2}\right )} x\right )} \sqrt {c d e x^{2} + a d e + {\left (c d^{2} + a e^{2}\right )} x} \sqrt {e x + d}}{105 \, {\left (c^{3} d^{3} e x + c^{3} d^{4}\right )}} \] Input:

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

Output:

2/105*(15*c^3*d^3*g^2*x^3 + 35*a*c^2*d^2*e*f^2 - 28*a^2*c*d*e^2*f*g + 8*a^ 
3*e^3*g^2 + 3*(14*c^3*d^3*f*g + a*c^2*d^2*e*g^2)*x^2 + (35*c^3*d^3*f^2 + 1 
4*a*c^2*d^2*e*f*g - 4*a^2*c*d*e^2*g^2)*x)*sqrt(c*d*e*x^2 + a*d*e + (c*d^2 
+ a*e^2)*x)*sqrt(e*x + d)/(c^3*d^3*e*x + c^3*d^4)
 

Sympy [F]

\[ \int \frac {(f+g x)^2 \sqrt {a d e+\left (c d^2+a e^2\right ) x+c d e x^2}}{\sqrt {d+e x}} \, dx=\int \frac {\sqrt {\left (d + e x\right ) \left (a e + c d x\right )} \left (f + g x\right )^{2}}{\sqrt {d + e x}}\, dx \] Input:

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

Output:

Integral(sqrt((d + e*x)*(a*e + c*d*x))*(f + g*x)**2/sqrt(d + e*x), x)
 

Maxima [A] (verification not implemented)

Time = 0.09 (sec) , antiderivative size = 133, normalized size of antiderivative = 0.78 \[ \int \frac {(f+g x)^2 \sqrt {a d e+\left (c d^2+a e^2\right ) x+c d e x^2}}{\sqrt {d+e x}} \, dx=\frac {2 \, {\left (c d x + a e\right )}^{\frac {3}{2}} f^{2}}{3 \, c d} + \frac {4 \, {\left (3 \, c^{2} d^{2} x^{2} + a c d e x - 2 \, a^{2} e^{2}\right )} \sqrt {c d x + a e} f g}{15 \, c^{2} d^{2}} + \frac {2 \, {\left (15 \, c^{3} d^{3} x^{3} + 3 \, a c^{2} d^{2} e x^{2} - 4 \, a^{2} c d e^{2} x + 8 \, a^{3} e^{3}\right )} \sqrt {c d x + a e} g^{2}}{105 \, c^{3} d^{3}} \] Input:

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

Output:

2/3*(c*d*x + a*e)^(3/2)*f^2/(c*d) + 4/15*(3*c^2*d^2*x^2 + a*c*d*e*x - 2*a^ 
2*e^2)*sqrt(c*d*x + a*e)*f*g/(c^2*d^2) + 2/105*(15*c^3*d^3*x^3 + 3*a*c^2*d 
^2*e*x^2 - 4*a^2*c*d*e^2*x + 8*a^3*e^3)*sqrt(c*d*x + a*e)*g^2/(c^3*d^3)
 

Giac [A] (verification not implemented)

Time = 0.11 (sec) , antiderivative size = 284, normalized size of antiderivative = 1.66 \[ \int \frac {(f+g x)^2 \sqrt {a d e+\left (c d^2+a e^2\right ) x+c d e x^2}}{\sqrt {d+e x}} \, dx=\frac {2 \, {\left (105 \, \sqrt {c d x + a e} a e f^{2} - 35 \, {\left (3 \, \sqrt {c d x + a e} a e - {\left (c d x + a e\right )}^{\frac {3}{2}}\right )} f^{2} - \frac {70 \, {\left (3 \, \sqrt {c d x + a e} a e - {\left (c d x + a e\right )}^{\frac {3}{2}}\right )} a e f g}{c d} + \frac {14 \, {\left (15 \, \sqrt {c d x + a e} a^{2} e^{2} - 10 \, {\left (c d x + a e\right )}^{\frac {3}{2}} a e + 3 \, {\left (c d x + a e\right )}^{\frac {5}{2}}\right )} f g}{c d} + \frac {7 \, {\left (15 \, \sqrt {c d x + a e} a^{2} e^{2} - 10 \, {\left (c d x + a e\right )}^{\frac {3}{2}} a e + 3 \, {\left (c d x + a e\right )}^{\frac {5}{2}}\right )} a e g^{2}}{c^{2} d^{2}} - \frac {3 \, {\left (35 \, \sqrt {c d x + a e} a^{3} e^{3} - 35 \, {\left (c d x + a e\right )}^{\frac {3}{2}} a^{2} e^{2} + 21 \, {\left (c d x + a e\right )}^{\frac {5}{2}} a e - 5 \, {\left (c d x + a e\right )}^{\frac {7}{2}}\right )} g^{2}}{c^{2} d^{2}}\right )}}{105 \, c d} \] Input:

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

Output:

2/105*(105*sqrt(c*d*x + a*e)*a*e*f^2 - 35*(3*sqrt(c*d*x + a*e)*a*e - (c*d* 
x + a*e)^(3/2))*f^2 - 70*(3*sqrt(c*d*x + a*e)*a*e - (c*d*x + a*e)^(3/2))*a 
*e*f*g/(c*d) + 14*(15*sqrt(c*d*x + a*e)*a^2*e^2 - 10*(c*d*x + a*e)^(3/2)*a 
*e + 3*(c*d*x + a*e)^(5/2))*f*g/(c*d) + 7*(15*sqrt(c*d*x + a*e)*a^2*e^2 - 
10*(c*d*x + a*e)^(3/2)*a*e + 3*(c*d*x + a*e)^(5/2))*a*e*g^2/(c^2*d^2) - 3* 
(35*sqrt(c*d*x + a*e)*a^3*e^3 - 35*(c*d*x + a*e)^(3/2)*a^2*e^2 + 21*(c*d*x 
 + a*e)^(5/2)*a*e - 5*(c*d*x + a*e)^(7/2))*g^2/(c^2*d^2))/(c*d)
 

Mupad [B] (verification not implemented)

Time = 6.17 (sec) , antiderivative size = 157, normalized size of antiderivative = 0.92 \[ \int \frac {(f+g x)^2 \sqrt {a d e+\left (c d^2+a e^2\right ) x+c d e x^2}}{\sqrt {d+e x}} \, dx=\frac {\sqrt {c\,d\,e\,x^2+\left (c\,d^2+a\,e^2\right )\,x+a\,d\,e}\,\left (\frac {2\,g^2\,x^3}{7}+\frac {16\,a^3\,e^3\,g^2-56\,a^2\,c\,d\,e^2\,f\,g+70\,a\,c^2\,d^2\,e\,f^2}{105\,c^3\,d^3}+\frac {x\,\left (-8\,a^2\,c\,d\,e^2\,g^2+28\,a\,c^2\,d^2\,e\,f\,g+70\,c^3\,d^3\,f^2\right )}{105\,c^3\,d^3}+\frac {2\,g\,x^2\,\left (a\,e\,g+14\,c\,d\,f\right )}{35\,c\,d}\right )}{\sqrt {d+e\,x}} \] Input:

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

Output:

((x*(a*e^2 + c*d^2) + a*d*e + c*d*e*x^2)^(1/2)*((2*g^2*x^3)/7 + (16*a^3*e^ 
3*g^2 + 70*a*c^2*d^2*e*f^2 - 56*a^2*c*d*e^2*f*g)/(105*c^3*d^3) + (x*(70*c^ 
3*d^3*f^2 - 8*a^2*c*d*e^2*g^2 + 28*a*c^2*d^2*e*f*g))/(105*c^3*d^3) + (2*g* 
x^2*(a*e*g + 14*c*d*f))/(35*c*d)))/(d + e*x)^(1/2)
 

Reduce [B] (verification not implemented)

Time = 0.37 (sec) , antiderivative size = 136, normalized size of antiderivative = 0.80 \[ \int \frac {(f+g x)^2 \sqrt {a d e+\left (c d^2+a e^2\right ) x+c d e x^2}}{\sqrt {d+e x}} \, dx=\frac {2 \sqrt {c d x +a e}\, \left (15 c^{3} d^{3} g^{2} x^{3}+3 a \,c^{2} d^{2} e \,g^{2} x^{2}+42 c^{3} d^{3} f g \,x^{2}-4 a^{2} c d \,e^{2} g^{2} x +14 a \,c^{2} d^{2} e f g x +35 c^{3} d^{3} f^{2} x +8 a^{3} e^{3} g^{2}-28 a^{2} c d \,e^{2} f g +35 a \,c^{2} d^{2} e \,f^{2}\right )}{105 c^{3} d^{3}} \] Input:

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

Output:

(2*sqrt(a*e + c*d*x)*(8*a**3*e**3*g**2 - 28*a**2*c*d*e**2*f*g - 4*a**2*c*d 
*e**2*g**2*x + 35*a*c**2*d**2*e*f**2 + 14*a*c**2*d**2*e*f*g*x + 3*a*c**2*d 
**2*e*g**2*x**2 + 35*c**3*d**3*f**2*x + 42*c**3*d**3*f*g*x**2 + 15*c**3*d* 
*3*g**2*x**3))/(105*c**3*d**3)