### 3.2278 $$\int \frac{(a+b x+c x^2)^2}{\sqrt{d+e x}} \, dx$$

Optimal. Leaf size=164 $\frac{2 (d+e x)^{5/2} \left (-2 c e (3 b d-a e)+b^2 e^2+6 c^2 d^2\right )}{5 e^5}-\frac{4 (d+e x)^{3/2} (2 c d-b e) \left (a e^2-b d e+c d^2\right )}{3 e^5}+\frac{2 \sqrt{d+e x} \left (a e^2-b d e+c d^2\right )^2}{e^5}-\frac{4 c (d+e x)^{7/2} (2 c d-b e)}{7 e^5}+\frac{2 c^2 (d+e x)^{9/2}}{9 e^5}$

[Out]

(2*(c*d^2 - b*d*e + a*e^2)^2*Sqrt[d + e*x])/e^5 - (4*(2*c*d - b*e)*(c*d^2 - b*d*e + a*e^2)*(d + e*x)^(3/2))/(3
*e^5) + (2*(6*c^2*d^2 + b^2*e^2 - 2*c*e*(3*b*d - a*e))*(d + e*x)^(5/2))/(5*e^5) - (4*c*(2*c*d - b*e)*(d + e*x)
^(7/2))/(7*e^5) + (2*c^2*(d + e*x)^(9/2))/(9*e^5)

________________________________________________________________________________________

Rubi [A]  time = 0.0727377, antiderivative size = 164, normalized size of antiderivative = 1., number of steps used = 2, number of rules used = 1, integrand size = 22, $$\frac{\text{number of rules}}{\text{integrand size}}$$ = 0.045, Rules used = {698} $\frac{2 (d+e x)^{5/2} \left (-2 c e (3 b d-a e)+b^2 e^2+6 c^2 d^2\right )}{5 e^5}-\frac{4 (d+e x)^{3/2} (2 c d-b e) \left (a e^2-b d e+c d^2\right )}{3 e^5}+\frac{2 \sqrt{d+e x} \left (a e^2-b d e+c d^2\right )^2}{e^5}-\frac{4 c (d+e x)^{7/2} (2 c d-b e)}{7 e^5}+\frac{2 c^2 (d+e x)^{9/2}}{9 e^5}$

Antiderivative was successfully veriﬁed.

[In]

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

[Out]

(2*(c*d^2 - b*d*e + a*e^2)^2*Sqrt[d + e*x])/e^5 - (4*(2*c*d - b*e)*(c*d^2 - b*d*e + a*e^2)*(d + e*x)^(3/2))/(3
*e^5) + (2*(6*c^2*d^2 + b^2*e^2 - 2*c*e*(3*b*d - a*e))*(d + e*x)^(5/2))/(5*e^5) - (4*c*(2*c*d - b*e)*(d + e*x)
^(7/2))/(7*e^5) + (2*c^2*(d + e*x)^(9/2))/(9*e^5)

Rule 698

Int[((d_.) + (e_.)*(x_))^(m_)*((a_.) + (b_.)*(x_) + (c_.)*(x_)^2)^(p_.), x_Symbol] :> Int[ExpandIntegrand[(d +
e*x)^m*(a + b*x + c*x^2)^p, x], x] /; FreeQ[{a, b, c, d, e, m}, x] && NeQ[b^2 - 4*a*c, 0] && NeQ[c*d^2 - b*d*
e + a*e^2, 0] && NeQ[2*c*d - b*e, 0] && IntegerQ[p] && (GtQ[p, 0] || (EqQ[a, 0] && IntegerQ[m]))

Rubi steps

\begin{align*} \int \frac{\left (a+b x+c x^2\right )^2}{\sqrt{d+e x}} \, dx &=\int \left (\frac{\left (c d^2-b d e+a e^2\right )^2}{e^4 \sqrt{d+e x}}+\frac{2 (-2 c d+b e) \left (c d^2-b d e+a e^2\right ) \sqrt{d+e x}}{e^4}+\frac{\left (6 c^2 d^2+b^2 e^2-2 c e (3 b d-a e)\right ) (d+e x)^{3/2}}{e^4}-\frac{2 c (2 c d-b e) (d+e x)^{5/2}}{e^4}+\frac{c^2 (d+e x)^{7/2}}{e^4}\right ) \, dx\\ &=\frac{2 \left (c d^2-b d e+a e^2\right )^2 \sqrt{d+e x}}{e^5}-\frac{4 (2 c d-b e) \left (c d^2-b d e+a e^2\right ) (d+e x)^{3/2}}{3 e^5}+\frac{2 \left (6 c^2 d^2+b^2 e^2-2 c e (3 b d-a e)\right ) (d+e x)^{5/2}}{5 e^5}-\frac{4 c (2 c d-b e) (d+e x)^{7/2}}{7 e^5}+\frac{2 c^2 (d+e x)^{9/2}}{9 e^5}\\ \end{align*}

Mathematica [A]  time = 0.160254, size = 172, normalized size = 1.05 $\frac{2 \sqrt{d+e x} \left (21 e^2 \left (15 a^2 e^2+10 a b e (e x-2 d)+b^2 \left (8 d^2-4 d e x+3 e^2 x^2\right )\right )-6 c e \left (3 b \left (-8 d^2 e x+16 d^3+6 d e^2 x^2-5 e^3 x^3\right )-7 a e \left (8 d^2-4 d e x+3 e^2 x^2\right )\right )+c^2 \left (48 d^2 e^2 x^2-64 d^3 e x+128 d^4-40 d e^3 x^3+35 e^4 x^4\right )\right )}{315 e^5}$

Antiderivative was successfully veriﬁed.

[In]

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

[Out]

(2*Sqrt[d + e*x]*(c^2*(128*d^4 - 64*d^3*e*x + 48*d^2*e^2*x^2 - 40*d*e^3*x^3 + 35*e^4*x^4) + 21*e^2*(15*a^2*e^2
+ 10*a*b*e*(-2*d + e*x) + b^2*(8*d^2 - 4*d*e*x + 3*e^2*x^2)) - 6*c*e*(-7*a*e*(8*d^2 - 4*d*e*x + 3*e^2*x^2) +
3*b*(16*d^3 - 8*d^2*e*x + 6*d*e^2*x^2 - 5*e^3*x^3))))/(315*e^5)

________________________________________________________________________________________

Maple [A]  time = 0.044, size = 194, normalized size = 1.2 \begin{align*}{\frac{70\,{c}^{2}{x}^{4}{e}^{4}+180\,bc{e}^{4}{x}^{3}-80\,{c}^{2}d{e}^{3}{x}^{3}+252\,ac{e}^{4}{x}^{2}+126\,{b}^{2}{e}^{4}{x}^{2}-216\,bcd{e}^{3}{x}^{2}+96\,{c}^{2}{d}^{2}{e}^{2}{x}^{2}+420\,ab{e}^{4}x-336\,acd{e}^{3}x-168\,{b}^{2}d{e}^{3}x+288\,bc{d}^{2}{e}^{2}x-128\,{c}^{2}{d}^{3}ex+630\,{a}^{2}{e}^{4}-840\,abd{e}^{3}+672\,ac{d}^{2}{e}^{2}+336\,{b}^{2}{d}^{2}{e}^{2}-576\,bc{d}^{3}e+256\,{c}^{2}{d}^{4}}{315\,{e}^{5}}\sqrt{ex+d}} \end{align*}

Veriﬁcation of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

2/315*(e*x+d)^(1/2)*(35*c^2*e^4*x^4+90*b*c*e^4*x^3-40*c^2*d*e^3*x^3+126*a*c*e^4*x^2+63*b^2*e^4*x^2-108*b*c*d*e
^3*x^2+48*c^2*d^2*e^2*x^2+210*a*b*e^4*x-168*a*c*d*e^3*x-84*b^2*d*e^3*x+144*b*c*d^2*e^2*x-64*c^2*d^3*e*x+315*a^
2*e^4-420*a*b*d*e^3+336*a*c*d^2*e^2+168*b^2*d^2*e^2-288*b*c*d^3*e+128*c^2*d^4)/e^5

________________________________________________________________________________________

Maxima [A]  time = 1.01342, size = 320, normalized size = 1.95 \begin{align*} \frac{2 \,{\left (315 \, \sqrt{e x + d} a^{2} + 42 \, a{\left (\frac{5 \,{\left ({\left (e x + d\right )}^{\frac{3}{2}} - 3 \, \sqrt{e x + d} d\right )} b}{e} + \frac{{\left (3 \,{\left (e x + d\right )}^{\frac{5}{2}} - 10 \,{\left (e x + d\right )}^{\frac{3}{2}} d + 15 \, \sqrt{e x + d} d^{2}\right )} c}{e^{2}}\right )} + \frac{21 \,{\left (3 \,{\left (e x + d\right )}^{\frac{5}{2}} - 10 \,{\left (e x + d\right )}^{\frac{3}{2}} d + 15 \, \sqrt{e x + d} d^{2}\right )} b^{2}}{e^{2}} + \frac{18 \,{\left (5 \,{\left (e x + d\right )}^{\frac{7}{2}} - 21 \,{\left (e x + d\right )}^{\frac{5}{2}} d + 35 \,{\left (e x + d\right )}^{\frac{3}{2}} d^{2} - 35 \, \sqrt{e x + d} d^{3}\right )} b c}{e^{3}} + \frac{{\left (35 \,{\left (e x + d\right )}^{\frac{9}{2}} - 180 \,{\left (e x + d\right )}^{\frac{7}{2}} d + 378 \,{\left (e x + d\right )}^{\frac{5}{2}} d^{2} - 420 \,{\left (e x + d\right )}^{\frac{3}{2}} d^{3} + 315 \, \sqrt{e x + d} d^{4}\right )} c^{2}}{e^{4}}\right )}}{315 \, e} \end{align*}

Veriﬁcation of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

2/315*(315*sqrt(e*x + d)*a^2 + 42*a*(5*((e*x + d)^(3/2) - 3*sqrt(e*x + d)*d)*b/e + (3*(e*x + d)^(5/2) - 10*(e*
x + d)^(3/2)*d + 15*sqrt(e*x + d)*d^2)*c/e^2) + 21*(3*(e*x + d)^(5/2) - 10*(e*x + d)^(3/2)*d + 15*sqrt(e*x + d
)*d^2)*b^2/e^2 + 18*(5*(e*x + d)^(7/2) - 21*(e*x + d)^(5/2)*d + 35*(e*x + d)^(3/2)*d^2 - 35*sqrt(e*x + d)*d^3)
*b*c/e^3 + (35*(e*x + d)^(9/2) - 180*(e*x + d)^(7/2)*d + 378*(e*x + d)^(5/2)*d^2 - 420*(e*x + d)^(3/2)*d^3 + 3
15*sqrt(e*x + d)*d^4)*c^2/e^4)/e

________________________________________________________________________________________

Fricas [A]  time = 2.25558, size = 412, normalized size = 2.51 \begin{align*} \frac{2 \,{\left (35 \, c^{2} e^{4} x^{4} + 128 \, c^{2} d^{4} - 288 \, b c d^{3} e - 420 \, a b d e^{3} + 315 \, a^{2} e^{4} + 168 \,{\left (b^{2} + 2 \, a c\right )} d^{2} e^{2} - 10 \,{\left (4 \, c^{2} d e^{3} - 9 \, b c e^{4}\right )} x^{3} + 3 \,{\left (16 \, c^{2} d^{2} e^{2} - 36 \, b c d e^{3} + 21 \,{\left (b^{2} + 2 \, a c\right )} e^{4}\right )} x^{2} - 2 \,{\left (32 \, c^{2} d^{3} e - 72 \, b c d^{2} e^{2} - 105 \, a b e^{4} + 42 \,{\left (b^{2} + 2 \, a c\right )} d e^{3}\right )} x\right )} \sqrt{e x + d}}{315 \, e^{5}} \end{align*}

Veriﬁcation of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

2/315*(35*c^2*e^4*x^4 + 128*c^2*d^4 - 288*b*c*d^3*e - 420*a*b*d*e^3 + 315*a^2*e^4 + 168*(b^2 + 2*a*c)*d^2*e^2
- 10*(4*c^2*d*e^3 - 9*b*c*e^4)*x^3 + 3*(16*c^2*d^2*e^2 - 36*b*c*d*e^3 + 21*(b^2 + 2*a*c)*e^4)*x^2 - 2*(32*c^2*
d^3*e - 72*b*c*d^2*e^2 - 105*a*b*e^4 + 42*(b^2 + 2*a*c)*d*e^3)*x)*sqrt(e*x + d)/e^5

________________________________________________________________________________________

Sympy [A]  time = 53.3516, size = 644, normalized size = 3.93 \begin{align*} \text{result too large to display} \end{align*}

Veriﬁcation of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

Giac [A]  time = 1.1095, size = 335, normalized size = 2.04 \begin{align*} \frac{2}{315} \,{\left (210 \,{\left ({\left (x e + d\right )}^{\frac{3}{2}} - 3 \, \sqrt{x e + d} d\right )} a b e^{\left (-1\right )} + 21 \,{\left (3 \,{\left (x e + d\right )}^{\frac{5}{2}} - 10 \,{\left (x e + d\right )}^{\frac{3}{2}} d + 15 \, \sqrt{x e + d} d^{2}\right )} b^{2} e^{\left (-2\right )} + 42 \,{\left (3 \,{\left (x e + d\right )}^{\frac{5}{2}} - 10 \,{\left (x e + d\right )}^{\frac{3}{2}} d + 15 \, \sqrt{x e + d} d^{2}\right )} a c e^{\left (-2\right )} + 18 \,{\left (5 \,{\left (x e + d\right )}^{\frac{7}{2}} - 21 \,{\left (x e + d\right )}^{\frac{5}{2}} d + 35 \,{\left (x e + d\right )}^{\frac{3}{2}} d^{2} - 35 \, \sqrt{x e + d} d^{3}\right )} b c e^{\left (-3\right )} +{\left (35 \,{\left (x e + d\right )}^{\frac{9}{2}} - 180 \,{\left (x e + d\right )}^{\frac{7}{2}} d + 378 \,{\left (x e + d\right )}^{\frac{5}{2}} d^{2} - 420 \,{\left (x e + d\right )}^{\frac{3}{2}} d^{3} + 315 \, \sqrt{x e + d} d^{4}\right )} c^{2} e^{\left (-4\right )} + 315 \, \sqrt{x e + d} a^{2}\right )} e^{\left (-1\right )} \end{align*}

Veriﬁcation of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

2/315*(210*((x*e + d)^(3/2) - 3*sqrt(x*e + d)*d)*a*b*e^(-1) + 21*(3*(x*e + d)^(5/2) - 10*(x*e + d)^(3/2)*d + 1
5*sqrt(x*e + d)*d^2)*b^2*e^(-2) + 42*(3*(x*e + d)^(5/2) - 10*(x*e + d)^(3/2)*d + 15*sqrt(x*e + d)*d^2)*a*c*e^(
-2) + 18*(5*(x*e + d)^(7/2) - 21*(x*e + d)^(5/2)*d + 35*(x*e + d)^(3/2)*d^2 - 35*sqrt(x*e + d)*d^3)*b*c*e^(-3)
+ (35*(x*e + d)^(9/2) - 180*(x*e + d)^(7/2)*d + 378*(x*e + d)^(5/2)*d^2 - 420*(x*e + d)^(3/2)*d^3 + 315*sqrt(
x*e + d)*d^4)*c^2*e^(-4) + 315*sqrt(x*e + d)*a^2)*e^(-1)