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

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

[Out]

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

________________________________________________________________________________________

Rubi [A]  time = 0.0911319, antiderivative size = 179, normalized size of antiderivative = 1.4, number of steps used = 5, number of rules used = 5, integrand size = 32, $$\frac{\text{number of rules}}{\text{integrand size}}$$ = 0.156, Rules used = {520, 1159, 388, 217, 203} $\frac{\sqrt{d^2-e^2 x^2} \tan ^{-1}\left (\frac{e x}{\sqrt{d^2-e^2 x^2}}\right ) \left (8 a e^4+4 b d^2 e^2+3 c d^4\right )}{8 e^5 \sqrt{d-e x} \sqrt{d+e x}}-\frac{x \left (d^2-e^2 x^2\right ) \left (4 b e^2+3 c d^2\right )}{8 e^4 \sqrt{d-e x} \sqrt{d+e x}}-\frac{c x^3 \left (d^2-e^2 x^2\right )}{4 e^2 \sqrt{d-e x} \sqrt{d+e x}}$

Antiderivative was successfully veriﬁed.

[In]

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

[Out]

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

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

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

Antiderivative was successfully veriﬁed.

[In]

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

[Out]

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

________________________________________________________________________________________

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

[Out]

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

________________________________________________________________________________________

Maxima [A]  time = 1.50604, size = 201, normalized size = 1.57 \begin{align*} -\frac{\sqrt{-e^{2} x^{2} + d^{2}} c x^{3}}{4 \, e^{2}} + \frac{a \arcsin \left (\frac{e^{2} x}{\sqrt{d^{2} e^{2}}}\right )}{\sqrt{e^{2}}} + \frac{3 \, c d^{4} \arcsin \left (\frac{e^{2} x}{\sqrt{d^{2} e^{2}}}\right )}{8 \, \sqrt{e^{2}} e^{4}} + \frac{b d^{2} \arcsin \left (\frac{e^{2} x}{\sqrt{d^{2} e^{2}}}\right )}{2 \, \sqrt{e^{2}} e^{2}} - \frac{3 \, \sqrt{-e^{2} x^{2} + d^{2}} c d^{2} x}{8 \, e^{4}} - \frac{\sqrt{-e^{2} x^{2} + d^{2}} b x}{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)/(-e*x+d)^(1/2)/(e*x+d)^(1/2),x, algorithm="maxima")

[Out]

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

________________________________________________________________________________________

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

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

[In]

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

[Out]

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

________________________________________________________________________________________

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

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

[In]

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

[Out]

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

________________________________________________________________________________________

Giac [A]  time = 1.13785, size = 170, normalized size = 1.33 \begin{align*} \frac{1}{114688} \,{\left ({\left (5 \, c d^{3} e^{16} + 4 \, b d e^{18} -{\left (9 \, c d^{2} e^{16} + 2 \,{\left ({\left (x e + d\right )} c e^{16} - 3 \, c d e^{16}\right )}{\left (x e + d\right )} + 4 \, b e^{18}\right )}{\left (x e + d\right )}\right )} \sqrt{x e + d} \sqrt{-x e + d} + 2 \,{\left (3 \, c d^{4} e^{16} + 4 \, b d^{2} e^{18} + 8 \, a e^{20}\right )} \arcsin \left (\frac{\sqrt{2} \sqrt{x e + d}}{2 \, \sqrt{d}}\right )\right )} e^{\left (-1\right )} \end{align*}

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

[In]

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

[Out]

1/114688*((5*c*d^3*e^16 + 4*b*d*e^18 - (9*c*d^2*e^16 + 2*((x*e + d)*c*e^16 - 3*c*d*e^16)*(x*e + d) + 4*b*e^18)
*(x*e + d))*sqrt(x*e + d)*sqrt(-x*e + d) + 2*(3*c*d^4*e^16 + 4*b*d^2*e^18 + 8*a*e^20)*arcsin(1/2*sqrt(2)*sqrt(
x*e + d)/sqrt(d)))*e^(-1)