### 3.180 $$\int \sqrt{a+b x+c x^2} (A+C x^2) \, dx$$

Optimal. Leaf size=157 $\frac{(b+2 c x) \sqrt{a+b x+c x^2} \left (-4 a c C+16 A c^2+5 b^2 C\right )}{64 c^3}-\frac{\left (b^2-4 a c\right ) \left (-4 a c C+16 A c^2+5 b^2 C\right ) \tanh ^{-1}\left (\frac{b+2 c x}{2 \sqrt{c} \sqrt{a+b x+c x^2}}\right )}{128 c^{7/2}}-\frac{5 b C \left (a+b x+c x^2\right )^{3/2}}{24 c^2}+\frac{C x \left (a+b x+c x^2\right )^{3/2}}{4 c}$

[Out]

((16*A*c^2 + 5*b^2*C - 4*a*c*C)*(b + 2*c*x)*Sqrt[a + b*x + c*x^2])/(64*c^3) - (5*b*C*(a + b*x + c*x^2)^(3/2))/
(24*c^2) + (C*x*(a + b*x + c*x^2)^(3/2))/(4*c) - ((b^2 - 4*a*c)*(16*A*c^2 + 5*b^2*C - 4*a*c*C)*ArcTanh[(b + 2*
c*x)/(2*Sqrt[c]*Sqrt[a + b*x + c*x^2])])/(128*c^(7/2))

________________________________________________________________________________________

Rubi [A]  time = 0.123895, antiderivative size = 157, normalized size of antiderivative = 1., number of steps used = 5, number of rules used = 5, integrand size = 22, $$\frac{\text{number of rules}}{\text{integrand size}}$$ = 0.227, Rules used = {1661, 640, 612, 621, 206} $\frac{(b+2 c x) \sqrt{a+b x+c x^2} \left (-4 a c C+16 A c^2+5 b^2 C\right )}{64 c^3}-\frac{\left (b^2-4 a c\right ) \left (-4 a c C+16 A c^2+5 b^2 C\right ) \tanh ^{-1}\left (\frac{b+2 c x}{2 \sqrt{c} \sqrt{a+b x+c x^2}}\right )}{128 c^{7/2}}-\frac{5 b C \left (a+b x+c x^2\right )^{3/2}}{24 c^2}+\frac{C x \left (a+b x+c x^2\right )^{3/2}}{4 c}$

Antiderivative was successfully veriﬁed.

[In]

Int[Sqrt[a + b*x + c*x^2]*(A + C*x^2),x]

[Out]

((16*A*c^2 + 5*b^2*C - 4*a*c*C)*(b + 2*c*x)*Sqrt[a + b*x + c*x^2])/(64*c^3) - (5*b*C*(a + b*x + c*x^2)^(3/2))/
(24*c^2) + (C*x*(a + b*x + c*x^2)^(3/2))/(4*c) - ((b^2 - 4*a*c)*(16*A*c^2 + 5*b^2*C - 4*a*c*C)*ArcTanh[(b + 2*
c*x)/(2*Sqrt[c]*Sqrt[a + b*x + c*x^2])])/(128*c^(7/2))

Rule 1661

Int[(Pq_)*((a_.) + (b_.)*(x_) + (c_.)*(x_)^2)^(p_), x_Symbol] :> With[{q = Expon[Pq, x], e = Coeff[Pq, x, Expo
n[Pq, x]]}, Simp[(e*x^(q - 1)*(a + b*x + c*x^2)^(p + 1))/(c*(q + 2*p + 1)), x] + Dist[1/(c*(q + 2*p + 1)), Int
[(a + b*x + c*x^2)^p*ExpandToSum[c*(q + 2*p + 1)*Pq - a*e*(q - 1)*x^(q - 2) - b*e*(q + p)*x^(q - 1) - c*e*(q +
2*p + 1)*x^q, x], x], x]] /; FreeQ[{a, b, c, p}, x] && PolyQ[Pq, x] && NeQ[b^2 - 4*a*c, 0] &&  !LeQ[p, -1]

Rule 640

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

Rule 612

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

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 \sqrt{a+b x+c x^2} \left (A+C x^2\right ) \, dx &=\frac{C x \left (a+b x+c x^2\right )^{3/2}}{4 c}+\frac{\int \left (4 A c-a C-\frac{5 b C x}{2}\right ) \sqrt{a+b x+c x^2} \, dx}{4 c}\\ &=-\frac{5 b C \left (a+b x+c x^2\right )^{3/2}}{24 c^2}+\frac{C x \left (a+b x+c x^2\right )^{3/2}}{4 c}+\frac{\left (\frac{5 b^2 C}{2}+2 c (4 A c-a C)\right ) \int \sqrt{a+b x+c x^2} \, dx}{8 c^2}\\ &=\frac{\left (16 A c^2+5 b^2 C-4 a c C\right ) (b+2 c x) \sqrt{a+b x+c x^2}}{64 c^3}-\frac{5 b C \left (a+b x+c x^2\right )^{3/2}}{24 c^2}+\frac{C x \left (a+b x+c x^2\right )^{3/2}}{4 c}-\frac{\left (\left (b^2-4 a c\right ) \left (16 A c^2+5 b^2 C-4 a c C\right )\right ) \int \frac{1}{\sqrt{a+b x+c x^2}} \, dx}{128 c^3}\\ &=\frac{\left (16 A c^2+5 b^2 C-4 a c C\right ) (b+2 c x) \sqrt{a+b x+c x^2}}{64 c^3}-\frac{5 b C \left (a+b x+c x^2\right )^{3/2}}{24 c^2}+\frac{C x \left (a+b x+c x^2\right )^{3/2}}{4 c}-\frac{\left (\left (b^2-4 a c\right ) \left (16 A c^2+5 b^2 C-4 a c C\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 )}{64 c^3}\\ &=\frac{\left (16 A c^2+5 b^2 C-4 a c C\right ) (b+2 c x) \sqrt{a+b x+c x^2}}{64 c^3}-\frac{5 b C \left (a+b x+c x^2\right )^{3/2}}{24 c^2}+\frac{C x \left (a+b x+c x^2\right )^{3/2}}{4 c}-\frac{\left (b^2-4 a c\right ) \left (16 A c^2+5 b^2 C-4 a c C\right ) \tanh ^{-1}\left (\frac{b+2 c x}{2 \sqrt{c} \sqrt{a+b x+c x^2}}\right )}{128 c^{7/2}}\\ \end{align*}

Mathematica [A]  time = 0.20037, size = 144, normalized size = 0.92 $\frac{2 \sqrt{c} \sqrt{a+x (b+c x)} \left (C \left (b \left (8 c^2 x^2-52 a c\right )+24 c^2 x \left (a+2 c x^2\right )-10 b^2 c x+15 b^3\right )+48 A c^2 (b+2 c x)\right )-3 \left (b^2-4 a c\right ) \left (-4 a c C+16 A c^2+5 b^2 C\right ) \tanh ^{-1}\left (\frac{b+2 c x}{2 \sqrt{c} \sqrt{a+x (b+c x)}}\right )}{384 c^{7/2}}$

Antiderivative was successfully veriﬁed.

[In]

Integrate[Sqrt[a + b*x + c*x^2]*(A + C*x^2),x]

[Out]

(2*Sqrt[c]*Sqrt[a + x*(b + c*x)]*(48*A*c^2*(b + 2*c*x) + C*(15*b^3 - 10*b^2*c*x + 24*c^2*x*(a + 2*c*x^2) + b*(
-52*a*c + 8*c^2*x^2))) - 3*(b^2 - 4*a*c)*(16*A*c^2 + 5*b^2*C - 4*a*c*C)*ArcTanh[(b + 2*c*x)/(2*Sqrt[c]*Sqrt[a
+ x*(b + c*x)])])/(384*c^(7/2))

________________________________________________________________________________________

Maple [B]  time = 0.053, size = 327, normalized size = 2.1 \begin{align*}{\frac{Cx}{4\,c} \left ( c{x}^{2}+bx+a \right ) ^{{\frac{3}{2}}}}-{\frac{5\,bC}{24\,{c}^{2}} \left ( c{x}^{2}+bx+a \right ) ^{{\frac{3}{2}}}}+{\frac{5\,C{b}^{2}x}{32\,{c}^{2}}\sqrt{c{x}^{2}+bx+a}}+{\frac{5\,C{b}^{3}}{64\,{c}^{3}}\sqrt{c{x}^{2}+bx+a}}+{\frac{3\,C{b}^{2}a}{16}\ln \left ({ \left ({\frac{b}{2}}+cx \right ){\frac{1}{\sqrt{c}}}}+\sqrt{c{x}^{2}+bx+a} \right ){c}^{-{\frac{5}{2}}}}-{\frac{5\,C{b}^{4}}{128}\ln \left ({ \left ({\frac{b}{2}}+cx \right ){\frac{1}{\sqrt{c}}}}+\sqrt{c{x}^{2}+bx+a} \right ){c}^{-{\frac{7}{2}}}}-{\frac{Cax}{8\,c}\sqrt{c{x}^{2}+bx+a}}-{\frac{aCb}{16\,{c}^{2}}\sqrt{c{x}^{2}+bx+a}}-{\frac{{a}^{2}C}{8}\ln \left ({ \left ({\frac{b}{2}}+cx \right ){\frac{1}{\sqrt{c}}}}+\sqrt{c{x}^{2}+bx+a} \right ){c}^{-{\frac{3}{2}}}}+{\frac{Ax}{2}\sqrt{c{x}^{2}+bx+a}}+{\frac{Ab}{4\,c}\sqrt{c{x}^{2}+bx+a}}+{\frac{Aa}{2}\ln \left ({ \left ({\frac{b}{2}}+cx \right ){\frac{1}{\sqrt{c}}}}+\sqrt{c{x}^{2}+bx+a} \right ){\frac{1}{\sqrt{c}}}}-{\frac{A{b}^{2}}{8}\ln \left ({ \left ({\frac{b}{2}}+cx \right ){\frac{1}{\sqrt{c}}}}+\sqrt{c{x}^{2}+bx+a} \right ){c}^{-{\frac{3}{2}}}} \end{align*}

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

[In]

int((c*x^2+b*x+a)^(1/2)*(C*x^2+A),x)

[Out]

1/4*C*x*(c*x^2+b*x+a)^(3/2)/c-5/24*b*C*(c*x^2+b*x+a)^(3/2)/c^2+5/32*C*b^2/c^2*(c*x^2+b*x+a)^(1/2)*x+5/64*C*b^3
/c^3*(c*x^2+b*x+a)^(1/2)+3/16*C*b^2/c^(5/2)*ln((1/2*b+c*x)/c^(1/2)+(c*x^2+b*x+a)^(1/2))*a-5/128*C*b^4/c^(7/2)*
ln((1/2*b+c*x)/c^(1/2)+(c*x^2+b*x+a)^(1/2))-1/8*C*a/c*(c*x^2+b*x+a)^(1/2)*x-1/16*C*a/c^2*(c*x^2+b*x+a)^(1/2)*b
-1/8*C*a^2/c^(3/2)*ln((1/2*b+c*x)/c^(1/2)+(c*x^2+b*x+a)^(1/2))+1/2*A*(c*x^2+b*x+a)^(1/2)*x+1/4*A/c*(c*x^2+b*x+
a)^(1/2)*b+1/2*A/c^(1/2)*ln((1/2*b+c*x)/c^(1/2)+(c*x^2+b*x+a)^(1/2))*a-1/8*A/c^(3/2)*ln((1/2*b+c*x)/c^(1/2)+(c
*x^2+b*x+a)^(1/2))*b^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((c*x^2+b*x+a)^(1/2)*(C*x^2+A),x, algorithm="maxima")

[Out]

Exception raised: ValueError

________________________________________________________________________________________

Fricas [A]  time = 2.09802, size = 846, normalized size = 5.39 \begin{align*} \left [-\frac{3 \,{\left (5 \, C b^{4} - 24 \, C a b^{2} c - 64 \, A a c^{3} + 16 \,{\left (C a^{2} + A b^{2}\right )} c^{2}\right )} \sqrt{c} \log \left (-8 \, c^{2} x^{2} - 8 \, b c x - b^{2} - 4 \, \sqrt{c x^{2} + b x + a}{\left (2 \, c x + b\right )} \sqrt{c} - 4 \, a c\right ) - 4 \,{\left (48 \, C c^{4} x^{3} + 8 \, C b c^{3} x^{2} + 15 \, C b^{3} c - 52 \, C a b c^{2} + 48 \, A b c^{3} - 2 \,{\left (5 \, C b^{2} c^{2} - 12 \, C a c^{3} - 48 \, A c^{4}\right )} x\right )} \sqrt{c x^{2} + b x + a}}{768 \, c^{4}}, \frac{3 \,{\left (5 \, C b^{4} - 24 \, C a b^{2} c - 64 \, A a c^{3} + 16 \,{\left (C a^{2} + A b^{2}\right )} c^{2}\right )} \sqrt{-c} \arctan \left (\frac{\sqrt{c x^{2} + b x + a}{\left (2 \, c x + b\right )} \sqrt{-c}}{2 \,{\left (c^{2} x^{2} + b c x + a c\right )}}\right ) + 2 \,{\left (48 \, C c^{4} x^{3} + 8 \, C b c^{3} x^{2} + 15 \, C b^{3} c - 52 \, C a b c^{2} + 48 \, A b c^{3} - 2 \,{\left (5 \, C b^{2} c^{2} - 12 \, C a c^{3} - 48 \, A c^{4}\right )} x\right )} \sqrt{c x^{2} + b x + a}}{384 \, c^{4}}\right ] \end{align*}

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

[In]

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

[Out]

[-1/768*(3*(5*C*b^4 - 24*C*a*b^2*c - 64*A*a*c^3 + 16*(C*a^2 + A*b^2)*c^2)*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*(48*C*c^4*x^3 + 8*C*b*c^3*x^2 + 15*C*b^3*c - 52*
C*a*b*c^2 + 48*A*b*c^3 - 2*(5*C*b^2*c^2 - 12*C*a*c^3 - 48*A*c^4)*x)*sqrt(c*x^2 + b*x + a))/c^4, 1/384*(3*(5*C*
b^4 - 24*C*a*b^2*c - 64*A*a*c^3 + 16*(C*a^2 + A*b^2)*c^2)*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*(48*C*c^4*x^3 + 8*C*b*c^3*x^2 + 15*C*b^3*c - 52*C*a*b*c^2 + 48*A*b*c^3
- 2*(5*C*b^2*c^2 - 12*C*a*c^3 - 48*A*c^4)*x)*sqrt(c*x^2 + b*x + a))/c^4]

________________________________________________________________________________________

Sympy [F]  time = 0., size = 0, normalized size = 0. \begin{align*} \int \left (A + C 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((c*x**2+b*x+a)**(1/2)*(C*x**2+A),x)

[Out]

Integral((A + C*x**2)*sqrt(a + b*x + c*x**2), x)

________________________________________________________________________________________

Giac [A]  time = 1.25234, size = 216, normalized size = 1.38 \begin{align*} \frac{1}{192} \, \sqrt{c x^{2} + b x + a}{\left (2 \,{\left (4 \,{\left (6 \, C x + \frac{C b}{c}\right )} x - \frac{5 \, C b^{2} c - 12 \, C a c^{2} - 48 \, A c^{3}}{c^{3}}\right )} x + \frac{15 \, C b^{3} - 52 \, C a b c + 48 \, A b c^{2}}{c^{3}}\right )} + \frac{{\left (5 \, C b^{4} - 24 \, C a b^{2} c + 16 \, C a^{2} c^{2} + 16 \, A b^{2} c^{2} - 64 \, A a c^{3}\right )} \log \left ({\left | -2 \,{\left (\sqrt{c} x - \sqrt{c x^{2} + b x + a}\right )} \sqrt{c} - b \right |}\right )}{128 \, c^{\frac{7}{2}}} \end{align*}

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

[In]

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

[Out]

1/192*sqrt(c*x^2 + b*x + a)*(2*(4*(6*C*x + C*b/c)*x - (5*C*b^2*c - 12*C*a*c^2 - 48*A*c^3)/c^3)*x + (15*C*b^3 -
52*C*a*b*c + 48*A*b*c^2)/c^3) + 1/128*(5*C*b^4 - 24*C*a*b^2*c + 16*C*a^2*c^2 + 16*A*b^2*c^2 - 64*A*a*c^3)*log
(abs(-2*(sqrt(c)*x - sqrt(c*x^2 + b*x + a))*sqrt(c) - b))/c^(7/2)