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

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

[Out]

-((c*Sqrt[d - e*x]*Sqrt[d + e*x])/e^2) - (a*Sqrt[d - e*x]*Sqrt[d + e*x])/(2*d^2*x^2) - ((2*b*d^2 + a*e^2)*ArcT
anh[(Sqrt[d - e*x]*Sqrt[d + e*x])/d])/(2*d^3)

________________________________________________________________________________________

Rubi [A]  time = 0.251905, antiderivative size = 155, normalized size of antiderivative = 1.57, 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, 388, 208} $-\frac{\sqrt{d^2-e^2 x^2} \left (a e^2+2 b d^2\right ) \tanh ^{-1}\left (\frac{\sqrt{d^2-e^2 x^2}}{d}\right )}{2 d^3 \sqrt{d-e x} \sqrt{d+e x}}-\frac{a \left (d^2-e^2 x^2\right )}{2 d^2 x^2 \sqrt{d-e x} \sqrt{d+e x}}-\frac{c \left (d^2-e^2 x^2\right )}{e^2 \sqrt{d-e x} \sqrt{d+e x}}$

Antiderivative was successfully veriﬁed.

[In]

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

[Out]

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

Int[((a_) + (b_.)*(x_)^(n_))^(p_)*((c_) + (d_.)*(x_)^(n_)), x_Symbol] :> Simp[(d*x*(a + b*x^n)^(p + 1))/(b*(n*
(p + 1) + 1)), x] - Dist[(a*d - b*c*(n*(p + 1) + 1))/(b*(n*(p + 1) + 1)), Int[(a + b*x^n)^p, x], x] /; FreeQ[{
a, b, c, d, n}, x] && NeQ[b*c - a*d, 0] && NeQ[n*(p + 1) + 1, 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^3 \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^3 \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^2 \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 )^2} \, 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 )}{2 d^2 x^2 \sqrt{d-e x} \sqrt{d+e x}}+\frac{\sqrt{d^2-e^2 x^2} \operatorname{Subst}\left (\int \frac{-a-\frac{2 \left (c d^4+b d^2 e^2\right )}{e^4}+\frac{2 c d^2 x^2}{e^4}}{\frac{d^2}{e^2}-\frac{x^2}{e^2}} \, dx,x,\sqrt{d^2-e^2 x^2}\right )}{2 d^2 \sqrt{d-e x} \sqrt{d+e x}}\\ &=-\frac{c \left (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 )}{2 d^2 x^2 \sqrt{d-e x} \sqrt{d+e x}}+\frac{\left (e^2 \left (\frac{2 c d^4}{e^6}+\frac{-a-\frac{2 \left (c d^4+b d^2 e^2\right )}{e^4}}{e^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 )}{2 d^2 \sqrt{d-e x} \sqrt{d+e x}}\\ &=-\frac{c \left (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 )}{2 d^2 x^2 \sqrt{d-e x} \sqrt{d+e x}}-\frac{\left (2 b d^2+a e^2\right ) \sqrt{d^2-e^2 x^2} \tanh ^{-1}\left (\frac{\sqrt{d^2-e^2 x^2}}{d}\right )}{2 d^3 \sqrt{d-e x} \sqrt{d+e x}}\\ \end{align*}

Mathematica [B]  time = 0.216946, size = 233, normalized size = 2.35 $\frac{-e^2 x^2 \sqrt{d^2-e^2 x^2} \left (a e^2+2 b d^2\right ) \tanh ^{-1}\left (\frac{\sqrt{d^2-e^2 x^2}}{d}\right )-a d^3 e^2+a d e^4 x^2+2 c d^3 e^2 x^4-4 c d^{9/2} x^2 \sqrt{d-e x} \sqrt{\frac{e x}{d}+1} \sin ^{-1}\left (\frac{\sqrt{d-e x}}{\sqrt{2} \sqrt{d}}\right )+4 c d^4 x^2 \sqrt{d-e x} \sqrt{d+e x} \tan ^{-1}\left (\frac{\sqrt{d-e x}}{\sqrt{d+e x}}\right )-2 c d^5 x^2}{2 d^3 e^2 x^2 \sqrt{d-e x} \sqrt{d+e x}}$

Antiderivative was successfully veriﬁed.

[In]

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

[Out]

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

________________________________________________________________________________________

Maple [C]  time = 0.025, size = 163, normalized size = 1.7 \begin{align*} -{\frac{{\it csgn} \left ( d \right ) }{2\,{d}^{3}{e}^{2}{x}^{2}}\sqrt{-ex+d}\sqrt{ex+d} \left ( \ln \left ( 2\,{\frac{d \left ( \sqrt{-{e}^{2}{x}^{2}+{d}^{2}}{\it csgn} \left ( d \right ) +d \right ) }{x}} \right ){x}^{2}a{e}^{4}+2\,\ln \left ( 2\,{\frac{d \left ( \sqrt{-{e}^{2}{x}^{2}+{d}^{2}}{\it csgn} \left ( d \right ) +d \right ) }{x}} \right ){x}^{2}b{d}^{2}{e}^{2}+2\,{\it csgn} \left ( d \right ){x}^{2}c{d}^{3}\sqrt{-{e}^{2}{x}^{2}+{d}^{2}}+{\it csgn} \left ( d \right ) ad{e}^{2}\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^3/(-e*x+d)^(1/2)/(e*x+d)^(1/2),x)

[Out]

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

[Out]

Exception raised: ValueError

________________________________________________________________________________________

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

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

[In]

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

[Out]

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

________________________________________________________________________________________

Sympy [C]  time = 64.1964, size = 270, normalized size = 2.73 \begin{align*} \frac{i a 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{a 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 b{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{b{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} - \frac{i c d{G_{6, 6}^{6, 2}\left (\begin{matrix} - \frac{1}{4}, \frac{1}{4} & 0, 0, \frac{1}{2}, 1 \\- \frac{1}{2}, - \frac{1}{4}, 0, \frac{1}{4}, \frac{1}{2}, 0 & \end{matrix} \middle |{\frac{d^{2}}{e^{2} x^{2}}} \right )}}{4 \pi ^{\frac{3}{2}} e^{2}} - \frac{c d{G_{6, 6}^{2, 6}\left (\begin{matrix} -1, - \frac{3}{4}, - \frac{1}{2}, - \frac{1}{4}, 0, 1 & \\- \frac{3}{4}, - \frac{1}{4} & -1, - \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}} e^{2}} \end{align*}

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

[In]

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

[Out]

I*a*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) - a*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*b*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) - b*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) - I*c*d*meijerg(((-1/4, 1/4), (0, 0, 1/2, 1)), ((-1/2, -
1/4, 0, 1/4, 1/2, 0), ()), d**2/(e**2*x**2))/(4*pi**(3/2)*e**2) - c*d*meijerg(((-1, -3/4, -1/2, -1/4, 0, 1), (
)), ((-3/4, -1/4), (-1, -1/2, -1/2, 0)), d**2*exp_polar(-2*I*pi)/(e**2*x**2))/(4*pi**(3/2)*e**2)

________________________________________________________________________________________

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^3/(-e*x+d)^(1/2)/(e*x+d)^(1/2),x, algorithm="giac")

[Out]

sage0*x