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

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

[Out]

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

________________________________________________________________________________________

Rubi [A]  time = 0.121831, antiderivative size = 155, normalized size of antiderivative = 1.52, number of steps used = 5, number of rules used = 5, integrand size = 35, $$\frac{\text{number of rules}}{\text{integrand size}}$$ = 0.143, Rules used = {520, 1265, 388, 217, 203} $-\frac{a \left (d^2-e^2 x^2\right )}{d^2 x \sqrt{d-e x} \sqrt{d+e x}}+\frac{\sqrt{d^2-e^2 x^2} \left (2 b e^2+c d^2\right ) \tan ^{-1}\left (\frac{e x}{\sqrt{d^2-e^2 x^2}}\right )}{2 e^3 \sqrt{d-e x} \sqrt{d+e x}}-\frac{c x \left (d^2-e^2 x^2\right )}{2 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^2*Sqrt[d - e*x]*Sqrt[d + e*x]),x]

[Out]

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

Int[((f_.)*(x_))^(m_)*((d_) + (e_.)*(x_)^2)^(q_.)*((a_) + (b_.)*(x_)^2 + (c_.)*(x_)^4)^(p_.), x_Symbol] :> Wit
h[{Qx = PolynomialQuotient[(a + b*x^2 + c*x^4)^p, f*x, x], R = PolynomialRemainder[(a + b*x^2 + c*x^4)^p, f*x,
x]}, Simp[(R*(f*x)^(m + 1)*(d + e*x^2)^(q + 1))/(d*f*(m + 1)), x] + Dist[1/(d*f^2*(m + 1)), Int[(f*x)^(m + 2)
*(d + e*x^2)^q*ExpandToSum[(d*f*(m + 1)*Qx)/x - e*R*(m + 2*q + 3), x], x], x]] /; FreeQ[{a, b, c, d, e, f, q},
x] && NeQ[b^2 - 4*a*c, 0] && IGtQ[p, 0] && LtQ[m, -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 217

Int[1/Sqrt[(a_) + (b_.)*(x_)^2], x_Symbol] :> Subst[Int[1/(1 - b*x^2), x], x, x/Sqrt[a + b*x^2]] /; FreeQ[{a,
b}, x] &&  !GtQ[a, 0]

Rule 203

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

Rubi steps

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

Mathematica [A]  time = 0.564506, size = 135, normalized size = 1.32 $-\frac{\frac{e \sqrt{d-e x} \sqrt{d+e x} \left (2 a e^2+c d^2 x^2\right )}{d^2 x}+4 \left (b e^2+c d^2\right ) \tan ^{-1}\left (\frac{\sqrt{d-e x}}{\sqrt{d+e x}}\right )-\frac{2 c d^{5/2} \sqrt{\frac{e x}{d}+1} \sin ^{-1}\left (\frac{\sqrt{d-e x}}{\sqrt{2} \sqrt{d}}\right )}{\sqrt{d+e x}}}{2 e^3}$

Antiderivative was successfully veriﬁed.

[In]

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

[Out]

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

________________________________________________________________________________________

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

________________________________________________________________________________________

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

[Out]

Exception raised: ValueError

________________________________________________________________________________________

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

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

[In]

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

[Out]

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

________________________________________________________________________________________

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

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

[In]

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

[Out]

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

________________________________________________________________________________________

Giac [F(-2)]  time = 0., size = 0, normalized size = 0. \begin{align*} \text{Exception raised: NotImplementedError} \end{align*}

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

[In]

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

[Out]

Exception raised: NotImplementedError