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

Optimal. Leaf size=239 $-\frac{a (a h (2 f g-e h)+c g (e g-2 d h))-x \left (a^2 f h^2-a c \left (f g^2-h (2 e g-d h)\right )+c^2 d g^2\right )}{a \sqrt{a+c x^2} \left (a h^2+c g^2\right )^2}-\frac{h \sqrt{a+c x^2} \left (d h^2-e g h+f g^2\right )}{(g+h x) \left (a h^2+c g^2\right )^2}+\frac{\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 (f g^2-h (2 e g-3 d h)\right )\right )}{\left (a h^2+c g^2\right )^{5/2}}$

[Out]

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

________________________________________________________________________________________

Rubi [A]  time = 0.418131, antiderivative size = 239, 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 = {1647, 807, 725, 206} $-\frac{a (a h (2 f g-e h)+c g (e g-2 d h))-x \left (a^2 f h^2-a c \left (f g^2-h (2 e g-d h)\right )+c^2 d g^2\right )}{a \sqrt{a+c x^2} \left (a h^2+c g^2\right )^2}-\frac{h \sqrt{a+c x^2} \left (d h^2-e g h+f g^2\right )}{(g+h x) \left (a h^2+c g^2\right )^2}-\frac{\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 (2 e g-3 d h)+c f g^3\right )}{\left (a h^2+c g^2\right )^{5/2}}$

Antiderivative was successfully veriﬁed.

[In]

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

[Out]

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

Rule 1647

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

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

Mathematica [A]  time = 0.726963, size = 285, normalized size = 1.19 $\frac{2 h \left (h \left (a+c x^2\right ) \sqrt{a h^2+c g^2} \left (a^2 f h^2+a c \left (h (3 e g-2 d h)-2 f g^2\right )+c^2 d g^2\right )-a c \sqrt{a+c x^2} (g+h x) \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 (e h-2 f g)+c g h (3 d h-2 e g)+c f g^3\right )\right )+\left (a h^2+c g^2\right )^{3/2} \left (-a^2 f h^2+a c (2 h (d h-e g+e h x)+f g (g-2 h x))+2 c^2 d g h x\right )-a f \left (a h^2+c g^2\right )^{5/2}}{2 a c h \sqrt{a+c x^2} (g+h x) \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)^2*(a + c*x^2)^(3/2)),x]

[Out]

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

________________________________________________________________________________________

Maple [B]  time = 0.234, size = 1663, 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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g/h*(x+g/h)+(a*h^2+c*g^2)/h^2)^(1/2)*x*c*d

________________________________________________________________________________________

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

[Out]

Exception raised: ValueError

________________________________________________________________________________________

Fricas [B]  time = 21.0906, size = 3160, normalized size = 13.22 \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)^2/(c*x^2+a)^(3/2),x, algorithm="fricas")

[Out]

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

________________________________________________________________________________________

Sympy [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((f*x**2+e*x+d)/(h*x+g)**2/(c*x**2+a)**(3/2),x)

[Out]

Timed out

________________________________________________________________________________________

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

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

[In]

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

[Out]

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