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

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

[Out]

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

________________________________________________________________________________________

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

Antiderivative was successfully veriﬁed.

[In]

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

[Out]

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

Int[(a_)*(u_), x_Symbol] :> Dist[a, Int[u, x], x] /; FreeQ[a, x] &&  !MatchQ[u, (b_)*(v_) /; FreeQ[b, x]]

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

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

Antiderivative was successfully veriﬁed.

[In]

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

[Out]

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

________________________________________________________________________________________

Maple [B]  time = 0.256, size = 862, normalized size = 6.3 \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)/(c*x^2+a)^(3/2),x)

[Out]

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

[Out]

Exception raised: ValueError

________________________________________________________________________________________

Fricas [B]  time = 12.2165, size = 1431, normalized size = 10.37 \begin{align*} \left [\frac{{\left (a^{2} c f g^{2} - a^{2} c e g h + a^{2} c d h^{2} +{\left (a c^{2} f g^{2} - a c^{2} e g h + a c^{2} d h^{2}\right )} x^{2}\right )} \sqrt{c g^{2} + a h^{2}} \log \left (\frac{2 \, a c g h x - a c g^{2} - 2 \, a^{2} h^{2} -{\left (2 \, c^{2} g^{2} + a c h^{2}\right )} x^{2} - 2 \, \sqrt{c g^{2} + a h^{2}}{\left (c g x - a h\right )} \sqrt{c x^{2} + a}}{h^{2} x^{2} + 2 \, g h x + g^{2}}\right ) - 2 \,{\left (a c^{2} e g^{3} + a^{2} c e g h^{2} -{\left (a c^{2} d - a^{2} c f\right )} g^{2} h -{\left (a^{2} c d - a^{3} f\right )} h^{3} -{\left (a c^{2} e g^{2} h + a^{2} c e h^{3} +{\left (c^{3} d - a c^{2} f\right )} g^{3} +{\left (a c^{2} d - a^{2} c f\right )} g h^{2}\right )} x\right )} \sqrt{c x^{2} + a}}{2 \,{\left (a^{2} c^{3} g^{4} + 2 \, a^{3} c^{2} g^{2} h^{2} + a^{4} c h^{4} +{\left (a c^{4} g^{4} + 2 \, a^{2} c^{3} g^{2} h^{2} + a^{3} c^{2} h^{4}\right )} x^{2}\right )}}, -\frac{{\left (a^{2} c f g^{2} - a^{2} c e g h + a^{2} c d h^{2} +{\left (a c^{2} f g^{2} - a c^{2} e g h + a c^{2} d h^{2}\right )} x^{2}\right )} \sqrt{-c g^{2} - a h^{2}} \arctan \left (\frac{\sqrt{-c g^{2} - a h^{2}}{\left (c g x - a h\right )} \sqrt{c x^{2} + a}}{a c g^{2} + a^{2} h^{2} +{\left (c^{2} g^{2} + a c h^{2}\right )} x^{2}}\right ) +{\left (a c^{2} e g^{3} + a^{2} c e g h^{2} -{\left (a c^{2} d - a^{2} c f\right )} g^{2} h -{\left (a^{2} c d - a^{3} f\right )} h^{3} -{\left (a c^{2} e g^{2} h + a^{2} c e h^{3} +{\left (c^{3} d - a c^{2} f\right )} g^{3} +{\left (a c^{2} d - a^{2} c f\right )} g h^{2}\right )} x\right )} \sqrt{c x^{2} + a}}{a^{2} c^{3} g^{4} + 2 \, a^{3} c^{2} g^{2} h^{2} + a^{4} c h^{4} +{\left (a c^{4} g^{4} + 2 \, a^{2} c^{3} g^{2} h^{2} + a^{3} c^{2} h^{4}\right )} x^{2}}\right ] \end{align*}

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

[In]

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

[Out]

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

________________________________________________________________________________________

Sympy [F]  time = 0., size = 0, normalized size = 0. \begin{align*} \int \frac{d + e x + f x^{2}}{\left (a + c x^{2}\right )^{\frac{3}{2}} \left (g + h x\right )}\, 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)/(c*x**2+a)**(3/2),x)

[Out]

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

________________________________________________________________________________________

Giac [B]  time = 1.18535, size = 397, normalized size = 2.88 \begin{align*} \frac{\frac{{\left (c^{3} d g^{3} - a c^{2} f g^{3} + a c^{2} d g h^{2} - a^{2} c f g h^{2} + a c^{2} g^{2} h e + a^{2} c h^{3} e\right )} x}{a c^{3} g^{4} + 2 \, a^{2} c^{2} g^{2} h^{2} + a^{3} c h^{4}} + \frac{a c^{2} d g^{2} h - a^{2} c f g^{2} h + a^{2} c d h^{3} - a^{3} f h^{3} - a c^{2} g^{3} e - a^{2} c g h^{2} e}{a c^{3} g^{4} + 2 \, a^{2} c^{2} g^{2} h^{2} + a^{3} c h^{4}}}{\sqrt{c x^{2} + a}} - \frac{2 \,{\left (f g^{2} + d h^{2} - g h e\right )} \arctan \left (\frac{{\left (\sqrt{c} x - \sqrt{c x^{2} + a}\right )} h + \sqrt{c} g}{\sqrt{-c g^{2} - a h^{2}}}\right )}{{\left (c g^{2} + a h^{2}\right )} \sqrt{-c g^{2} - a h^{2}}} \end{align*}

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

[In]

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

[Out]

((c^3*d*g^3 - a*c^2*f*g^3 + a*c^2*d*g*h^2 - a^2*c*f*g*h^2 + a*c^2*g^2*h*e + a^2*c*h^3*e)*x/(a*c^3*g^4 + 2*a^2*
c^2*g^2*h^2 + a^3*c*h^4) + (a*c^2*d*g^2*h - a^2*c*f*g^2*h + a^2*c*d*h^3 - a^3*f*h^3 - a*c^2*g^3*e - a^2*c*g*h^
2*e)/(a*c^3*g^4 + 2*a^2*c^2*g^2*h^2 + a^3*c*h^4))/sqrt(c*x^2 + a) - 2*(f*g^2 + d*h^2 - g*h*e)*arctan(((sqrt(c)
*x - sqrt(c*x^2 + a))*h + sqrt(c)*g)/sqrt(-c*g^2 - a*h^2))/((c*g^2 + a*h^2)*sqrt(-c*g^2 - a*h^2))