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

Optimal. Leaf size=280 $\frac{x \sqrt{a+c x^2} \left (a^2 f h^2-2 a c \left (h (d h+2 e g)+f g^2\right )+8 c^2 d g^2\right )}{16 c^2}+\frac{a \tanh ^{-1}\left (\frac{\sqrt{c} x}{\sqrt{a+c x^2}}\right ) \left (a^2 f h^2-2 a c \left (h (d h+2 e g)+f g^2\right )+8 c^2 d g^2\right )}{16 c^{5/2}}-\frac{\left (a+c x^2\right )^{3/2} \left (8 \left (2 a h^2 (e h+2 f g)+c g \left (f g^2-2 h (5 d h+e g)\right )\right )-3 h x \left (5 h^2 (2 c d-a f)-2 c g (f g-2 e h)\right )\right )}{120 c^2 h}-\frac{\left (a+c x^2\right )^{3/2} (g+h x)^2 (f g-2 e h)}{10 c h}+\frac{f \left (a+c x^2\right )^{3/2} (g+h x)^3}{6 c h}$

[Out]

((8*c^2*d*g^2 + a^2*f*h^2 - 2*a*c*(f*g^2 + h*(2*e*g + d*h)))*x*Sqrt[a + c*x^2])/(16*c^2) - ((f*g - 2*e*h)*(g +
h*x)^2*(a + c*x^2)^(3/2))/(10*c*h) + (f*(g + h*x)^3*(a + c*x^2)^(3/2))/(6*c*h) - ((8*(2*a*h^2*(2*f*g + e*h) +
c*g*(f*g^2 - 2*h*(e*g + 5*d*h))) - 3*h*(5*(2*c*d - a*f)*h^2 - 2*c*g*(f*g - 2*e*h))*x)*(a + c*x^2)^(3/2))/(120
*c^2*h) + (a*(8*c^2*d*g^2 + a^2*f*h^2 - 2*a*c*(f*g^2 + h*(2*e*g + d*h)))*ArcTanh[(Sqrt[c]*x)/Sqrt[a + c*x^2]])
/(16*c^(5/2))

________________________________________________________________________________________

Rubi [A]  time = 0.498083, antiderivative size = 279, normalized size of antiderivative = 1., number of steps used = 6, number of rules used = 6, integrand size = 29, $$\frac{\text{number of rules}}{\text{integrand size}}$$ = 0.207, Rules used = {1654, 833, 780, 195, 217, 206} $\frac{x \sqrt{a+c x^2} \left (a^2 f h^2-2 a c \left (h (d h+2 e g)+f g^2\right )+8 c^2 d g^2\right )}{16 c^2}+\frac{a \tanh ^{-1}\left (\frac{\sqrt{c} x}{\sqrt{a+c x^2}}\right ) \left (a^2 f h^2-2 a c \left (h (d h+2 e g)+f g^2\right )+8 c^2 d g^2\right )}{16 c^{5/2}}-\frac{\left (a+c x^2\right )^{3/2} \left (8 \left (2 a h^2 (e h+2 f g)-2 c g h (5 d h+e g)+c f g^3\right )-3 h x \left (5 h^2 (2 c d-a f)-2 c g (f g-2 e h)\right )\right )}{120 c^2 h}-\frac{\left (a+c x^2\right )^{3/2} (g+h x)^2 (f g-2 e h)}{10 c h}+\frac{f \left (a+c x^2\right )^{3/2} (g+h x)^3}{6 c h}$

Antiderivative was successfully veriﬁed.

[In]

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

[Out]

((8*c^2*d*g^2 + a^2*f*h^2 - 2*a*c*(f*g^2 + h*(2*e*g + d*h)))*x*Sqrt[a + c*x^2])/(16*c^2) - ((f*g - 2*e*h)*(g +
h*x)^2*(a + c*x^2)^(3/2))/(10*c*h) + (f*(g + h*x)^3*(a + c*x^2)^(3/2))/(6*c*h) - ((8*(c*f*g^3 - 2*c*g*h*(e*g
+ 5*d*h) + 2*a*h^2*(2*f*g + e*h)) - 3*h*(5*(2*c*d - a*f)*h^2 - 2*c*g*(f*g - 2*e*h))*x)*(a + c*x^2)^(3/2))/(120
*c^2*h) + (a*(8*c^2*d*g^2 + a^2*f*h^2 - 2*a*c*(f*g^2 + h*(2*e*g + d*h)))*ArcTanh[(Sqrt[c]*x)/Sqrt[a + c*x^2]])
/(16*c^(5/2))

Rule 1654

Int[(Pq_)*((d_) + (e_.)*(x_))^(m_.)*((a_) + (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 + 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 + 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)*(a*e^2*(m + q - 1) - c*d^2*(m + q + 2*p + 1) - 2*c*d*e*(
m + q + p)*x), x], x], x] /; GtQ[q, 1] && NeQ[m + q + 2*p + 1, 0]] /; FreeQ[{a, c, d, e, m, p}, x] && PolyQ[Pq
, x] && NeQ[c*d^2 + a*e^2, 0] &&  !(EqQ[d, 0] && True) &&  !(IGtQ[m, 0] && RationalQ[a, c, d, e] && (IntegerQ[
p] || ILtQ[p + 1/2, 0]))

Rule 833

Int[((d_.) + (e_.)*(x_))^(m_)*((f_.) + (g_.)*(x_))*((a_) + (c_.)*(x_)^2)^(p_.), x_Symbol] :> Simp[(g*(d + e*x)
^m*(a + 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 + c*x^2)^p*
Simp[c*d*f*(m + 2*p + 2) - a*e*g*m + c*(e*f*(m + 2*p + 2) + d*g*m)*x, x], x], x] /; FreeQ[{a, c, d, e, f, g, p
}, x] && NeQ[c*d^2 + 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 780

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

Rule 195

Int[((a_) + (b_.)*(x_)^(n_))^(p_), x_Symbol] :> Simp[(x*(a + b*x^n)^p)/(n*p + 1), x] + Dist[(a*n*p)/(n*p + 1),
Int[(a + b*x^n)^(p - 1), x], x] /; FreeQ[{a, b}, x] && IGtQ[n, 0] && GtQ[p, 0] && (IntegerQ[2*p] || (EqQ[n, 2
] && IntegerQ[4*p]) || (EqQ[n, 2] && IntegerQ[3*p]) || LtQ[Denominator[p + 1/n], Denominator[p]])

Rule 217

Int[1/Sqrt[(a_) + (b_.)*(x_)^2], x_Symbol] :> Subst[Int[1/(1 - b*x^2), x], x, x/Sqrt[a + b*x^2]] /; FreeQ[{a,
b}, x] &&  !GtQ[a, 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 (g+h x)^2 \sqrt{a+c x^2} \left (d+e x+f x^2\right ) \, dx &=\frac{f (g+h x)^3 \left (a+c x^2\right )^{3/2}}{6 c h}+\frac{\int (g+h x)^2 \left (3 (2 c d-a f) h^2-3 c h (f g-2 e h) x\right ) \sqrt{a+c x^2} \, dx}{6 c h^2}\\ &=-\frac{(f g-2 e h) (g+h x)^2 \left (a+c x^2\right )^{3/2}}{10 c h}+\frac{f (g+h x)^3 \left (a+c x^2\right )^{3/2}}{6 c h}+\frac{\int (g+h x) \left (3 c h^2 (10 c d g-3 a f g-4 a e h)+3 c h \left (5 (2 c d-a f) h^2-2 c g (f g-2 e h)\right ) x\right ) \sqrt{a+c x^2} \, dx}{30 c^2 h^2}\\ &=-\frac{(f g-2 e h) (g+h x)^2 \left (a+c x^2\right )^{3/2}}{10 c h}+\frac{f (g+h x)^3 \left (a+c x^2\right )^{3/2}}{6 c h}-\frac{\left (8 \left (c f g^3-2 c g h (e g+5 d h)+2 a h^2 (2 f g+e h)\right )-3 h \left (5 (2 c d-a f) h^2-2 c g (f g-2 e h)\right ) x\right ) \left (a+c x^2\right )^{3/2}}{120 c^2 h}+\frac{\left (8 c^2 d g^2+a^2 f h^2-2 a c \left (f g^2+h (2 e g+d h)\right )\right ) \int \sqrt{a+c x^2} \, dx}{8 c^2}\\ &=\frac{\left (8 c^2 d g^2+a^2 f h^2-2 a c \left (f g^2+h (2 e g+d h)\right )\right ) x \sqrt{a+c x^2}}{16 c^2}-\frac{(f g-2 e h) (g+h x)^2 \left (a+c x^2\right )^{3/2}}{10 c h}+\frac{f (g+h x)^3 \left (a+c x^2\right )^{3/2}}{6 c h}-\frac{\left (8 \left (c f g^3-2 c g h (e g+5 d h)+2 a h^2 (2 f g+e h)\right )-3 h \left (5 (2 c d-a f) h^2-2 c g (f g-2 e h)\right ) x\right ) \left (a+c x^2\right )^{3/2}}{120 c^2 h}+\frac{\left (a \left (8 c^2 d g^2+a^2 f h^2-2 a c \left (f g^2+h (2 e g+d h)\right )\right )\right ) \int \frac{1}{\sqrt{a+c x^2}} \, dx}{16 c^2}\\ &=\frac{\left (8 c^2 d g^2+a^2 f h^2-2 a c \left (f g^2+h (2 e g+d h)\right )\right ) x \sqrt{a+c x^2}}{16 c^2}-\frac{(f g-2 e h) (g+h x)^2 \left (a+c x^2\right )^{3/2}}{10 c h}+\frac{f (g+h x)^3 \left (a+c x^2\right )^{3/2}}{6 c h}-\frac{\left (8 \left (c f g^3-2 c g h (e g+5 d h)+2 a h^2 (2 f g+e h)\right )-3 h \left (5 (2 c d-a f) h^2-2 c g (f g-2 e h)\right ) x\right ) \left (a+c x^2\right )^{3/2}}{120 c^2 h}+\frac{\left (a \left (8 c^2 d g^2+a^2 f h^2-2 a c \left (f g^2+h (2 e g+d h)\right )\right )\right ) \operatorname{Subst}\left (\int \frac{1}{1-c x^2} \, dx,x,\frac{x}{\sqrt{a+c x^2}}\right )}{16 c^2}\\ &=\frac{\left (8 c^2 d g^2+a^2 f h^2-2 a c \left (f g^2+h (2 e g+d h)\right )\right ) x \sqrt{a+c x^2}}{16 c^2}-\frac{(f g-2 e h) (g+h x)^2 \left (a+c x^2\right )^{3/2}}{10 c h}+\frac{f (g+h x)^3 \left (a+c x^2\right )^{3/2}}{6 c h}-\frac{\left (8 \left (c f g^3-2 c g h (e g+5 d h)+2 a h^2 (2 f g+e h)\right )-3 h \left (5 (2 c d-a f) h^2-2 c g (f g-2 e h)\right ) x\right ) \left (a+c x^2\right )^{3/2}}{120 c^2 h}+\frac{a \left (8 c^2 d g^2+a^2 f h^2-2 a c \left (f g^2+h (2 e g+d h)\right )\right ) \tanh ^{-1}\left (\frac{\sqrt{c} x}{\sqrt{a+c x^2}}\right )}{16 c^{5/2}}\\ \end{align*}

Mathematica [A]  time = 0.697218, size = 256, normalized size = 0.91 $\frac{\sqrt{a+c x^2} \left (\sqrt{c} \left (a^2 (-h) (32 e h+64 f g+15 f h x)+2 a c \left (5 d h (16 g+3 h x)+e \left (40 g^2+30 g h x+8 h^2 x^2\right )+f x \left (15 g^2+16 g h x+5 h^2 x^2\right )\right )+4 c^2 x \left (5 d \left (6 g^2+8 g h x+3 h^2 x^2\right )+x \left (2 e \left (10 g^2+15 g h x+6 h^2 x^2\right )+f x \left (15 g^2+24 g h x+10 h^2 x^2\right )\right )\right )\right )+\frac{15 \sqrt{a} \sinh ^{-1}\left (\frac{\sqrt{c} x}{\sqrt{a}}\right ) \left (a^2 f h^2-2 a c \left (h (d h+2 e g)+f g^2\right )+8 c^2 d g^2\right )}{\sqrt{\frac{c x^2}{a}+1}}\right )}{240 c^{5/2}}$

Antiderivative was successfully veriﬁed.

[In]

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

[Out]

(Sqrt[a + c*x^2]*(Sqrt[c]*(-(a^2*h*(64*f*g + 32*e*h + 15*f*h*x)) + 2*a*c*(5*d*h*(16*g + 3*h*x) + f*x*(15*g^2 +
16*g*h*x + 5*h^2*x^2) + e*(40*g^2 + 30*g*h*x + 8*h^2*x^2)) + 4*c^2*x*(5*d*(6*g^2 + 8*g*h*x + 3*h^2*x^2) + x*(
2*e*(10*g^2 + 15*g*h*x + 6*h^2*x^2) + f*x*(15*g^2 + 24*g*h*x + 10*h^2*x^2)))) + (15*Sqrt[a]*(8*c^2*d*g^2 + a^2
*f*h^2 - 2*a*c*(f*g^2 + h*(2*e*g + d*h)))*ArcSinh[(Sqrt[c]*x)/Sqrt[a]])/Sqrt[1 + (c*x^2)/a]))/(240*c^(5/2))

________________________________________________________________________________________

Maple [A]  time = 0.054, size = 446, normalized size = 1.6 \begin{align*}{\frac{f{h}^{2}{x}^{3}}{6\,c} \left ( c{x}^{2}+a \right ) ^{{\frac{3}{2}}}}-{\frac{af{h}^{2}x}{8\,{c}^{2}} \left ( c{x}^{2}+a \right ) ^{{\frac{3}{2}}}}+{\frac{{a}^{2}f{h}^{2}x}{16\,{c}^{2}}\sqrt{c{x}^{2}+a}}+{\frac{f{h}^{2}{a}^{3}}{16}\ln \left ( x\sqrt{c}+\sqrt{c{x}^{2}+a} \right ){c}^{-{\frac{5}{2}}}}+{\frac{e{x}^{2}{h}^{2}}{5\,c} \left ( c{x}^{2}+a \right ) ^{{\frac{3}{2}}}}+{\frac{2\,fg{x}^{2}h}{5\,c} \left ( c{x}^{2}+a \right ) ^{{\frac{3}{2}}}}-{\frac{2\,ae{h}^{2}}{15\,{c}^{2}} \left ( c{x}^{2}+a \right ) ^{{\frac{3}{2}}}}-{\frac{4\,afgh}{15\,{c}^{2}} \left ( c{x}^{2}+a \right ) ^{{\frac{3}{2}}}}+{\frac{dx{h}^{2}}{4\,c} \left ( c{x}^{2}+a \right ) ^{{\frac{3}{2}}}}+{\frac{egxh}{2\,c} \left ( c{x}^{2}+a \right ) ^{{\frac{3}{2}}}}+{\frac{fx{g}^{2}}{4\,c} \left ( c{x}^{2}+a \right ) ^{{\frac{3}{2}}}}-{\frac{axd{h}^{2}}{8\,c}\sqrt{c{x}^{2}+a}}-{\frac{aexgh}{4\,c}\sqrt{c{x}^{2}+a}}-{\frac{axf{g}^{2}}{8\,c}\sqrt{c{x}^{2}+a}}-{\frac{{a}^{2}d{h}^{2}}{8}\ln \left ( x\sqrt{c}+\sqrt{c{x}^{2}+a} \right ){c}^{-{\frac{3}{2}}}}-{\frac{{a}^{2}egh}{4}\ln \left ( x\sqrt{c}+\sqrt{c{x}^{2}+a} \right ){c}^{-{\frac{3}{2}}}}-{\frac{{a}^{2}f{g}^{2}}{8}\ln \left ( x\sqrt{c}+\sqrt{c{x}^{2}+a} \right ){c}^{-{\frac{3}{2}}}}+{\frac{2\,dgh}{3\,c} \left ( c{x}^{2}+a \right ) ^{{\frac{3}{2}}}}+{\frac{e{g}^{2}}{3\,c} \left ( c{x}^{2}+a \right ) ^{{\frac{3}{2}}}}+{\frac{d{g}^{2}x}{2}\sqrt{c{x}^{2}+a}}+{\frac{d{g}^{2}a}{2}\ln \left ( x\sqrt{c}+\sqrt{c{x}^{2}+a} \right ){\frac{1}{\sqrt{c}}}} \end{align*}

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

[In]

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

[Out]

1/6*f*h^2*x^3*(c*x^2+a)^(3/2)/c-1/8*f*h^2*a/c^2*x*(c*x^2+a)^(3/2)+1/16*f*h^2*a^2/c^2*x*(c*x^2+a)^(1/2)+1/16*f*
h^2*a^3/c^(5/2)*ln(x*c^(1/2)+(c*x^2+a)^(1/2))+1/5*x^2*(c*x^2+a)^(3/2)/c*e*h^2+2/5*x^2*(c*x^2+a)^(3/2)/c*f*g*h-
2/15*a/c^2*(c*x^2+a)^(3/2)*e*h^2-4/15*a/c^2*(c*x^2+a)^(3/2)*f*g*h+1/4*x*(c*x^2+a)^(3/2)/c*d*h^2+1/2*x*(c*x^2+a
)^(3/2)/c*e*g*h+1/4*x*(c*x^2+a)^(3/2)/c*f*g^2-1/8*a/c*x*(c*x^2+a)^(1/2)*d*h^2-1/4*a/c*x*(c*x^2+a)^(1/2)*e*g*h-
1/8*a/c*x*(c*x^2+a)^(1/2)*f*g^2-1/8*a^2/c^(3/2)*ln(x*c^(1/2)+(c*x^2+a)^(1/2))*d*h^2-1/4*a^2/c^(3/2)*ln(x*c^(1/
2)+(c*x^2+a)^(1/2))*e*g*h-1/8*a^2/c^(3/2)*ln(x*c^(1/2)+(c*x^2+a)^(1/2))*f*g^2+2/3*(c*x^2+a)^(3/2)/c*d*g*h+1/3*
(c*x^2+a)^(3/2)/c*e*g^2+1/2*d*g^2*x*(c*x^2+a)^(1/2)+1/2*d*g^2*a/c^(1/2)*ln(x*c^(1/2)+(c*x^2+a)^(1/2))

________________________________________________________________________________________

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)^2*(f*x^2+e*x+d)*(c*x^2+a)^(1/2),x, algorithm="maxima")

[Out]

Exception raised: ValueError

________________________________________________________________________________________

Fricas [A]  time = 1.60811, size = 1319, normalized size = 4.71 \begin{align*} \left [-\frac{15 \,{\left (4 \, a^{2} c e g h - 2 \,{\left (4 \, a c^{2} d - a^{2} c f\right )} g^{2} +{\left (2 \, a^{2} c d - a^{3} f\right )} h^{2}\right )} \sqrt{c} \log \left (-2 \, c x^{2} - 2 \, \sqrt{c x^{2} + a} \sqrt{c} x - a\right ) - 2 \,{\left (40 \, c^{3} f h^{2} x^{5} + 80 \, a c^{2} e g^{2} - 32 \, a^{2} c e h^{2} + 48 \,{\left (2 \, c^{3} f g h + c^{3} e h^{2}\right )} x^{4} + 10 \,{\left (6 \, c^{3} f g^{2} + 12 \, c^{3} e g h +{\left (6 \, c^{3} d + a c^{2} f\right )} h^{2}\right )} x^{3} + 32 \,{\left (5 \, a c^{2} d - 2 \, a^{2} c f\right )} g h + 16 \,{\left (5 \, c^{3} e g^{2} + a c^{2} e h^{2} + 2 \,{\left (5 \, c^{3} d + a c^{2} f\right )} g h\right )} x^{2} + 15 \,{\left (4 \, a c^{2} e g h + 2 \,{\left (4 \, c^{3} d + a c^{2} f\right )} g^{2} +{\left (2 \, a c^{2} d - a^{2} c f\right )} h^{2}\right )} x\right )} \sqrt{c x^{2} + a}}{480 \, c^{3}}, \frac{15 \,{\left (4 \, a^{2} c e g h - 2 \,{\left (4 \, a c^{2} d - a^{2} c f\right )} g^{2} +{\left (2 \, a^{2} c d - a^{3} f\right )} h^{2}\right )} \sqrt{-c} \arctan \left (\frac{\sqrt{-c} x}{\sqrt{c x^{2} + a}}\right ) +{\left (40 \, c^{3} f h^{2} x^{5} + 80 \, a c^{2} e g^{2} - 32 \, a^{2} c e h^{2} + 48 \,{\left (2 \, c^{3} f g h + c^{3} e h^{2}\right )} x^{4} + 10 \,{\left (6 \, c^{3} f g^{2} + 12 \, c^{3} e g h +{\left (6 \, c^{3} d + a c^{2} f\right )} h^{2}\right )} x^{3} + 32 \,{\left (5 \, a c^{2} d - 2 \, a^{2} c f\right )} g h + 16 \,{\left (5 \, c^{3} e g^{2} + a c^{2} e h^{2} + 2 \,{\left (5 \, c^{3} d + a c^{2} f\right )} g h\right )} x^{2} + 15 \,{\left (4 \, a c^{2} e g h + 2 \,{\left (4 \, c^{3} d + a c^{2} f\right )} g^{2} +{\left (2 \, a c^{2} d - a^{2} c f\right )} h^{2}\right )} x\right )} \sqrt{c x^{2} + a}}{240 \, c^{3}}\right ] \end{align*}

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

[In]

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

[Out]

[-1/480*(15*(4*a^2*c*e*g*h - 2*(4*a*c^2*d - a^2*c*f)*g^2 + (2*a^2*c*d - a^3*f)*h^2)*sqrt(c)*log(-2*c*x^2 - 2*s
qrt(c*x^2 + a)*sqrt(c)*x - a) - 2*(40*c^3*f*h^2*x^5 + 80*a*c^2*e*g^2 - 32*a^2*c*e*h^2 + 48*(2*c^3*f*g*h + c^3*
e*h^2)*x^4 + 10*(6*c^3*f*g^2 + 12*c^3*e*g*h + (6*c^3*d + a*c^2*f)*h^2)*x^3 + 32*(5*a*c^2*d - 2*a^2*c*f)*g*h +
16*(5*c^3*e*g^2 + a*c^2*e*h^2 + 2*(5*c^3*d + a*c^2*f)*g*h)*x^2 + 15*(4*a*c^2*e*g*h + 2*(4*c^3*d + a*c^2*f)*g^2
+ (2*a*c^2*d - a^2*c*f)*h^2)*x)*sqrt(c*x^2 + a))/c^3, 1/240*(15*(4*a^2*c*e*g*h - 2*(4*a*c^2*d - a^2*c*f)*g^2
+ (2*a^2*c*d - a^3*f)*h^2)*sqrt(-c)*arctan(sqrt(-c)*x/sqrt(c*x^2 + a)) + (40*c^3*f*h^2*x^5 + 80*a*c^2*e*g^2 -
32*a^2*c*e*h^2 + 48*(2*c^3*f*g*h + c^3*e*h^2)*x^4 + 10*(6*c^3*f*g^2 + 12*c^3*e*g*h + (6*c^3*d + a*c^2*f)*h^2)*
x^3 + 32*(5*a*c^2*d - 2*a^2*c*f)*g*h + 16*(5*c^3*e*g^2 + a*c^2*e*h^2 + 2*(5*c^3*d + a*c^2*f)*g*h)*x^2 + 15*(4*
a*c^2*e*g*h + 2*(4*c^3*d + a*c^2*f)*g^2 + (2*a*c^2*d - a^2*c*f)*h^2)*x)*sqrt(c*x^2 + a))/c^3]

________________________________________________________________________________________

Sympy [A]  time = 19.0432, size = 738, normalized size = 2.64 \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)**2*(f*x**2+e*x+d)*(c*x**2+a)**(1/2),x)

[Out]

-a**(5/2)*f*h**2*x/(16*c**2*sqrt(1 + c*x**2/a)) + a**(3/2)*d*h**2*x/(8*c*sqrt(1 + c*x**2/a)) + a**(3/2)*e*g*h*
x/(4*c*sqrt(1 + c*x**2/a)) + a**(3/2)*f*g**2*x/(8*c*sqrt(1 + c*x**2/a)) - a**(3/2)*f*h**2*x**3/(48*c*sqrt(1 +
c*x**2/a)) + sqrt(a)*d*g**2*x*sqrt(1 + c*x**2/a)/2 + 3*sqrt(a)*d*h**2*x**3/(8*sqrt(1 + c*x**2/a)) + 3*sqrt(a)*
e*g*h*x**3/(4*sqrt(1 + c*x**2/a)) + 3*sqrt(a)*f*g**2*x**3/(8*sqrt(1 + c*x**2/a)) + 5*sqrt(a)*f*h**2*x**5/(24*s
qrt(1 + c*x**2/a)) + a**3*f*h**2*asinh(sqrt(c)*x/sqrt(a))/(16*c**(5/2)) - a**2*d*h**2*asinh(sqrt(c)*x/sqrt(a))
/(8*c**(3/2)) - a**2*e*g*h*asinh(sqrt(c)*x/sqrt(a))/(4*c**(3/2)) - a**2*f*g**2*asinh(sqrt(c)*x/sqrt(a))/(8*c**
(3/2)) + a*d*g**2*asinh(sqrt(c)*x/sqrt(a))/(2*sqrt(c)) + 2*d*g*h*Piecewise((sqrt(a)*x**2/2, Eq(c, 0)), ((a + c
*x**2)**(3/2)/(3*c), True)) + e*g**2*Piecewise((sqrt(a)*x**2/2, Eq(c, 0)), ((a + c*x**2)**(3/2)/(3*c), True))
+ e*h**2*Piecewise((-2*a**2*sqrt(a + c*x**2)/(15*c**2) + a*x**2*sqrt(a + c*x**2)/(15*c) + x**4*sqrt(a + c*x**2
)/5, Ne(c, 0)), (sqrt(a)*x**4/4, True)) + 2*f*g*h*Piecewise((-2*a**2*sqrt(a + c*x**2)/(15*c**2) + a*x**2*sqrt(
a + c*x**2)/(15*c) + x**4*sqrt(a + c*x**2)/5, Ne(c, 0)), (sqrt(a)*x**4/4, True)) + c*d*h**2*x**5/(4*sqrt(a)*sq
rt(1 + c*x**2/a)) + c*e*g*h*x**5/(2*sqrt(a)*sqrt(1 + c*x**2/a)) + c*f*g**2*x**5/(4*sqrt(a)*sqrt(1 + c*x**2/a))
+ c*f*h**2*x**7/(6*sqrt(a)*sqrt(1 + c*x**2/a))

________________________________________________________________________________________

Giac [A]  time = 1.19823, size = 433, normalized size = 1.55 \begin{align*} \frac{1}{240} \, \sqrt{c x^{2} + a}{\left ({\left (2 \,{\left ({\left (4 \,{\left (5 \, f h^{2} x + \frac{6 \,{\left (2 \, c^{4} f g h + c^{4} h^{2} e\right )}}{c^{4}}\right )} x + \frac{5 \,{\left (6 \, c^{4} f g^{2} + 6 \, c^{4} d h^{2} + a c^{3} f h^{2} + 12 \, c^{4} g h e\right )}}{c^{4}}\right )} x + \frac{8 \,{\left (10 \, c^{4} d g h + 2 \, a c^{3} f g h + 5 \, c^{4} g^{2} e + a c^{3} h^{2} e\right )}}{c^{4}}\right )} x + \frac{15 \,{\left (8 \, c^{4} d g^{2} + 2 \, a c^{3} f g^{2} + 2 \, a c^{3} d h^{2} - a^{2} c^{2} f h^{2} + 4 \, a c^{3} g h e\right )}}{c^{4}}\right )} x + \frac{16 \,{\left (10 \, a c^{3} d g h - 4 \, a^{2} c^{2} f g h + 5 \, a c^{3} g^{2} e - 2 \, a^{2} c^{2} h^{2} e\right )}}{c^{4}}\right )} - \frac{{\left (8 \, a c^{2} d g^{2} - 2 \, a^{2} c f g^{2} - 2 \, a^{2} c d h^{2} + a^{3} f h^{2} - 4 \, a^{2} c g h e\right )} \log \left ({\left | -\sqrt{c} x + \sqrt{c x^{2} + a} \right |}\right )}{16 \, c^{\frac{5}{2}}} \end{align*}

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

[In]

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

[Out]

1/240*sqrt(c*x^2 + a)*((2*((4*(5*f*h^2*x + 6*(2*c^4*f*g*h + c^4*h^2*e)/c^4)*x + 5*(6*c^4*f*g^2 + 6*c^4*d*h^2 +
a*c^3*f*h^2 + 12*c^4*g*h*e)/c^4)*x + 8*(10*c^4*d*g*h + 2*a*c^3*f*g*h + 5*c^4*g^2*e + a*c^3*h^2*e)/c^4)*x + 15
*(8*c^4*d*g^2 + 2*a*c^3*f*g^2 + 2*a*c^3*d*h^2 - a^2*c^2*f*h^2 + 4*a*c^3*g*h*e)/c^4)*x + 16*(10*a*c^3*d*g*h - 4
*a^2*c^2*f*g*h + 5*a*c^3*g^2*e - 2*a^2*c^2*h^2*e)/c^4) - 1/16*(8*a*c^2*d*g^2 - 2*a^2*c*f*g^2 - 2*a^2*c*d*h^2 +
a^3*f*h^2 - 4*a^2*c*g*h*e)*log(abs(-sqrt(c)*x + sqrt(c*x^2 + a)))/c^(5/2)