### 3.137 $$\int \frac{a+b x^2+c x^4}{x^5 \sqrt{d-e x} \sqrt{d+e x}} \, dx$$

Optimal. Leaf size=126 $-\frac{\tanh ^{-1}\left (\frac{\sqrt{d-e x} \sqrt{d+e x}}{d}\right ) \left (3 a e^4+4 b d^2 e^2+8 c d^4\right )}{8 d^5}-\frac{\sqrt{d-e x} \sqrt{d+e x} \left (3 a e^2+4 b d^2\right )}{8 d^4 x^2}-\frac{a \sqrt{d-e x} \sqrt{d+e x}}{4 d^2 x^4}$

[Out]

-(a*Sqrt[d - e*x]*Sqrt[d + e*x])/(4*d^2*x^4) - ((4*b*d^2 + 3*a*e^2)*Sqrt[d - e*x]*Sqrt[d + e*x])/(8*d^4*x^2) -
((8*c*d^4 + 4*b*d^2*e^2 + 3*a*e^4)*ArcTanh[(Sqrt[d - e*x]*Sqrt[d + e*x])/d])/(8*d^5)

________________________________________________________________________________________

Rubi [A]  time = 0.276839, antiderivative size = 182, normalized size of antiderivative = 1.44, number of steps used = 6, number of rules used = 6, integrand size = 35, $$\frac{\text{number of rules}}{\text{integrand size}}$$ = 0.171, Rules used = {520, 1251, 897, 1157, 385, 208} $-\frac{\sqrt{d^2-e^2 x^2} \tanh ^{-1}\left (\frac{\sqrt{d^2-e^2 x^2}}{d}\right ) \left (3 a e^4+4 b d^2 e^2+8 c d^4\right )}{8 d^5 \sqrt{d-e x} \sqrt{d+e x}}-\frac{\left (d^2-e^2 x^2\right ) \left (3 a e^2+4 b d^2\right )}{8 d^4 x^2 \sqrt{d-e x} \sqrt{d+e x}}-\frac{a \left (d^2-e^2 x^2\right )}{4 d^2 x^4 \sqrt{d-e x} \sqrt{d+e x}}$

Antiderivative was successfully veriﬁed.

[In]

Int[(a + b*x^2 + c*x^4)/(x^5*Sqrt[d - e*x]*Sqrt[d + e*x]),x]

[Out]

-(a*(d^2 - e^2*x^2))/(4*d^2*x^4*Sqrt[d - e*x]*Sqrt[d + e*x]) - ((4*b*d^2 + 3*a*e^2)*(d^2 - e^2*x^2))/(8*d^4*x^
2*Sqrt[d - e*x]*Sqrt[d + e*x]) - ((8*c*d^4 + 4*b*d^2*e^2 + 3*a*e^4)*Sqrt[d^2 - e^2*x^2]*ArcTanh[Sqrt[d^2 - e^2
*x^2]/d])/(8*d^5*Sqrt[d - e*x]*Sqrt[d + e*x])

Rule 520

Int[(u_.)*((c_) + (d_.)*(x_)^(n_.) + (e_.)*(x_)^(n2_.))^(q_.)*((a1_) + (b1_.)*(x_)^(non2_.))^(p_.)*((a2_) + (b
2_.)*(x_)^(non2_.))^(p_.), x_Symbol] :> Dist[((a1 + b1*x^(n/2))^FracPart[p]*(a2 + b2*x^(n/2))^FracPart[p])/(a1
*a2 + b1*b2*x^n)^FracPart[p], Int[u*(a1*a2 + b1*b2*x^n)^p*(c + d*x^n + e*x^(2*n))^q, x], x] /; FreeQ[{a1, b1,
a2, b2, c, d, e, n, p, q}, x] && EqQ[non2, n/2] && EqQ[n2, 2*n] && EqQ[a2*b1 + a1*b2, 0]

Rule 1251

Int[(x_)^(m_.)*((d_) + (e_.)*(x_)^2)^(q_.)*((a_) + (b_.)*(x_)^2 + (c_.)*(x_)^4)^(p_.), x_Symbol] :> Dist[1/2,
Subst[Int[x^((m - 1)/2)*(d + e*x)^q*(a + b*x + c*x^2)^p, x], x, x^2], x] /; FreeQ[{a, b, c, d, e, p, q}, x] &&
IntegerQ[(m - 1)/2]

Rule 897

Int[((d_.) + (e_.)*(x_))^(m_)*((f_.) + (g_.)*(x_))^(n_)*((a_.) + (b_.)*(x_) + (c_.)*(x_)^2)^(p_.), x_Symbol] :
> With[{q = Denominator[m]}, Dist[q/e, Subst[Int[x^(q*(m + 1) - 1)*((e*f - d*g)/e + (g*x^q)/e)^n*((c*d^2 - b*d
*e + a*e^2)/e^2 - ((2*c*d - b*e)*x^q)/e^2 + (c*x^(2*q))/e^2)^p, x], x, (d + e*x)^(1/q)], x]] /; FreeQ[{a, b, c
, d, e, f, g}, x] && NeQ[e*f - d*g, 0] && NeQ[b^2 - 4*a*c, 0] && NeQ[c*d^2 - b*d*e + a*e^2, 0] && IntegersQ[n,
p] && FractionQ[m]

Rule 1157

Int[((d_) + (e_.)*(x_)^2)^(q_)*((a_) + (b_.)*(x_)^2 + (c_.)*(x_)^4)^(p_.), x_Symbol] :> With[{Qx = PolynomialQ
uotient[(a + b*x^2 + c*x^4)^p, d + e*x^2, x], R = Coeff[PolynomialRemainder[(a + b*x^2 + c*x^4)^p, d + e*x^2,
x], x, 0]}, -Simp[(R*x*(d + e*x^2)^(q + 1))/(2*d*(q + 1)), x] + Dist[1/(2*d*(q + 1)), Int[(d + e*x^2)^(q + 1)*
ExpandToSum[2*d*(q + 1)*Qx + R*(2*q + 3), x], x], x]] /; FreeQ[{a, b, c, d, e}, x] && NeQ[b^2 - 4*a*c, 0] && N
eQ[c*d^2 - b*d*e + a*e^2, 0] && IGtQ[p, 0] && LtQ[q, -1]

Rule 385

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

Rule 208

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(Rt[-(a/b), 2]*ArcTanh[x/Rt[-(a/b), 2]])/a, x] /; FreeQ[{a,
b}, x] && NegQ[a/b]

Rubi steps

\begin{align*} \int \frac{a+b x^2+c x^4}{x^5 \sqrt{d-e x} \sqrt{d+e x}} \, dx &=\frac{\sqrt{d^2-e^2 x^2} \int \frac{a+b x^2+c x^4}{x^5 \sqrt{d^2-e^2 x^2}} \, dx}{\sqrt{d-e x} \sqrt{d+e x}}\\ &=\frac{\sqrt{d^2-e^2 x^2} \operatorname{Subst}\left (\int \frac{a+b x+c x^2}{x^3 \sqrt{d^2-e^2 x}} \, dx,x,x^2\right )}{2 \sqrt{d-e x} \sqrt{d+e x}}\\ &=-\frac{\sqrt{d^2-e^2 x^2} \operatorname{Subst}\left (\int \frac{\frac{c d^4+b d^2 e^2+a e^4}{e^4}-\frac{\left (2 c d^2+b e^2\right ) x^2}{e^4}+\frac{c x^4}{e^4}}{\left (\frac{d^2}{e^2}-\frac{x^2}{e^2}\right )^3} \, dx,x,\sqrt{d^2-e^2 x^2}\right )}{e^2 \sqrt{d-e x} \sqrt{d+e x}}\\ &=-\frac{a \left (d^2-e^2 x^2\right )}{4 d^2 x^4 \sqrt{d-e x} \sqrt{d+e x}}+\frac{\sqrt{d^2-e^2 x^2} \operatorname{Subst}\left (\int \frac{-3 a-\frac{4 \left (c d^4+b d^2 e^2\right )}{e^4}+\frac{4 c d^2 x^2}{e^4}}{\left (\frac{d^2}{e^2}-\frac{x^2}{e^2}\right )^2} \, dx,x,\sqrt{d^2-e^2 x^2}\right )}{4 d^2 \sqrt{d-e x} \sqrt{d+e x}}\\ &=-\frac{a \left (d^2-e^2 x^2\right )}{4 d^2 x^4 \sqrt{d-e x} \sqrt{d+e x}}-\frac{\left (4 b d^2+3 a e^2\right ) \left (d^2-e^2 x^2\right )}{8 d^4 x^2 \sqrt{d-e x} \sqrt{d+e x}}-\frac{\left (\left (4 b+\frac{8 c d^2}{e^2}+\frac{3 a e^2}{d^2}\right ) \sqrt{d^2-e^2 x^2}\right ) \operatorname{Subst}\left (\int \frac{1}{\frac{d^2}{e^2}-\frac{x^2}{e^2}} \, dx,x,\sqrt{d^2-e^2 x^2}\right )}{8 d^2 \sqrt{d-e x} \sqrt{d+e x}}\\ &=-\frac{a \left (d^2-e^2 x^2\right )}{4 d^2 x^4 \sqrt{d-e x} \sqrt{d+e x}}-\frac{\left (4 b d^2+3 a e^2\right ) \left (d^2-e^2 x^2\right )}{8 d^4 x^2 \sqrt{d-e x} \sqrt{d+e x}}-\frac{\left (8 c d^4+4 b d^2 e^2+3 a e^4\right ) \sqrt{d^2-e^2 x^2} \tanh ^{-1}\left (\frac{\sqrt{d^2-e^2 x^2}}{d}\right )}{8 d^5 \sqrt{d-e x} \sqrt{d+e x}}\\ \end{align*}

Mathematica [A]  time = 0.167105, size = 134, normalized size = 1.06 $\frac{x^4 \sqrt{d^2-e^2 x^2} \tanh ^{-1}\left (\frac{\sqrt{d^2-e^2 x^2}}{d}\right ) \left (-\left (3 a e^4+4 b d^2 e^2+8 c d^4\right )\right )-d \left (d^2-e^2 x^2\right ) \left (2 a d^2+3 a e^2 x^2+4 b d^2 x^2\right )}{8 d^5 x^4 \sqrt{d-e x} \sqrt{d+e x}}$

Antiderivative was successfully veriﬁed.

[In]

Integrate[(a + b*x^2 + c*x^4)/(x^5*Sqrt[d - e*x]*Sqrt[d + e*x]),x]

[Out]

(-(d*(d^2 - e^2*x^2)*(2*a*d^2 + 4*b*d^2*x^2 + 3*a*e^2*x^2)) - (8*c*d^4 + 4*b*d^2*e^2 + 3*a*e^4)*x^4*Sqrt[d^2 -
e^2*x^2]*ArcTanh[Sqrt[d^2 - e^2*x^2]/d])/(8*d^5*x^4*Sqrt[d - e*x]*Sqrt[d + e*x])

________________________________________________________________________________________

Maple [C]  time = 0.025, size = 222, normalized size = 1.8 \begin{align*} -{\frac{{\it csgn} \left ( d \right ) }{8\,{d}^{5}{x}^{4}}\sqrt{-ex+d}\sqrt{ex+d} \left ( 3\,\ln \left ( 2\,{\frac{d \left ( \sqrt{-{e}^{2}{x}^{2}+{d}^{2}}{\it csgn} \left ( d \right ) +d \right ) }{x}} \right ){x}^{4}a{e}^{4}+4\,\ln \left ( 2\,{\frac{d \left ( \sqrt{-{e}^{2}{x}^{2}+{d}^{2}}{\it csgn} \left ( d \right ) +d \right ) }{x}} \right ){x}^{4}b{d}^{2}{e}^{2}+8\,\ln \left ( 2\,{\frac{d \left ( \sqrt{-{e}^{2}{x}^{2}+{d}^{2}}{\it csgn} \left ( d \right ) +d \right ) }{x}} \right ){x}^{4}c{d}^{4}+3\,{\it csgn} \left ( d \right ){x}^{2}ad{e}^{2}\sqrt{-{e}^{2}{x}^{2}+{d}^{2}}+4\,{\it csgn} \left ( d \right ){x}^{2}b{d}^{3}\sqrt{-{e}^{2}{x}^{2}+{d}^{2}}+2\,{\it csgn} \left ( d \right ) a{d}^{3}\sqrt{-{e}^{2}{x}^{2}+{d}^{2}} \right ){\frac{1}{\sqrt{-{e}^{2}{x}^{2}+{d}^{2}}}}} \end{align*}

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

[In]

int((c*x^4+b*x^2+a)/x^5/(-e*x+d)^(1/2)/(e*x+d)^(1/2),x)

[Out]

-1/8*(-e*x+d)^(1/2)*(e*x+d)^(1/2)/d^5*(3*ln(2*d*((-e^2*x^2+d^2)^(1/2)*csgn(d)+d)/x)*x^4*a*e^4+4*ln(2*d*((-e^2*
x^2+d^2)^(1/2)*csgn(d)+d)/x)*x^4*b*d^2*e^2+8*ln(2*d*((-e^2*x^2+d^2)^(1/2)*csgn(d)+d)/x)*x^4*c*d^4+3*csgn(d)*x^
2*a*d*e^2*(-e^2*x^2+d^2)^(1/2)+4*csgn(d)*x^2*b*d^3*(-e^2*x^2+d^2)^(1/2)+2*csgn(d)*a*d^3*(-e^2*x^2+d^2)^(1/2))*
csgn(d)/(-e^2*x^2+d^2)^(1/2)/x^4

________________________________________________________________________________________

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^4+b*x^2+a)/x^5/(-e*x+d)^(1/2)/(e*x+d)^(1/2),x, algorithm="maxima")

[Out]

Exception raised: ValueError

________________________________________________________________________________________

Fricas [A]  time = 1.36739, size = 224, normalized size = 1.78 \begin{align*} \frac{{\left (8 \, c d^{4} + 4 \, b d^{2} e^{2} + 3 \, a e^{4}\right )} x^{4} \log \left (\frac{\sqrt{e x + d} \sqrt{-e x + d} - d}{x}\right ) -{\left (2 \, a d^{3} +{\left (4 \, b d^{3} + 3 \, a d e^{2}\right )} x^{2}\right )} \sqrt{e x + d} \sqrt{-e x + d}}{8 \, d^{5} x^{4}} \end{align*}

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

[In]

integrate((c*x^4+b*x^2+a)/x^5/(-e*x+d)^(1/2)/(e*x+d)^(1/2),x, algorithm="fricas")

[Out]

1/8*((8*c*d^4 + 4*b*d^2*e^2 + 3*a*e^4)*x^4*log((sqrt(e*x + d)*sqrt(-e*x + d) - d)/x) - (2*a*d^3 + (4*b*d^3 + 3
*a*d*e^2)*x^2)*sqrt(e*x + d)*sqrt(-e*x + d))/(d^5*x^4)

________________________________________________________________________________________

Sympy [C]  time = 89.724, size = 253, normalized size = 2.01 \begin{align*} \frac{i a e^{4}{G_{6, 6}^{5, 3}\left (\begin{matrix} \frac{11}{4}, \frac{13}{4}, 1 & 3, 3, \frac{7}{2} \\\frac{5}{2}, \frac{11}{4}, 3, \frac{13}{4}, \frac{7}{2} & 0 \end{matrix} \middle |{\frac{d^{2}}{e^{2} x^{2}}} \right )}}{4 \pi ^{\frac{3}{2}} d^{5}} - \frac{a e^{4}{G_{6, 6}^{2, 6}\left (\begin{matrix} 2, \frac{9}{4}, \frac{5}{2}, \frac{11}{4}, 3, 1 & \\\frac{9}{4}, \frac{11}{4} & 2, \frac{5}{2}, \frac{5}{2}, 0 \end{matrix} \middle |{\frac{d^{2} e^{- 2 i \pi }}{e^{2} x^{2}}} \right )}}{4 \pi ^{\frac{3}{2}} d^{5}} + \frac{i b e^{2}{G_{6, 6}^{5, 3}\left (\begin{matrix} \frac{7}{4}, \frac{9}{4}, 1 & 2, 2, \frac{5}{2} \\\frac{3}{2}, \frac{7}{4}, 2, \frac{9}{4}, \frac{5}{2} & 0 \end{matrix} \middle |{\frac{d^{2}}{e^{2} x^{2}}} \right )}}{4 \pi ^{\frac{3}{2}} d^{3}} - \frac{b e^{2}{G_{6, 6}^{2, 6}\left (\begin{matrix} 1, \frac{5}{4}, \frac{3}{2}, \frac{7}{4}, 2, 1 & \\\frac{5}{4}, \frac{7}{4} & 1, \frac{3}{2}, \frac{3}{2}, 0 \end{matrix} \middle |{\frac{d^{2} e^{- 2 i \pi }}{e^{2} x^{2}}} \right )}}{4 \pi ^{\frac{3}{2}} d^{3}} + \frac{i c{G_{6, 6}^{5, 3}\left (\begin{matrix} \frac{3}{4}, \frac{5}{4}, 1 & 1, 1, \frac{3}{2} \\\frac{1}{2}, \frac{3}{4}, 1, \frac{5}{4}, \frac{3}{2} & 0 \end{matrix} \middle |{\frac{d^{2}}{e^{2} x^{2}}} \right )}}{4 \pi ^{\frac{3}{2}} d} - \frac{c{G_{6, 6}^{2, 6}\left (\begin{matrix} 0, \frac{1}{4}, \frac{1}{2}, \frac{3}{4}, 1, 1 & \\\frac{1}{4}, \frac{3}{4} & 0, \frac{1}{2}, \frac{1}{2}, 0 \end{matrix} \middle |{\frac{d^{2} e^{- 2 i \pi }}{e^{2} x^{2}}} \right )}}{4 \pi ^{\frac{3}{2}} d} \end{align*}

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

[In]

integrate((c*x**4+b*x**2+a)/x**5/(-e*x+d)**(1/2)/(e*x+d)**(1/2),x)

[Out]

I*a*e**4*meijerg(((11/4, 13/4, 1), (3, 3, 7/2)), ((5/2, 11/4, 3, 13/4, 7/2), (0,)), d**2/(e**2*x**2))/(4*pi**(
3/2)*d**5) - a*e**4*meijerg(((2, 9/4, 5/2, 11/4, 3, 1), ()), ((9/4, 11/4), (2, 5/2, 5/2, 0)), d**2*exp_polar(-
2*I*pi)/(e**2*x**2))/(4*pi**(3/2)*d**5) + I*b*e**2*meijerg(((7/4, 9/4, 1), (2, 2, 5/2)), ((3/2, 7/4, 2, 9/4, 5
/2), (0,)), d**2/(e**2*x**2))/(4*pi**(3/2)*d**3) - b*e**2*meijerg(((1, 5/4, 3/2, 7/4, 2, 1), ()), ((5/4, 7/4),
(1, 3/2, 3/2, 0)), d**2*exp_polar(-2*I*pi)/(e**2*x**2))/(4*pi**(3/2)*d**3) + I*c*meijerg(((3/4, 5/4, 1), (1,
1, 3/2)), ((1/2, 3/4, 1, 5/4, 3/2), (0,)), d**2/(e**2*x**2))/(4*pi**(3/2)*d) - c*meijerg(((0, 1/4, 1/2, 3/4, 1
, 1), ()), ((1/4, 3/4), (0, 1/2, 1/2, 0)), d**2*exp_polar(-2*I*pi)/(e**2*x**2))/(4*pi**(3/2)*d)

________________________________________________________________________________________

Giac [F]  time = 0., size = 0, normalized size = 0. \begin{align*} \mathit{sage}_{0} x \end{align*}

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

[In]

integrate((c*x^4+b*x^2+a)/x^5/(-e*x+d)^(1/2)/(e*x+d)^(1/2),x, algorithm="giac")

[Out]

sage0*x