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

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

[Out]

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

________________________________________________________________________________________

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

Antiderivative was successfully veriﬁed.

[In]

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

[Out]

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

Int[((d_) + (e_.)*(x_)^2)^(q_.)*((a_) + (b_.)*(x_)^2 + (c_.)*(x_)^4)^(p_.), x_Symbol] :> Int[ExpandIntegrand[(
d + e*x^2)^q*(a + b*x^2 + c*x^4)^p, x], x] /; FreeQ[{a, b, c, d, e}, x] && NeQ[b^2 - 4*a*c, 0] && NeQ[c*d^2 -
b*d*e + a*e^2, 0] && IGtQ[p, 0] && IGtQ[q, -2]

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

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

Antiderivative was successfully veriﬁed.

[In]

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

[Out]

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

________________________________________________________________________________________

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

[Out]

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

[Out]

Exception raised: ValueError

________________________________________________________________________________________

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

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

[In]

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

[Out]

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

________________________________________________________________________________________

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

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

[In]

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

[Out]

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

________________________________________________________________________________________

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

[Out]

sage0*x