### 3.226 $$\int \frac{(g+h x)^3 (d+e x+f x^2)}{\sqrt{a+b x+c x^2}} \, dx$$

Optimal. Leaf size=693 $\frac{\sqrt{a+b x+c x^2} \left (8 c^2 h^2 \left (128 a^2 f h^2+275 a b h (e h+3 f g)+3 b^2 \left (50 h (d h+3 e g)+129 f g^2\right )\right )-2 c h x \left (8 c^2 h \left (a h (45 e h+71 f g)+b \left (50 d h^2+80 e g h+21 f g^2\right )\right )-14 b c h^2 (46 a f h+25 b e h+39 b f g)+315 b^3 f h^3+16 c^3 g \left (3 f g^2-5 h (10 d h+3 e g)\right )\right )-210 b^2 c h^3 (14 a f h+5 b (e h+3 f g))-16 c^3 h \left (16 a h \left (5 h (d h+3 e g)+13 f g^2\right )+b g \left (5 h (54 d h+47 e g)+39 f g^2\right )\right )+945 b^4 f h^4-64 c^4 g^2 \left (3 f g^2-5 h (16 d h+3 e g)\right )\right )}{1920 c^5 h}+\frac{\tanh ^{-1}\left (\frac{b+2 c x}{2 \sqrt{c} \sqrt{a+b x+c x^2}}\right ) \left (-80 b c^2 h \left (3 a^2 f h^2+3 a b h (e h+3 f g)+b^2 \left (d h^2+3 e g h+3 f g^2\right )\right )+96 c^3 \left (a^2 h^2 (e h+3 f g)+2 a b h \left (h (d h+3 e g)+3 f g^2\right )+b^2 g \left (3 h (d h+e g)+f g^2\right )\right )+70 b^3 c h^2 (4 a f h+b e h+3 b f g)-128 c^4 g \left (a \left (3 h (d h+e g)+f g^2\right )+b g (3 d h+e g)\right )-63 b^5 f h^3+256 c^5 d g^3\right )}{256 c^{11/2}}+\frac{(g+h x)^2 \sqrt{a+b x+c x^2} \left (-2 c h (32 a f h+35 b e h+24 b f g)+63 b^2 f h^2+c^2 \left (-\left (12 f g^2-20 h (4 d h+3 e g)\right )\right )\right )}{240 c^3 h}-\frac{(g+h x)^3 \sqrt{a+b x+c x^2} (9 b f h+2 c (f g-5 e h))}{40 c^2 h}+\frac{f (g+h x)^4 \sqrt{a+b x+c x^2}}{5 c h}$

[Out]

((63*b^2*f*h^2 - 2*c*h*(24*b*f*g + 35*b*e*h + 32*a*f*h) - c^2*(12*f*g^2 - 20*h*(3*e*g + 4*d*h)))*(g + h*x)^2*S
qrt[a + b*x + c*x^2])/(240*c^3*h) - ((9*b*f*h + 2*c*(f*g - 5*e*h))*(g + h*x)^3*Sqrt[a + b*x + c*x^2])/(40*c^2*
h) + (f*(g + h*x)^4*Sqrt[a + b*x + c*x^2])/(5*c*h) + ((945*b^4*f*h^4 - 64*c^4*g^2*(3*f*g^2 - 5*h*(3*e*g + 16*d
*h)) - 210*b^2*c*h^3*(14*a*f*h + 5*b*(3*f*g + e*h)) + 8*c^2*h^2*(128*a^2*f*h^2 + 275*a*b*h*(3*f*g + e*h) + 3*b
^2*(129*f*g^2 + 50*h*(3*e*g + d*h))) - 16*c^3*h*(16*a*h*(13*f*g^2 + 5*h*(3*e*g + d*h)) + b*g*(39*f*g^2 + 5*h*(
47*e*g + 54*d*h))) - 2*c*h*(315*b^3*f*h^3 - 14*b*c*h^2*(39*b*f*g + 25*b*e*h + 46*a*f*h) + 16*c^3*g*(3*f*g^2 -
5*h*(3*e*g + 10*d*h)) + 8*c^2*h*(a*h*(71*f*g + 45*e*h) + b*(21*f*g^2 + 80*e*g*h + 50*d*h^2)))*x)*Sqrt[a + b*x
+ c*x^2])/(1920*c^5*h) + ((256*c^5*d*g^3 - 63*b^5*f*h^3 + 70*b^3*c*h^2*(3*b*f*g + b*e*h + 4*a*f*h) - 80*b*c^2*
h*(3*a^2*f*h^2 + 3*a*b*h*(3*f*g + e*h) + b^2*(3*f*g^2 + 3*e*g*h + d*h^2)) - 128*c^4*g*(b*g*(e*g + 3*d*h) + a*(
f*g^2 + 3*h*(e*g + d*h))) + 96*c^3*(a^2*h^2*(3*f*g + e*h) + b^2*g*(f*g^2 + 3*h*(e*g + d*h)) + 2*a*b*h*(3*f*g^2
+ h*(3*e*g + d*h))))*ArcTanh[(b + 2*c*x)/(2*Sqrt[c]*Sqrt[a + b*x + c*x^2])])/(256*c^(11/2))

________________________________________________________________________________________

Rubi [A]  time = 2.10221, antiderivative size = 692, normalized size of antiderivative = 1., number of steps used = 6, number of rules used = 5, integrand size = 32, $$\frac{\text{number of rules}}{\text{integrand size}}$$ = 0.156, Rules used = {1653, 832, 779, 621, 206} $\frac{\sqrt{a+b x+c x^2} \left (8 c^2 h^2 \left (128 a^2 f h^2+275 a b h (e h+3 f g)+3 b^2 \left (50 h (d h+3 e g)+129 f g^2\right )\right )-2 c h x \left (8 c^2 h \left (a h (45 e h+71 f g)+10 b h (5 d h+8 e g)+21 b f g^2\right )-14 b c h^2 (46 a f h+25 b e h+39 b f g)+315 b^3 f h^3+16 c^3 \left (3 f g^3-5 g h (10 d h+3 e g)\right )\right )-210 b^2 c h^3 (14 a f h+5 b (e h+3 f g))-16 c^3 h \left (16 a h \left (5 h (d h+3 e g)+13 f g^2\right )+b g \left (5 h (54 d h+47 e g)+39 f g^2\right )\right )+945 b^4 f h^4-64 c^4 \left (3 f g^4-5 g^2 h (16 d h+3 e g)\right )\right )}{1920 c^5 h}+\frac{\tanh ^{-1}\left (\frac{b+2 c x}{2 \sqrt{c} \sqrt{a+b x+c x^2}}\right ) \left (-80 b c^2 h \left (3 a^2 f h^2+3 a b h (e h+3 f g)+b^2 \left (d h^2+3 e g h+3 f g^2\right )\right )+96 c^3 \left (a^2 h^2 (e h+3 f g)+2 a b h \left (h (d h+3 e g)+3 f g^2\right )+b^2 g \left (3 h (d h+e g)+f g^2\right )\right )+70 b^3 c h^2 (4 a f h+b e h+3 b f g)-128 c^4 g \left (3 a h (d h+e g)+a f g^2+b g (3 d h+e g)\right )-63 b^5 f h^3+256 c^5 d g^3\right )}{256 c^{11/2}}+\frac{(g+h x)^2 \sqrt{a+b x+c x^2} \left (-2 c h (32 a f h+35 b e h+24 b f g)+63 b^2 f h^2+c^2 \left (-\left (12 f g^2-20 h (4 d h+3 e g)\right )\right )\right )}{240 c^3 h}-\frac{(g+h x)^3 \sqrt{a+b x+c x^2} (9 b f h+2 c (f g-5 e h))}{40 c^2 h}+\frac{f (g+h x)^4 \sqrt{a+b x+c x^2}}{5 c h}$

Antiderivative was successfully veriﬁed.

[In]

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

[Out]

((63*b^2*f*h^2 - 2*c*h*(24*b*f*g + 35*b*e*h + 32*a*f*h) - c^2*(12*f*g^2 - 20*h*(3*e*g + 4*d*h)))*(g + h*x)^2*S
qrt[a + b*x + c*x^2])/(240*c^3*h) - ((9*b*f*h + 2*c*(f*g - 5*e*h))*(g + h*x)^3*Sqrt[a + b*x + c*x^2])/(40*c^2*
h) + (f*(g + h*x)^4*Sqrt[a + b*x + c*x^2])/(5*c*h) + ((945*b^4*f*h^4 - 64*c^4*(3*f*g^4 - 5*g^2*h*(3*e*g + 16*d
*h)) - 210*b^2*c*h^3*(14*a*f*h + 5*b*(3*f*g + e*h)) + 8*c^2*h^2*(128*a^2*f*h^2 + 275*a*b*h*(3*f*g + e*h) + 3*b
^2*(129*f*g^2 + 50*h*(3*e*g + d*h))) - 16*c^3*h*(16*a*h*(13*f*g^2 + 5*h*(3*e*g + d*h)) + b*g*(39*f*g^2 + 5*h*(
47*e*g + 54*d*h))) - 2*c*h*(315*b^3*f*h^3 - 14*b*c*h^2*(39*b*f*g + 25*b*e*h + 46*a*f*h) + 16*c^3*(3*f*g^3 - 5*
g*h*(3*e*g + 10*d*h)) + 8*c^2*h*(21*b*f*g^2 + 10*b*h*(8*e*g + 5*d*h) + a*h*(71*f*g + 45*e*h)))*x)*Sqrt[a + b*x
+ c*x^2])/(1920*c^5*h) + ((256*c^5*d*g^3 - 63*b^5*f*h^3 + 70*b^3*c*h^2*(3*b*f*g + b*e*h + 4*a*f*h) - 128*c^4*
g*(a*f*g^2 + 3*a*h*(e*g + d*h) + b*g*(e*g + 3*d*h)) - 80*b*c^2*h*(3*a^2*f*h^2 + 3*a*b*h*(3*f*g + e*h) + b^2*(3
*f*g^2 + 3*e*g*h + d*h^2)) + 96*c^3*(a^2*h^2*(3*f*g + e*h) + b^2*g*(f*g^2 + 3*h*(e*g + d*h)) + 2*a*b*h*(3*f*g^
2 + h*(3*e*g + d*h))))*ArcTanh[(b + 2*c*x)/(2*Sqrt[c]*Sqrt[a + b*x + c*x^2])])/(256*c^(11/2))

Rule 1653

Int[(Pq_)*((d_.) + (e_.)*(x_))^(m_.)*((a_.) + (b_.)*(x_) + (c_.)*(x_)^2)^(p_), x_Symbol] :> With[{q = Expon[Pq
, x], f = Coeff[Pq, x, Expon[Pq, x]]}, Simp[(f*(d + e*x)^(m + q - 1)*(a + b*x + c*x^2)^(p + 1))/(c*e^(q - 1)*(
m + q + 2*p + 1)), x] + Dist[1/(c*e^q*(m + q + 2*p + 1)), Int[(d + e*x)^m*(a + b*x + c*x^2)^p*ExpandToSum[c*e^
q*(m + q + 2*p + 1)*Pq - c*f*(m + q + 2*p + 1)*(d + e*x)^q - f*(d + e*x)^(q - 2)*(b*d*e*(p + 1) + a*e^2*(m + q
- 1) - c*d^2*(m + q + 2*p + 1) - e*(2*c*d - b*e)*(m + q + p)*x), x], x], x] /; GtQ[q, 1] && NeQ[m + q + 2*p +
1, 0]] /; FreeQ[{a, b, c, d, e, m, p}, x] && PolyQ[Pq, x] && NeQ[b^2 - 4*a*c, 0] && NeQ[c*d^2 - b*d*e + a*e^2
, 0] &&  !(IGtQ[m, 0] && RationalQ[a, b, c, d, e] && (IntegerQ[p] || ILtQ[p + 1/2, 0]))

Rule 832

Int[((d_.) + (e_.)*(x_))^(m_)*((f_.) + (g_.)*(x_))*((a_.) + (b_.)*(x_) + (c_.)*(x_)^2)^(p_.), x_Symbol] :> Sim
p[(g*(d + e*x)^m*(a + b*x + c*x^2)^(p + 1))/(c*(m + 2*p + 2)), x] + Dist[1/(c*(m + 2*p + 2)), Int[(d + e*x)^(m
- 1)*(a + b*x + c*x^2)^p*Simp[m*(c*d*f - a*e*g) + d*(2*c*f - b*g)*(p + 1) + (m*(c*e*f + c*d*g - b*e*g) + e*(p
+ 1)*(2*c*f - b*g))*x, x], x], x] /; FreeQ[{a, b, c, d, e, f, g, p}, x] && NeQ[b^2 - 4*a*c, 0] && NeQ[c*d^2 -
b*d*e + a*e^2, 0] && GtQ[m, 0] && NeQ[m + 2*p + 2, 0] && (IntegerQ[m] || IntegerQ[p] || IntegersQ[2*m, 2*p])
&&  !(IGtQ[m, 0] && EqQ[f, 0])

Rule 779

Int[((d_.) + (e_.)*(x_))*((f_.) + (g_.)*(x_))*((a_.) + (b_.)*(x_) + (c_.)*(x_)^2)^(p_), x_Symbol] :> -Simp[((b
*e*g*(p + 2) - c*(e*f + d*g)*(2*p + 3) - 2*c*e*g*(p + 1)*x)*(a + b*x + c*x^2)^(p + 1))/(2*c^2*(p + 1)*(2*p + 3
)), x] + Dist[(b^2*e*g*(p + 2) - 2*a*c*e*g + c*(2*c*d*f - b*(e*f + d*g))*(2*p + 3))/(2*c^2*(2*p + 3)), Int[(a
+ b*x + c*x^2)^p, x], x] /; FreeQ[{a, b, c, d, e, f, g, p}, x] && NeQ[b^2 - 4*a*c, 0] &&  !LeQ[p, -1]

Rule 621

Int[1/Sqrt[(a_) + (b_.)*(x_) + (c_.)*(x_)^2], x_Symbol] :> Dist[2, Subst[Int[1/(4*c - x^2), x], x, (b + 2*c*x)
/Sqrt[a + b*x + c*x^2]], x] /; FreeQ[{a, b, c}, x] && NeQ[b^2 - 4*a*c, 0]

Rule 206

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(1*ArcTanh[(Rt[-b, 2]*x)/Rt[a, 2]])/(Rt[a, 2]*Rt[-b, 2]), x]
/; FreeQ[{a, b}, x] && NegQ[a/b] && (GtQ[a, 0] || LtQ[b, 0])

Rubi steps

\begin{align*} \int \frac{(g+h x)^3 \left (d+e x+f x^2\right )}{\sqrt{a+b x+c x^2}} \, dx &=\frac{f (g+h x)^4 \sqrt{a+b x+c x^2}}{5 c h}+\frac{\int \frac{(g+h x)^3 \left (-\frac{1}{2} h (b f g-10 c d h+8 a f h)-\frac{1}{2} h (2 c f g-10 c e h+9 b f h) x\right )}{\sqrt{a+b x+c x^2}} \, dx}{5 c h^2}\\ &=-\frac{(9 b f h+2 c (f g-5 e h)) (g+h x)^3 \sqrt{a+b x+c x^2}}{40 c^2 h}+\frac{f (g+h x)^4 \sqrt{a+b x+c x^2}}{5 c h}+\frac{\int \frac{(g+h x)^2 \left (\frac{1}{4} h \left (9 b^2 f g h+54 a b f h^2-2 b c g (3 f g+5 e h)+4 c h (20 c d g-13 a f g-15 a e h)\right )+\frac{1}{4} h \left (63 b^2 f h^2-2 c h (24 b f g+35 b e h+32 a f h)-c^2 \left (12 f g^2-20 h (3 e g+4 d h)\right )\right ) x\right )}{\sqrt{a+b x+c x^2}} \, dx}{20 c^2 h^2}\\ &=\frac{\left (63 b^2 f h^2-2 c h (24 b f g+35 b e h+32 a f h)-c^2 \left (12 f g^2-20 h (3 e g+4 d h)\right )\right ) (g+h x)^2 \sqrt{a+b x+c x^2}}{240 c^3 h}-\frac{(9 b f h+2 c (f g-5 e h)) (g+h x)^3 \sqrt{a+b x+c x^2}}{40 c^2 h}+\frac{f (g+h x)^4 \sqrt{a+b x+c x^2}}{5 c h}+\frac{\int \frac{(g+h x) \left (-\frac{1}{8} h \left (63 b^3 f g h^2+4 b c \left (6 c f g^3+10 c g h (3 e g+2 d h)-5 a h^2 (29 f g+14 e h)\right )+2 b^2 \left (126 a f h^3-c g h (51 f g+35 e h)\right )-8 c h \left (60 c^2 d g^2+32 a^2 f h^2-a c \left (33 f g^2+75 e g h+40 d h^2\right )\right )\right )-\frac{1}{8} h \left (315 b^3 f h^3-14 b c h^2 (39 b f g+25 b e h+46 a f h)+16 c^3 \left (3 f g^3-5 g h (3 e g+10 d h)\right )+8 c^2 h \left (21 b f g^2+10 b h (8 e g+5 d h)+a h (71 f g+45 e h)\right )\right ) x\right )}{\sqrt{a+b x+c x^2}} \, dx}{60 c^3 h^2}\\ &=\frac{\left (63 b^2 f h^2-2 c h (24 b f g+35 b e h+32 a f h)-c^2 \left (12 f g^2-20 h (3 e g+4 d h)\right )\right ) (g+h x)^2 \sqrt{a+b x+c x^2}}{240 c^3 h}-\frac{(9 b f h+2 c (f g-5 e h)) (g+h x)^3 \sqrt{a+b x+c x^2}}{40 c^2 h}+\frac{f (g+h x)^4 \sqrt{a+b x+c x^2}}{5 c h}+\frac{\left (945 b^4 f h^4-64 c^4 \left (3 f g^4-5 g^2 h (3 e g+16 d h)\right )-210 b^2 c h^3 (14 a f h+5 b (3 f g+e h))+8 c^2 h^2 \left (128 a^2 f h^2+275 a b h (3 f g+e h)+3 b^2 \left (129 f g^2+50 h (3 e g+d h)\right )\right )-16 c^3 h \left (16 a h \left (13 f g^2+5 h (3 e g+d h)\right )+b g \left (39 f g^2+5 h (47 e g+54 d h)\right )\right )-2 c h \left (315 b^3 f h^3-14 b c h^2 (39 b f g+25 b e h+46 a f h)+16 c^3 \left (3 f g^3-5 g h (3 e g+10 d h)\right )+8 c^2 h \left (21 b f g^2+10 b h (8 e g+5 d h)+a h (71 f g+45 e h)\right )\right ) x\right ) \sqrt{a+b x+c x^2}}{1920 c^5 h}+\frac{\left (256 c^5 d g^3-63 b^5 f h^3+70 b^3 c h^2 (3 b f g+b e h+4 a f h)-128 c^4 g \left (a f g^2+3 a h (e g+d h)+b g (e g+3 d h)\right )-80 b c^2 h \left (3 a^2 f h^2+3 a b h (3 f g+e h)+b^2 \left (3 f g^2+3 e g h+d h^2\right )\right )+96 c^3 \left (a^2 h^2 (3 f g+e h)+b^2 g \left (f g^2+3 h (e g+d h)\right )+2 a b h \left (3 f g^2+h (3 e g+d h)\right )\right )\right ) \int \frac{1}{\sqrt{a+b x+c x^2}} \, dx}{256 c^5}\\ &=\frac{\left (63 b^2 f h^2-2 c h (24 b f g+35 b e h+32 a f h)-c^2 \left (12 f g^2-20 h (3 e g+4 d h)\right )\right ) (g+h x)^2 \sqrt{a+b x+c x^2}}{240 c^3 h}-\frac{(9 b f h+2 c (f g-5 e h)) (g+h x)^3 \sqrt{a+b x+c x^2}}{40 c^2 h}+\frac{f (g+h x)^4 \sqrt{a+b x+c x^2}}{5 c h}+\frac{\left (945 b^4 f h^4-64 c^4 \left (3 f g^4-5 g^2 h (3 e g+16 d h)\right )-210 b^2 c h^3 (14 a f h+5 b (3 f g+e h))+8 c^2 h^2 \left (128 a^2 f h^2+275 a b h (3 f g+e h)+3 b^2 \left (129 f g^2+50 h (3 e g+d h)\right )\right )-16 c^3 h \left (16 a h \left (13 f g^2+5 h (3 e g+d h)\right )+b g \left (39 f g^2+5 h (47 e g+54 d h)\right )\right )-2 c h \left (315 b^3 f h^3-14 b c h^2 (39 b f g+25 b e h+46 a f h)+16 c^3 \left (3 f g^3-5 g h (3 e g+10 d h)\right )+8 c^2 h \left (21 b f g^2+10 b h (8 e g+5 d h)+a h (71 f g+45 e h)\right )\right ) x\right ) \sqrt{a+b x+c x^2}}{1920 c^5 h}+\frac{\left (256 c^5 d g^3-63 b^5 f h^3+70 b^3 c h^2 (3 b f g+b e h+4 a f h)-128 c^4 g \left (a f g^2+3 a h (e g+d h)+b g (e g+3 d h)\right )-80 b c^2 h \left (3 a^2 f h^2+3 a b h (3 f g+e h)+b^2 \left (3 f g^2+3 e g h+d h^2\right )\right )+96 c^3 \left (a^2 h^2 (3 f g+e h)+b^2 g \left (f g^2+3 h (e g+d h)\right )+2 a b h \left (3 f g^2+h (3 e g+d h)\right )\right )\right ) \operatorname{Subst}\left (\int \frac{1}{4 c-x^2} \, dx,x,\frac{b+2 c x}{\sqrt{a+b x+c x^2}}\right )}{128 c^5}\\ &=\frac{\left (63 b^2 f h^2-2 c h (24 b f g+35 b e h+32 a f h)-c^2 \left (12 f g^2-20 h (3 e g+4 d h)\right )\right ) (g+h x)^2 \sqrt{a+b x+c x^2}}{240 c^3 h}-\frac{(9 b f h+2 c (f g-5 e h)) (g+h x)^3 \sqrt{a+b x+c x^2}}{40 c^2 h}+\frac{f (g+h x)^4 \sqrt{a+b x+c x^2}}{5 c h}+\frac{\left (945 b^4 f h^4-64 c^4 \left (3 f g^4-5 g^2 h (3 e g+16 d h)\right )-210 b^2 c h^3 (14 a f h+5 b (3 f g+e h))+8 c^2 h^2 \left (128 a^2 f h^2+275 a b h (3 f g+e h)+3 b^2 \left (129 f g^2+50 h (3 e g+d h)\right )\right )-16 c^3 h \left (16 a h \left (13 f g^2+5 h (3 e g+d h)\right )+b g \left (39 f g^2+5 h (47 e g+54 d h)\right )\right )-2 c h \left (315 b^3 f h^3-14 b c h^2 (39 b f g+25 b e h+46 a f h)+16 c^3 \left (3 f g^3-5 g h (3 e g+10 d h)\right )+8 c^2 h \left (21 b f g^2+10 b h (8 e g+5 d h)+a h (71 f g+45 e h)\right )\right ) x\right ) \sqrt{a+b x+c x^2}}{1920 c^5 h}+\frac{\left (256 c^5 d g^3-63 b^5 f h^3+70 b^3 c h^2 (3 b f g+b e h+4 a f h)-128 c^4 g \left (a f g^2+3 a h (e g+d h)+b g (e g+3 d h)\right )-80 b c^2 h \left (3 a^2 f h^2+3 a b h (3 f g+e h)+b^2 \left (3 f g^2+3 e g h+d h^2\right )\right )+96 c^3 \left (a^2 h^2 (3 f g+e h)+b^2 g \left (f g^2+3 h (e g+d h)\right )+2 a b h \left (3 f g^2+h (3 e g+d h)\right )\right )\right ) \tanh ^{-1}\left (\frac{b+2 c x}{2 \sqrt{c} \sqrt{a+b x+c x^2}}\right )}{256 c^{11/2}}\\ \end{align*}

Mathematica [A]  time = 1.28092, size = 588, normalized size = 0.85 $\frac{\sqrt{a+x (b+c x)} \left (4 c^2 h \left (256 a^2 f h^2+2 a b h (275 e h+825 f g+161 f h x)+b^2 \left (25 h (12 d h+36 e g+7 e h x)+3 f \left (300 g^2+175 g h x+42 h^2 x^2\right )\right )\right )-210 b^2 c h^2 (14 a f h+5 b e h+3 b f (5 g+h x))-16 c^3 \left (a h \left (5 h (16 d h+48 e g+9 e h x)+f \left (240 g^2+135 g h x+32 h^2 x^2\right )\right )+b \left (5 h \left (2 d h (27 g+5 h x)+e \left (54 g^2+30 g h x+7 h^2 x^2\right )\right )+3 f \left (50 g^2 h x+30 g^3+35 g h^2 x^2+9 h^3 x^3\right )\right )\right )+945 b^4 f h^3+32 c^4 \left (10 d h \left (18 g^2+9 g h x+2 h^2 x^2\right )+15 e \left (6 g^2 h x+4 g^3+4 g h^2 x^2+h^3 x^3\right )+3 f x \left (20 g^2 h x+10 g^3+15 g h^2 x^2+4 h^3 x^3\right )\right )\right )}{1920 c^5}+\frac{\tanh ^{-1}\left (\frac{b+2 c x}{2 \sqrt{c} \sqrt{a+x (b+c x)}}\right ) \left (-80 b c^2 h \left (3 a^2 f h^2+3 a b h (e h+3 f g)+b^2 \left (d h^2+3 e g h+3 f g^2\right )\right )+96 c^3 \left (a^2 h^2 (e h+3 f g)+2 a b h \left (h (d h+3 e g)+3 f g^2\right )+b^2 g \left (3 h (d h+e g)+f g^2\right )\right )+70 b^3 c h^2 (4 a f h+b e h+3 b f g)-128 c^4 g \left (3 a h (d h+e g)+a f g^2+b g (3 d h+e g)\right )-63 b^5 f h^3+256 c^5 d g^3\right )}{256 c^{11/2}}$

Antiderivative was successfully veriﬁed.

[In]

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

[Out]

(Sqrt[a + x*(b + c*x)]*(945*b^4*f*h^3 - 210*b^2*c*h^2*(5*b*e*h + 14*a*f*h + 3*b*f*(5*g + h*x)) + 32*c^4*(10*d*
h*(18*g^2 + 9*g*h*x + 2*h^2*x^2) + 15*e*(4*g^3 + 6*g^2*h*x + 4*g*h^2*x^2 + h^3*x^3) + 3*f*x*(10*g^3 + 20*g^2*h
*x + 15*g*h^2*x^2 + 4*h^3*x^3)) + 4*c^2*h*(256*a^2*f*h^2 + 2*a*b*h*(825*f*g + 275*e*h + 161*f*h*x) + b^2*(25*h
*(36*e*g + 12*d*h + 7*e*h*x) + 3*f*(300*g^2 + 175*g*h*x + 42*h^2*x^2))) - 16*c^3*(a*h*(5*h*(48*e*g + 16*d*h +
9*e*h*x) + f*(240*g^2 + 135*g*h*x + 32*h^2*x^2)) + b*(3*f*(30*g^3 + 50*g^2*h*x + 35*g*h^2*x^2 + 9*h^3*x^3) + 5
*h*(2*d*h*(27*g + 5*h*x) + e*(54*g^2 + 30*g*h*x + 7*h^2*x^2))))))/(1920*c^5) + ((256*c^5*d*g^3 - 63*b^5*f*h^3
+ 70*b^3*c*h^2*(3*b*f*g + b*e*h + 4*a*f*h) - 128*c^4*g*(a*f*g^2 + 3*a*h*(e*g + d*h) + b*g*(e*g + 3*d*h)) - 80*
b*c^2*h*(3*a^2*f*h^2 + 3*a*b*h*(3*f*g + e*h) + b^2*(3*f*g^2 + 3*e*g*h + d*h^2)) + 96*c^3*(a^2*h^2*(3*f*g + e*h
) + b^2*g*(f*g^2 + 3*h*(e*g + d*h)) + 2*a*b*h*(3*f*g^2 + h*(3*e*g + d*h))))*ArcTanh[(b + 2*c*x)/(2*Sqrt[c]*Sqr
t[a + x*(b + c*x)])])/(256*c^(11/2))

________________________________________________________________________________________

Maple [B]  time = 0.063, size = 1869, normalized size = 2.7 \begin{align*} \text{result too large to display} \end{align*}

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

[In]

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

[Out]

3/c*(c*x^2+b*x+a)^(1/2)*g^2*h*d-1/2*b/c^(3/2)*ln((1/2*b+c*x)/c^(1/2)+(c*x^2+b*x+a)^(1/2))*g^3*e+1/2*x/c*(c*x^2
+b*x+a)^(1/2)*g^3*f-1/2*a/c^(3/2)*ln((1/2*b+c*x)/c^(1/2)+(c*x^2+b*x+a)^(1/2))*g^3*f+1/c*(c*x^2+b*x+a)^(1/2)*g^
3*e+g^3*d*ln((1/2*b+c*x)/c^(1/2)+(c*x^2+b*x+a)^(1/2))/c^(1/2)-3/2*a/c^(3/2)*ln((1/2*b+c*x)/c^(1/2)+(c*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/2))*g*h^2*e-15/16*b^3/c^(7/2)*ln((1/2*b+c*x)/c^(1/2)+(c*x^2+b*x+a)^(1/2))*g^2*h*f+3/4*b/c^(5/2)*a*ln((1/2*b
+c*x)/c^(1/2)+(c*x^2+b*x+a)^(1/2))*h^3*d-2*a/c^2*(c*x^2+b*x+a)^(1/2)*g*h^2*e+x^2/c*(c*x^2+b*x+a)^(1/2)*g*h^2*e
+9/8*a^2/c^(5/2)*ln((1/2*b+c*x)/c^(1/2)+(c*x^2+b*x+a)^(1/2))*g*h^2*f-45/16*b^2/c^(7/2)*a*ln((1/2*b+c*x)/c^(1/2
)+(c*x^2+b*x+a)^(1/2))*g*h^2*f-9/8*a/c^2*x*(c*x^2+b*x+a)^(1/2)*g*h^2*f+9/4*b/c^(5/2)*a*ln((1/2*b+c*x)/c^(1/2)+
(c*x^2+b*x+a)^(1/2))*g*h^2*e+9/4*b/c^(5/2)*a*ln((1/2*b+c*x)/c^(1/2)+(c*x^2+b*x+a)^(1/2))*g^2*h*f+55/16*b/c^3*a
*(c*x^2+b*x+a)^(1/2)*g*h^2*f-5/4*b/c^2*x*(c*x^2+b*x+a)^(1/2)*g*h^2*e-5/4*b/c^2*x*(c*x^2+b*x+a)^(1/2)*g^2*h*f+1
61/240*h^3*f*b/c^3*a*x*(c*x^2+b*x+a)^(1/2)-7/8*b/c^2*x^2*(c*x^2+b*x+a)^(1/2)*g*h^2*f+35/32*b^2/c^3*x*(c*x^2+b*
x+a)^(1/2)*g*h^2*f

________________________________________________________________________________________

Maxima [F(-2)]  time = 0., size = 0, normalized size = 0. \begin{align*} \text{Exception raised: ValueError} \end{align*}

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

[In]

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

[Out]

Exception raised: ValueError

________________________________________________________________________________________

Fricas [A]  time = 3.63271, size = 3267, normalized size = 4.71 \begin{align*} \text{result too large to display} \end{align*}

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

[In]

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

[Out]

[-1/7680*(15*(32*(8*c^5*d - 4*b*c^4*e + (3*b^2*c^3 - 4*a*c^4)*f)*g^3 - 48*(8*b*c^4*d - 2*(3*b^2*c^3 - 4*a*c^4)
*e + (5*b^3*c^2 - 12*a*b*c^3)*f)*g^2*h + 6*(16*(3*b^2*c^3 - 4*a*c^4)*d - 8*(5*b^3*c^2 - 12*a*b*c^3)*e + (35*b^
4*c - 120*a*b^2*c^2 + 48*a^2*c^3)*f)*g*h^2 - (16*(5*b^3*c^2 - 12*a*b*c^3)*d - 2*(35*b^4*c - 120*a*b^2*c^2 + 48
*a^2*c^3)*e + (63*b^5 - 280*a*b^3*c + 240*a^2*b*c^2)*f)*h^3)*sqrt(c)*log(-8*c^2*x^2 - 8*b*c*x - b^2 + 4*sqrt(c
*x^2 + b*x + a)*(2*c*x + b)*sqrt(c) - 4*a*c) - 4*(384*c^5*f*h^3*x^4 + 480*(4*c^5*e - 3*b*c^4*f)*g^3 + 240*(24*
c^5*d - 18*b*c^4*e + (15*b^2*c^3 - 16*a*c^4)*f)*g^2*h - 30*(144*b*c^4*d - 8*(15*b^2*c^3 - 16*a*c^4)*e + 5*(21*
b^3*c^2 - 44*a*b*c^3)*f)*g*h^2 + (80*(15*b^2*c^3 - 16*a*c^4)*d - 50*(21*b^3*c^2 - 44*a*b*c^3)*e + (945*b^4*c -
2940*a*b^2*c^2 + 1024*a^2*c^3)*f)*h^3 + 48*(30*c^5*f*g*h^2 + (10*c^5*e - 9*b*c^4*f)*h^3)*x^3 + 8*(240*c^5*f*g
^2*h + 30*(8*c^5*e - 7*b*c^4*f)*g*h^2 + (80*c^5*d - 70*b*c^4*e + (63*b^2*c^3 - 64*a*c^4)*f)*h^3)*x^2 + 2*(480*
c^5*f*g^3 + 240*(6*c^5*e - 5*b*c^4*f)*g^2*h + 30*(48*c^5*d - 40*b*c^4*e + (35*b^2*c^3 - 36*a*c^4)*f)*g*h^2 - (
400*b*c^4*d - 10*(35*b^2*c^3 - 36*a*c^4)*e + 7*(45*b^3*c^2 - 92*a*b*c^3)*f)*h^3)*x)*sqrt(c*x^2 + b*x + a))/c^6
, -1/3840*(15*(32*(8*c^5*d - 4*b*c^4*e + (3*b^2*c^3 - 4*a*c^4)*f)*g^3 - 48*(8*b*c^4*d - 2*(3*b^2*c^3 - 4*a*c^4
)*e + (5*b^3*c^2 - 12*a*b*c^3)*f)*g^2*h + 6*(16*(3*b^2*c^3 - 4*a*c^4)*d - 8*(5*b^3*c^2 - 12*a*b*c^3)*e + (35*b
^4*c - 120*a*b^2*c^2 + 48*a^2*c^3)*f)*g*h^2 - (16*(5*b^3*c^2 - 12*a*b*c^3)*d - 2*(35*b^4*c - 120*a*b^2*c^2 + 4
8*a^2*c^3)*e + (63*b^5 - 280*a*b^3*c + 240*a^2*b*c^2)*f)*h^3)*sqrt(-c)*arctan(1/2*sqrt(c*x^2 + b*x + a)*(2*c*x
+ b)*sqrt(-c)/(c^2*x^2 + b*c*x + a*c)) - 2*(384*c^5*f*h^3*x^4 + 480*(4*c^5*e - 3*b*c^4*f)*g^3 + 240*(24*c^5*d
- 18*b*c^4*e + (15*b^2*c^3 - 16*a*c^4)*f)*g^2*h - 30*(144*b*c^4*d - 8*(15*b^2*c^3 - 16*a*c^4)*e + 5*(21*b^3*c
^2 - 44*a*b*c^3)*f)*g*h^2 + (80*(15*b^2*c^3 - 16*a*c^4)*d - 50*(21*b^3*c^2 - 44*a*b*c^3)*e + (945*b^4*c - 2940
*a*b^2*c^2 + 1024*a^2*c^3)*f)*h^3 + 48*(30*c^5*f*g*h^2 + (10*c^5*e - 9*b*c^4*f)*h^3)*x^3 + 8*(240*c^5*f*g^2*h
+ 30*(8*c^5*e - 7*b*c^4*f)*g*h^2 + (80*c^5*d - 70*b*c^4*e + (63*b^2*c^3 - 64*a*c^4)*f)*h^3)*x^2 + 2*(480*c^5*f
*g^3 + 240*(6*c^5*e - 5*b*c^4*f)*g^2*h + 30*(48*c^5*d - 40*b*c^4*e + (35*b^2*c^3 - 36*a*c^4)*f)*g*h^2 - (400*b
*c^4*d - 10*(35*b^2*c^3 - 36*a*c^4)*e + 7*(45*b^3*c^2 - 92*a*b*c^3)*f)*h^3)*x)*sqrt(c*x^2 + b*x + a))/c^6]

________________________________________________________________________________________

Sympy [F]  time = 0., size = 0, normalized size = 0. \begin{align*} \int \frac{\left (g + h x\right )^{3} \left (d + e x + f x^{2}\right )}{\sqrt{a + b x + c x^{2}}}\, dx \end{align*}

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

[In]

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

[Out]

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

________________________________________________________________________________________

Giac [A]  time = 1.26692, size = 1110, normalized size = 1.6 \begin{align*} \text{result too large to display} \end{align*}

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

[In]

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

[Out]

1/1920*sqrt(c*x^2 + b*x + a)*(2*(4*(6*(8*f*h^3*x/c + (30*c^4*f*g*h^2 - 9*b*c^3*f*h^3 + 10*c^4*h^3*e)/c^5)*x +
(240*c^4*f*g^2*h - 210*b*c^3*f*g*h^2 + 80*c^4*d*h^3 + 63*b^2*c^2*f*h^3 - 64*a*c^3*f*h^3 + 240*c^4*g*h^2*e - 70
*b*c^3*h^3*e)/c^5)*x + (480*c^4*f*g^3 - 1200*b*c^3*f*g^2*h + 1440*c^4*d*g*h^2 + 1050*b^2*c^2*f*g*h^2 - 1080*a*
c^3*f*g*h^2 - 400*b*c^3*d*h^3 - 315*b^3*c*f*h^3 + 644*a*b*c^2*f*h^3 + 1440*c^4*g^2*h*e - 1200*b*c^3*g*h^2*e +
350*b^2*c^2*h^3*e - 360*a*c^3*h^3*e)/c^5)*x - (1440*b*c^3*f*g^3 - 5760*c^4*d*g^2*h - 3600*b^2*c^2*f*g^2*h + 38
40*a*c^3*f*g^2*h + 4320*b*c^3*d*g*h^2 + 3150*b^3*c*f*g*h^2 - 6600*a*b*c^2*f*g*h^2 - 1200*b^2*c^2*d*h^3 + 1280*
a*c^3*d*h^3 - 945*b^4*f*h^3 + 2940*a*b^2*c*f*h^3 - 1024*a^2*c^2*f*h^3 - 1920*c^4*g^3*e + 4320*b*c^3*g^2*h*e -
3600*b^2*c^2*g*h^2*e + 3840*a*c^3*g*h^2*e + 1050*b^3*c*h^3*e - 2200*a*b*c^2*h^3*e)/c^5) - 1/256*(256*c^5*d*g^3
+ 96*b^2*c^3*f*g^3 - 128*a*c^4*f*g^3 - 384*b*c^4*d*g^2*h - 240*b^3*c^2*f*g^2*h + 576*a*b*c^3*f*g^2*h + 288*b^
2*c^3*d*g*h^2 - 384*a*c^4*d*g*h^2 + 210*b^4*c*f*g*h^2 - 720*a*b^2*c^2*f*g*h^2 + 288*a^2*c^3*f*g*h^2 - 80*b^3*c
^2*d*h^3 + 192*a*b*c^3*d*h^3 - 63*b^5*f*h^3 + 280*a*b^3*c*f*h^3 - 240*a^2*b*c^2*f*h^3 - 128*b*c^4*g^3*e + 288*
b^2*c^3*g^2*h*e - 384*a*c^4*g^2*h*e - 240*b^3*c^2*g*h^2*e + 576*a*b*c^3*g*h^2*e + 70*b^4*c*h^3*e - 240*a*b^2*c
^2*h^3*e + 96*a^2*c^3*h^3*e)*log(abs(-2*(sqrt(c)*x - sqrt(c*x^2 + b*x + a))*sqrt(c) - b))/c^(11/2)