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

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

[Out]

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

________________________________________________________________________________________

Rubi [A]  time = 0.292261, antiderivative size = 224, normalized size of antiderivative = 1., number of steps used = 4, number of rules used = 4, integrand size = 29, $$\frac{\text{number of rules}}{\text{integrand size}}$$ = 0.138, Rules used = {1651, 807, 725, 206} $-\frac{\tanh ^{-1}\left (\frac{a h-c g x}{\sqrt{a+c x^2} \sqrt{a h^2+c g^2}}\right ) \left (2 a^2 f h^2-a c \left (f g^2-h (3 e g-d h)\right )+2 c^2 d g^2\right )}{2 \left (a h^2+c g^2\right )^{5/2}}-\frac{\sqrt{a+c x^2} \left (d h^2-e g h+f g^2\right )}{2 h (g+h x)^2 \left (a h^2+c g^2\right )}+\frac{\sqrt{a+c x^2} \left (2 a h^2 (2 f g-e h)+c g h (e g-3 d h)+c f g^3\right )}{2 h (g+h x) \left (a h^2+c g^2\right )^2}$

Antiderivative was successfully veriﬁed.

[In]

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

[Out]

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

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 807

Int[((d_.) + (e_.)*(x_))^(m_)*((f_.) + (g_.)*(x_))*((a_) + (c_.)*(x_)^2)^(p_.), x_Symbol] :> -Simp[((e*f - d*g
)*(d + e*x)^(m + 1)*(a + c*x^2)^(p + 1))/(2*(p + 1)*(c*d^2 + a*e^2)), x] + Dist[(c*d*f + a*e*g)/(c*d^2 + a*e^2
), Int[(d + e*x)^(m + 1)*(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]
&& EqQ[Simplify[m + 2*p + 3], 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]

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{d+e x+f x^2}{(g+h x)^3 \sqrt{a+c x^2}} \, dx &=-\frac{\left (f g^2-e g h+d h^2\right ) \sqrt{a+c x^2}}{2 h \left (c g^2+a h^2\right ) (g+h x)^2}-\frac{\int \frac{-2 (c d g-a f g+a e h)-\left (2 a f h+c \left (e g+\frac{f g^2}{h}-d h\right )\right ) x}{(g+h x)^2 \sqrt{a+c x^2}} \, dx}{2 \left (c g^2+a h^2\right )}\\ &=-\frac{\left (f g^2-e g h+d h^2\right ) \sqrt{a+c x^2}}{2 h \left (c g^2+a h^2\right ) (g+h x)^2}+\frac{\left (c f g^3+c g h (e g-3 d h)+2 a h^2 (2 f g-e h)\right ) \sqrt{a+c x^2}}{2 h \left (c g^2+a h^2\right )^2 (g+h x)}+\frac{\left (2 c^2 d g^2+2 a^2 f h^2-a c \left (f g^2-h (3 e g-d h)\right )\right ) \int \frac{1}{(g+h x) \sqrt{a+c x^2}} \, dx}{2 \left (c g^2+a h^2\right )^2}\\ &=-\frac{\left (f g^2-e g h+d h^2\right ) \sqrt{a+c x^2}}{2 h \left (c g^2+a h^2\right ) (g+h x)^2}+\frac{\left (c f g^3+c g h (e g-3 d h)+2 a h^2 (2 f g-e h)\right ) \sqrt{a+c x^2}}{2 h \left (c g^2+a h^2\right )^2 (g+h x)}-\frac{\left (2 c^2 d g^2+2 a^2 f h^2-a c \left (f g^2-h (3 e g-d 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 )}{2 \left (c g^2+a h^2\right )^2}\\ &=-\frac{\left (f g^2-e g h+d h^2\right ) \sqrt{a+c x^2}}{2 h \left (c g^2+a h^2\right ) (g+h x)^2}+\frac{\left (c f g^3+c g h (e g-3 d h)+2 a h^2 (2 f g-e h)\right ) \sqrt{a+c x^2}}{2 h \left (c g^2+a h^2\right )^2 (g+h x)}-\frac{\left (2 c^2 d g^2+2 a^2 f h^2-a c \left (f g^2-h (3 e g-d h)\right )\right ) \tanh ^{-1}\left (\frac{a h-c g x}{\sqrt{c g^2+a h^2} \sqrt{a+c x^2}}\right )}{2 \left (c g^2+a h^2\right )^{5/2}}\\ \end{align*}

Mathematica [A]  time = 0.503486, size = 254, normalized size = 1.13 $\frac{(g+h x)^2 \log \left (\sqrt{a+c x^2} \sqrt{a h^2+c g^2}+a h-c g x\right ) \left (-2 a^2 f h^2+a c \left (h (d h-3 e g)+f g^2\right )-2 c^2 d g^2\right )+(g+h x)^2 \log (g+h x) \left (2 a^2 f h^2-a c \left (h (d h-3 e g)+f g^2\right )+2 c^2 d g^2\right )+\sqrt{a+c x^2} \sqrt{a h^2+c g^2} \left (c g \left (-d h (4 g+3 h x)+e g (2 g+h x)+f g^2 x\right )-a h (h (d h+e (g+2 h x))-f g (3 g+4 h x))\right )}{2 (g+h x)^2 \left (a h^2+c g^2\right )^{5/2}}$

Antiderivative was successfully veriﬁed.

[In]

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

[Out]

(Sqrt[c*g^2 + a*h^2]*Sqrt[a + c*x^2]*(c*g*(f*g^2*x + e*g*(2*g + h*x) - d*h*(4*g + 3*h*x)) - a*h*(-(f*g*(3*g +
4*h*x)) + h*(d*h + e*(g + 2*h*x)))) + (2*c^2*d*g^2 + 2*a^2*f*h^2 - a*c*(f*g^2 + h*(-3*e*g + d*h)))*(g + h*x)^2
*Log[g + h*x] + (-2*c^2*d*g^2 - 2*a^2*f*h^2 + a*c*(f*g^2 + h*(-3*e*g + d*h)))*(g + h*x)^2*Log[a*h - c*g*x + Sq
rt[c*g^2 + a*h^2]*Sqrt[a + c*x^2]])/(2*(c*g^2 + a*h^2)^(5/2)*(g + h*x)^2)

________________________________________________________________________________________

Maple [B]  time = 0.246, size = 1574, normalized size = 7. \begin{align*} \text{result too large to display} \end{align*}

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

[In]

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

[Out]

-1/2/h/(a*h^2+c*g^2)/(x+g/h)^2*((x+g/h)^2*c-2*c*g/h*(x+g/h)+(a*h^2+c*g^2)/h^2)^(1/2)*d+1/2/h^2/(a*h^2+c*g^2)/(
x+g/h)^2*((x+g/h)^2*c-2*c*g/h*(x+g/h)+(a*h^2+c*g^2)/h^2)^(1/2)*e*g-1/2/h^3/(a*h^2+c*g^2)/(x+g/h)^2*((x+g/h)^2*
c-2*c*g/h*(x+g/h)+(a*h^2+c*g^2)/h^2)^(1/2)*f*g^2-3/2*c*g/(a*h^2+c*g^2)^2/(x+g/h)*((x+g/h)^2*c-2*c*g/h*(x+g/h)+
(a*h^2+c*g^2)/h^2)^(1/2)*d+3/2/h*c*g^2/(a*h^2+c*g^2)^2/(x+g/h)*((x+g/h)^2*c-2*c*g/h*(x+g/h)+(a*h^2+c*g^2)/h^2)
^(1/2)*e-3/2/h^2*c*g^3/(a*h^2+c*g^2)^2/(x+g/h)*((x+g/h)^2*c-2*c*g/h*(x+g/h)+(a*h^2+c*g^2)/h^2)^(1/2)*f-3/2/h*c
^2*g^2/(a*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h)^2*c-2*c*g/h*(x+g/h)+(a*h^2+c*g^2)/h^2)
^(1/2))/(x+g/h))*f*g^2-f/h^3/((a*h^2+c*g^2)/h^2)^(1/2)*ln((2*(a*h^2+c*g^2)/h^2-2*c*g/h*(x+g/h)+2*((a*h^2+c*g^2
)/h^2)^(1/2)*((x+g/h)^2*c-2*c*g/h*(x+g/h)+(a*h^2+c*g^2)/h^2)^(1/2))/(x+g/h))-1/h/(a*h^2+c*g^2)/(x+g/h)*((x+g/h
)^2*c-2*c*g/h*(x+g/h)+(a*h^2+c*g^2)/h^2)^(1/2)*e+2/h^2/(a*h^2+c*g^2)/(x+g/h)*((x+g/h)^2*c-2*c*g/h*(x+g/h)+(a*h
^2+c*g^2)/h^2)^(1/2)*f*g

________________________________________________________________________________________

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

[Out]

Exception raised: ValueError

________________________________________________________________________________________

Fricas [B]  time = 62.2531, size = 2209, normalized size = 9.82 \begin{align*} \text{result too large to display} \end{align*}

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

[In]

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

[Out]

[1/4*((3*a*c*e*g^3*h + (2*c^2*d - a*c*f)*g^4 - (a*c*d - 2*a^2*f)*g^2*h^2 + (3*a*c*e*g*h^3 + (2*c^2*d - a*c*f)*
g^2*h^2 - (a*c*d - 2*a^2*f)*h^4)*x^2 + 2*(3*a*c*e*g^2*h^2 + (2*c^2*d - a*c*f)*g^3*h - (a*c*d - 2*a^2*f)*g*h^3)
*x)*sqrt(c*g^2 + a*h^2)*log((2*a*c*g*h*x - a*c*g^2 - 2*a^2*h^2 - (2*c^2*g^2 + a*c*h^2)*x^2 - 2*sqrt(c*g^2 + a*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rt(c*
x^2 + a))/(c^3*g^8 + 3*a*c^2*g^6*h^2 + 3*a^2*c*g^4*h^4 + a^3*g^2*h^6 + (c^3*g^6*h^2 + 3*a*c^2*g^4*h^4 + 3*a^2*
c*g^2*h^6 + a^3*h^8)*x^2 + 2*(c^3*g^7*h + 3*a*c^2*g^5*h^3 + 3*a^2*c*g^3*h^5 + a^3*g*h^7)*x)]

________________________________________________________________________________________

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

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

[In]

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

[Out]

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

________________________________________________________________________________________

Giac [B]  time = 1.25171, size = 1145, normalized size = 5.09 \begin{align*} \text{result too large to display} \end{align*}

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

[In]

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

[Out]

-(2*c^2*d*g^2 - a*c*f*g^2 - a*c*d*h^2 + 2*a^2*f*h^2 + 3*a*c*g*h*e)*arctan(((sqrt(c)*x - sqrt(c*x^2 + a))*h + s
qrt(c)*g)/sqrt(-c*g^2 - a*h^2))/((c^2*g^4 + 2*a*c*g^2*h^2 + a^2*h^4)*sqrt(-c*g^2 - a*h^2)) + (2*(sqrt(c)*x - s
qrt(c*x^2 + a))^3*c^2*f*g^4*h - 2*(sqrt(c)*x - sqrt(c*x^2 + a))^3*c^2*d*g^2*h^3 + 5*(sqrt(c)*x - sqrt(c*x^2 +
a))^3*a*c*f*g^2*h^3 + (sqrt(c)*x - sqrt(c*x^2 + a))^3*a*c*d*h^5 - 3*(sqrt(c)*x - sqrt(c*x^2 + a))^3*a*c*g*h^4*
e + 2*(sqrt(c)*x - sqrt(c*x^2 + a))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