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

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

[Out]

-((8*(a*h^2*(2*f*g - e*h) + c*g*(5*f*g^2 - h*(4*e*g - 3*d*h))) - h*(20*c*f*g^2 - 16*c*e*g*h + 12*c*d*h^2 + 3*a
*f*h^2)*x)*Sqrt[a + c*x^2])/(8*h^5) - ((4*(a*h^2*(2*f*g - e*h) + c*g*(5*f*g^2 - h*(4*e*g - 3*d*h))) - 3*h*(a*f
*h^2 + c*(5*f*g^2 - 4*h*(e*g - d*h)))*x)*(a + c*x^2)^(3/2))/(12*h^3*(c*g^2 + a*h^2)) - ((f*g^2 - e*g*h + d*h^2
)*(a + c*x^2)^(5/2))/(h*(c*g^2 + a*h^2)*(g + h*x)) + ((3*a^2*f*h^4 + 8*c^2*g^2*(5*f*g^2 - h*(4*e*g - 3*d*h)) +
12*a*c*h^2*(3*f*g^2 - h*(2*e*g - d*h)))*ArcTanh[(Sqrt[c]*x)/Sqrt[a + c*x^2]])/(8*Sqrt[c]*h^6) + (Sqrt[c*g^2 +
a*h^2]*(a*h^2*(2*f*g - e*h) + c*g*(5*f*g^2 - h*(4*e*g - 3*d*h)))*ArcTanh[(a*h - c*g*x)/(Sqrt[c*g^2 + a*h^2]*S
qrt[a + c*x^2])])/h^6

________________________________________________________________________________________

Rubi [A]  time = 0.90139, antiderivative size = 428, normalized size of antiderivative = 0.99, number of steps used = 8, number of rules used = 6, integrand size = 29, $$\frac{\text{number of rules}}{\text{integrand size}}$$ = 0.207, Rules used = {1651, 815, 844, 217, 206, 725} $\frac{\tanh ^{-1}\left (\frac{\sqrt{c} x}{\sqrt{a+c x^2}}\right ) \left (3 a^2 f h^4+12 a c h^2 \left (3 f g^2-h (2 e g-d h)\right )+8 c^2 \left (5 f g^4-g^2 h (4 e g-3 d h)\right )\right )}{8 \sqrt{c} h^6}-\frac{\left (a+c x^2\right )^{5/2} \left (d h^2-e g h+f g^2\right )}{h (g+h x) \left (a h^2+c g^2\right )}-\frac{\left (a+c x^2\right )^{3/2} \left (4 \left (a h^2 (2 f g-e h)-c g h (4 e g-3 d h)+5 c f g^3\right )-3 h x \left (a f h^2-4 c h (e g-d h)+5 c f g^2\right )\right )}{12 h^3 \left (a h^2+c g^2\right )}-\frac{\sqrt{a+c x^2} \left (8 \left (a h^2 (2 f g-e h)-c g h (4 e g-3 d h)+5 c f g^3\right )-h x \left (3 a f h^2+12 c d h^2-16 c e g h+20 c f g^2\right )\right )}{8 h^5}+\frac{\sqrt{a h^2+c g^2} \tanh ^{-1}\left (\frac{a h-c g x}{\sqrt{a+c x^2} \sqrt{a h^2+c g^2}}\right ) \left (a h^2 (2 f g-e h)-c g h (4 e g-3 d h)+5 c f g^3\right )}{h^6}$

Antiderivative was successfully veriﬁed.

[In]

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

[Out]

-((8*(5*c*f*g^3 - c*g*h*(4*e*g - 3*d*h) + a*h^2*(2*f*g - e*h)) - h*(20*c*f*g^2 - 16*c*e*g*h + 12*c*d*h^2 + 3*a
*f*h^2)*x)*Sqrt[a + c*x^2])/(8*h^5) - ((4*(5*c*f*g^3 - c*g*h*(4*e*g - 3*d*h) + a*h^2*(2*f*g - e*h)) - 3*h*(5*c
*f*g^2 + a*f*h^2 - 4*c*h*(e*g - d*h))*x)*(a + c*x^2)^(3/2))/(12*h^3*(c*g^2 + a*h^2)) - ((f*g^2 - e*g*h + d*h^2
)*(a + c*x^2)^(5/2))/(h*(c*g^2 + a*h^2)*(g + h*x)) + ((3*a^2*f*h^4 + 8*c^2*(5*f*g^4 - g^2*h*(4*e*g - 3*d*h)) +
12*a*c*h^2*(3*f*g^2 - h*(2*e*g - d*h)))*ArcTanh[(Sqrt[c]*x)/Sqrt[a + c*x^2]])/(8*Sqrt[c]*h^6) + (Sqrt[c*g^2 +
a*h^2]*(5*c*f*g^3 - c*g*h*(4*e*g - 3*d*h) + a*h^2*(2*f*g - e*h))*ArcTanh[(a*h - c*g*x)/(Sqrt[c*g^2 + a*h^2]*S
qrt[a + c*x^2])])/h^6

Rule 1651

Int[(Pq_)*((d_) + (e_.)*(x_))^(m_)*((a_) + (c_.)*(x_)^2)^(p_), x_Symbol] :> With[{Q = PolynomialQuotient[Pq, d
+ e*x, x], R = PolynomialRemainder[Pq, d + e*x, x]}, Simp[(e*R*(d + e*x)^(m + 1)*(a + c*x^2)^(p + 1))/((m + 1
)*(c*d^2 + a*e^2)), x] + Dist[1/((m + 1)*(c*d^2 + a*e^2)), Int[(d + e*x)^(m + 1)*(a + c*x^2)^p*ExpandToSum[(m
+ 1)*(c*d^2 + a*e^2)*Q + c*d*R*(m + 1) - c*e*R*(m + 2*p + 3)*x, x], x], x]] /; FreeQ[{a, c, d, e, p}, x] && Po
lyQ[Pq, x] && NeQ[c*d^2 + a*e^2, 0] && LtQ[m, -1]

Rule 815

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

Rule 844

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

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])

Rule 725

Int[1/(((d_) + (e_.)*(x_))*Sqrt[(a_) + (c_.)*(x_)^2]), x_Symbol] :> -Subst[Int[1/(c*d^2 + a*e^2 - x^2), x], x,
(a*e - c*d*x)/Sqrt[a + c*x^2]] /; FreeQ[{a, c, d, e}, x]

Rubi steps

\begin{align*} \int \frac{\left (a+c x^2\right )^{3/2} \left (d+e x+f x^2\right )}{(g+h x)^2} \, dx &=-\frac{\left (f g^2-e g h+d h^2\right ) \left (a+c x^2\right )^{5/2}}{h \left (c g^2+a h^2\right ) (g+h x)}-\frac{\int \frac{\left (-c d g+a f g-a e h-\left (a f h-c \left (4 e g-\frac{5 f g^2}{h}-4 d h\right )\right ) x\right ) \left (a+c x^2\right )^{3/2}}{g+h x} \, dx}{c g^2+a h^2}\\ &=-\frac{\left (4 \left (5 c f g^3-c g h (4 e g-3 d h)+a h^2 (2 f g-e h)\right )-3 h \left (5 c f g^2+a f h^2-4 c h (e g-d h)\right ) x\right ) \left (a+c x^2\right )^{3/2}}{12 h^3 \left (c g^2+a h^2\right )}-\frac{\left (f g^2-e g h+d h^2\right ) \left (a+c x^2\right )^{5/2}}{h \left (c g^2+a h^2\right ) (g+h x)}-\frac{\int \frac{\left (a c (5 f g-4 e h) \left (c g^2+a h^2\right )-\frac{c \left (c g^2+a h^2\right ) \left (20 c f g^2-16 c e g h+12 c d h^2+3 a f h^2\right ) x}{h}\right ) \sqrt{a+c x^2}}{g+h x} \, dx}{4 c h^2 \left (c g^2+a h^2\right )}\\ &=-\frac{\left (8 \left (5 c f g^3-c g h (4 e g-3 d h)+a h^2 (2 f g-e h)\right )-h \left (20 c f g^2-16 c e g h+12 c d h^2+3 a f h^2\right ) x\right ) \sqrt{a+c x^2}}{8 h^5}-\frac{\left (4 \left (5 c f g^3-c g h (4 e g-3 d h)+a h^2 (2 f g-e h)\right )-3 h \left (5 c f g^2+a f h^2-4 c h (e g-d h)\right ) x\right ) \left (a+c x^2\right )^{3/2}}{12 h^3 \left (c g^2+a h^2\right )}-\frac{\left (f g^2-e g h+d h^2\right ) \left (a+c x^2\right )^{5/2}}{h \left (c g^2+a h^2\right ) (g+h x)}-\frac{\int \frac{a c^2 \left (c g^2+a h^2\right ) \left (a h^2 (13 f g-8 e h)+4 c \left (5 f g^3-g h (4 e g-3 d h)\right )\right )-\frac{c^2 \left (c g^2+a h^2\right ) \left (3 a^2 f h^4+8 c^2 \left (5 f g^4-g^2 h (4 e g-3 d h)\right )+12 a c h^2 \left (3 f g^2-h (2 e g-d h)\right )\right ) x}{h}}{(g+h x) \sqrt{a+c x^2}} \, dx}{8 c^2 h^4 \left (c g^2+a h^2\right )}\\ &=-\frac{\left (8 \left (5 c f g^3-c g h (4 e g-3 d h)+a h^2 (2 f g-e h)\right )-h \left (20 c f g^2-16 c e g h+12 c d h^2+3 a f h^2\right ) x\right ) \sqrt{a+c x^2}}{8 h^5}-\frac{\left (4 \left (5 c f g^3-c g h (4 e g-3 d h)+a h^2 (2 f g-e h)\right )-3 h \left (5 c f g^2+a f h^2-4 c h (e g-d h)\right ) x\right ) \left (a+c x^2\right )^{3/2}}{12 h^3 \left (c g^2+a h^2\right )}-\frac{\left (f g^2-e g h+d h^2\right ) \left (a+c x^2\right )^{5/2}}{h \left (c g^2+a h^2\right ) (g+h x)}-\frac{\left (\left (c g^2+a h^2\right ) \left (5 c f g^3-c g h (4 e g-3 d h)+a h^2 (2 f g-e h)\right )\right ) \int \frac{1}{(g+h x) \sqrt{a+c x^2}} \, dx}{h^6}+\frac{\left (3 a^2 f h^4+8 c^2 \left (5 f g^4-g^2 h (4 e g-3 d h)\right )+12 a c h^2 \left (3 f g^2-h (2 e g-d h)\right )\right ) \int \frac{1}{\sqrt{a+c x^2}} \, dx}{8 h^6}\\ &=-\frac{\left (8 \left (5 c f g^3-c g h (4 e g-3 d h)+a h^2 (2 f g-e h)\right )-h \left (20 c f g^2-16 c e g h+12 c d h^2+3 a f h^2\right ) x\right ) \sqrt{a+c x^2}}{8 h^5}-\frac{\left (4 \left (5 c f g^3-c g h (4 e g-3 d h)+a h^2 (2 f g-e h)\right )-3 h \left (5 c f g^2+a f h^2-4 c h (e g-d h)\right ) x\right ) \left (a+c x^2\right )^{3/2}}{12 h^3 \left (c g^2+a h^2\right )}-\frac{\left (f g^2-e g h+d h^2\right ) \left (a+c x^2\right )^{5/2}}{h \left (c g^2+a h^2\right ) (g+h x)}+\frac{\left (\left (c g^2+a h^2\right ) \left (5 c f g^3-c g h (4 e g-3 d h)+a h^2 (2 f g-e h)\right )\right ) \operatorname{Subst}\left (\int \frac{1}{c g^2+a h^2-x^2} \, dx,x,\frac{a h-c g x}{\sqrt{a+c x^2}}\right )}{h^6}+\frac{\left (3 a^2 f h^4+8 c^2 \left (5 f g^4-g^2 h (4 e g-3 d h)\right )+12 a c h^2 \left (3 f g^2-h (2 e g-d h)\right )\right ) \operatorname{Subst}\left (\int \frac{1}{1-c x^2} \, dx,x,\frac{x}{\sqrt{a+c x^2}}\right )}{8 h^6}\\ &=-\frac{\left (8 \left (5 c f g^3-c g h (4 e g-3 d h)+a h^2 (2 f g-e h)\right )-h \left (20 c f g^2-16 c e g h+12 c d h^2+3 a f h^2\right ) x\right ) \sqrt{a+c x^2}}{8 h^5}-\frac{\left (4 \left (5 c f g^3-c g h (4 e g-3 d h)+a h^2 (2 f g-e h)\right )-3 h \left (5 c f g^2+a f h^2-4 c h (e g-d h)\right ) x\right ) \left (a+c x^2\right )^{3/2}}{12 h^3 \left (c g^2+a h^2\right )}-\frac{\left (f g^2-e g h+d h^2\right ) \left (a+c x^2\right )^{5/2}}{h \left (c g^2+a h^2\right ) (g+h x)}+\frac{\left (3 a^2 f h^4+8 c^2 \left (5 f g^4-g^2 h (4 e g-3 d h)\right )+12 a c h^2 \left (3 f g^2-h (2 e g-d h)\right )\right ) \tanh ^{-1}\left (\frac{\sqrt{c} x}{\sqrt{a+c x^2}}\right )}{8 \sqrt{c} h^6}+\frac{\sqrt{c g^2+a h^2} \left (5 c f g^3-c g h (4 e g-3 d h)+a h^2 (2 f g-e h)\right ) \tanh ^{-1}\left (\frac{a h-c g x}{\sqrt{c g^2+a h^2} \sqrt{a+c x^2}}\right )}{h^6}\\ \end{align*}

Mathematica [A]  time = 0.582258, size = 392, normalized size = 0.91 $\frac{\frac{3 \log \left (\sqrt{c} \sqrt{a+c x^2}+c x\right ) \left (3 a^2 f h^4+12 a c h^2 \left (h (d h-2 e g)+3 f g^2\right )+8 c^2 \left (g^2 h (3 d h-4 e g)+5 f g^4\right )\right )}{\sqrt{c}}+h \sqrt{a+c x^2} \left (3 h x \left (5 a f h^2+4 c \left (h (d h-2 e g)+3 f g^2\right )\right )-\frac{24 \left (a h^2+c g^2\right ) \left (h (d h-e g)+f g^2\right )}{g+h x}+8 \left (4 a h^2 (e h-2 f g)-3 c \left (g h (2 d h-3 e g)+4 f g^3\right )\right )+8 c h^2 x^2 (e h-2 f g)+6 c f h^3 x^3\right )+24 \sqrt{a h^2+c g^2} \log \left (\sqrt{a+c x^2} \sqrt{a h^2+c g^2}+a h-c g x\right ) \left (a h^2 (2 f g-e h)+c g h (3 d h-4 e g)+5 c f g^3\right )-24 \sqrt{a h^2+c g^2} \log (g+h x) \left (a h^2 (2 f g-e h)+c g h (3 d h-4 e g)+5 c f g^3\right )}{24 h^6}$

Antiderivative was successfully veriﬁed.

[In]

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

[Out]

(h*Sqrt[a + c*x^2]*(8*(4*a*h^2*(-2*f*g + e*h) - 3*c*(4*f*g^3 + g*h*(-3*e*g + 2*d*h))) + 3*h*(5*a*f*h^2 + 4*c*(
3*f*g^2 + h*(-2*e*g + d*h)))*x + 8*c*h^2*(-2*f*g + e*h)*x^2 + 6*c*f*h^3*x^3 - (24*(c*g^2 + a*h^2)*(f*g^2 + h*(
-(e*g) + d*h)))/(g + h*x)) - 24*Sqrt[c*g^2 + a*h^2]*(5*c*f*g^3 + c*g*h*(-4*e*g + 3*d*h) + a*h^2*(2*f*g - e*h))
*Log[g + h*x] + (3*(3*a^2*f*h^4 + 12*a*c*h^2*(3*f*g^2 + h*(-2*e*g + d*h)) + 8*c^2*(5*f*g^4 + g^2*h*(-4*e*g + 3
*d*h)))*Log[c*x + Sqrt[c]*Sqrt[a + c*x^2]])/Sqrt[c] + 24*Sqrt[c*g^2 + a*h^2]*(5*c*f*g^3 + c*g*h*(-4*e*g + 3*d*
h) + a*h^2*(2*f*g - e*h))*Log[a*h - c*g*x + Sqrt[c*g^2 + a*h^2]*Sqrt[a + c*x^2]])/(24*h^6)

________________________________________________________________________________________

Maple [B]  time = 0.226, size = 5121, normalized size = 11.9 \begin{align*} \text{output too large to display} \end{align*}

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

[In]

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

[Out]

result too large to display

________________________________________________________________________________________

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

[Out]

Exception raised: ValueError

________________________________________________________________________________________

Fricas [F(-1)]  time = 0., size = 0, normalized size = 0. \begin{align*} \text{Timed out} \end{align*}

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

[In]

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

[Out]

Timed out

________________________________________________________________________________________

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

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

[In]

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

[Out]

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

________________________________________________________________________________________

Giac [F(-1)]  time = 0., size = 0, normalized size = 0. \begin{align*} \text{Timed out} \end{align*}

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

[In]

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

[Out]

Timed out