\(\int \frac {(1+b x^2) (A+B x^2)}{\sqrt {1-b^2 x^4}} \, dx\) [1]

Optimal result
Mathematica [C] (verified)
Rubi [A] (verified)
Maple [C] (verified)
Fricas [B] (verification not implemented)
Sympy [B] (verification not implemented)
Maxima [F]
Giac [F]
Mupad [F(-1)]
Reduce [F]

Optimal result

Integrand size = 29, antiderivative size = 65 \[ \int \frac {\left (1+b x^2\right ) \left (A+B x^2\right )}{\sqrt {1-b^2 x^4}} \, dx=-\frac {B x \sqrt {1-b^2 x^4}}{3 b}+\frac {(A b+B) E\left (\left .\arcsin \left (\sqrt {b} x\right )\right |-1\right )}{b^{3/2}}-\frac {2 B \operatorname {EllipticF}\left (\arcsin \left (\sqrt {b} x\right ),-1\right )}{3 b^{3/2}} \] Output:

-1/3*B*x*(-b^2*x^4+1)^(1/2)/b+(A*b+B)*EllipticE(b^(1/2)*x,I)/b^(3/2)-2/3*B 
*EllipticF(b^(1/2)*x,I)/b^(3/2)
 

Mathematica [C] (verified)

Result contains higher order function than in optimal. Order 5 vs. order 4 in optimal.

Time = 10.07 (sec) , antiderivative size = 77, normalized size of antiderivative = 1.18 \[ \int \frac {\left (1+b x^2\right ) \left (A+B x^2\right )}{\sqrt {1-b^2 x^4}} \, dx=\frac {x \left (-B \sqrt {1-b^2 x^4}+(3 A b+B) \operatorname {Hypergeometric2F1}\left (\frac {1}{4},\frac {1}{2},\frac {5}{4},b^2 x^4\right )+b (A b+B) x^2 \operatorname {Hypergeometric2F1}\left (\frac {1}{2},\frac {3}{4},\frac {7}{4},b^2 x^4\right )\right )}{3 b} \] Input:

Integrate[((1 + b*x^2)*(A + B*x^2))/Sqrt[1 - b^2*x^4],x]
 

Output:

(x*(-(B*Sqrt[1 - b^2*x^4]) + (3*A*b + B)*Hypergeometric2F1[1/4, 1/2, 5/4, 
b^2*x^4] + b*(A*b + B)*x^2*Hypergeometric2F1[1/2, 3/4, 7/4, b^2*x^4]))/(3* 
b)
 

Rubi [A] (verified)

Time = 0.26 (sec) , antiderivative size = 81, normalized size of antiderivative = 1.25, number of steps used = 7, number of rules used = 7, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.241, Rules used = {1388, 403, 25, 399, 284, 327, 762}

Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.

\(\displaystyle \int \frac {\left (b x^2+1\right ) \left (A+B x^2\right )}{\sqrt {1-b^2 x^4}} \, dx\)

\(\Big \downarrow \) 1388

\(\displaystyle \int \frac {\sqrt {b x^2+1} \left (A+B x^2\right )}{\sqrt {1-b x^2}}dx\)

\(\Big \downarrow \) 403

\(\displaystyle -\frac {\int -\frac {3 b (A b+B) x^2+3 A b+B}{\sqrt {1-b x^2} \sqrt {b x^2+1}}dx}{3 b}-\frac {B x \sqrt {1-b x^2} \sqrt {b x^2+1}}{3 b}\)

\(\Big \downarrow \) 25

\(\displaystyle \frac {\int \frac {3 b (A b+B) x^2+3 A b+B}{\sqrt {1-b x^2} \sqrt {b x^2+1}}dx}{3 b}-\frac {B x \sqrt {1-b x^2} \sqrt {b x^2+1}}{3 b}\)

\(\Big \downarrow \) 399

\(\displaystyle \frac {3 (A b+B) \int \frac {\sqrt {b x^2+1}}{\sqrt {1-b x^2}}dx-2 B \int \frac {1}{\sqrt {1-b x^2} \sqrt {b x^2+1}}dx}{3 b}-\frac {B x \sqrt {1-b x^2} \sqrt {b x^2+1}}{3 b}\)

\(\Big \downarrow \) 284

\(\displaystyle \frac {3 (A b+B) \int \frac {\sqrt {b x^2+1}}{\sqrt {1-b x^2}}dx-2 B \int \frac {1}{\sqrt {1-b^2 x^4}}dx}{3 b}-\frac {B x \sqrt {1-b x^2} \sqrt {b x^2+1}}{3 b}\)

\(\Big \downarrow \) 327

\(\displaystyle \frac {\frac {3 (A b+B) E\left (\left .\arcsin \left (\sqrt {b} x\right )\right |-1\right )}{\sqrt {b}}-2 B \int \frac {1}{\sqrt {1-b^2 x^4}}dx}{3 b}-\frac {B x \sqrt {1-b x^2} \sqrt {b x^2+1}}{3 b}\)

\(\Big \downarrow \) 762

\(\displaystyle \frac {\frac {3 (A b+B) E\left (\left .\arcsin \left (\sqrt {b} x\right )\right |-1\right )}{\sqrt {b}}-\frac {2 B \operatorname {EllipticF}\left (\arcsin \left (\sqrt {b} x\right ),-1\right )}{\sqrt {b}}}{3 b}-\frac {B x \sqrt {1-b x^2} \sqrt {b x^2+1}}{3 b}\)

Input:

Int[((1 + b*x^2)*(A + B*x^2))/Sqrt[1 - b^2*x^4],x]
 

Output:

-1/3*(B*x*Sqrt[1 - b*x^2]*Sqrt[1 + b*x^2])/b + ((3*(A*b + B)*EllipticE[Arc 
Sin[Sqrt[b]*x], -1])/Sqrt[b] - (2*B*EllipticF[ArcSin[Sqrt[b]*x], -1])/Sqrt 
[b])/(3*b)
 

Defintions of rubi rules used

rule 25
Int[-(Fx_), x_Symbol] :> Simp[Identity[-1]   Int[Fx, x], x]
 

rule 284
Int[((a_) + (b_.)*(x_)^2)^(p_.)*((c_) + (d_.)*(x_)^2)^(p_.), x_Symbol] :> I 
nt[(a*c + b*d*x^4)^p, x] /; FreeQ[{a, b, c, d, p}, x] && EqQ[b*c + a*d, 0] 
&& (IntegerQ[p] || (GtQ[a, 0] && GtQ[c, 0]))
 

rule 327
Int[Sqrt[(a_) + (b_.)*(x_)^2]/Sqrt[(c_) + (d_.)*(x_)^2], x_Symbol] :> Simp[ 
(Sqrt[a]/(Sqrt[c]*Rt[-d/c, 2]))*EllipticE[ArcSin[Rt[-d/c, 2]*x], b*(c/(a*d) 
)], x] /; FreeQ[{a, b, c, d}, x] && NegQ[d/c] && GtQ[c, 0] && GtQ[a, 0]
 

rule 399
Int[((e_) + (f_.)*(x_)^2)/(Sqrt[(a_) + (b_.)*(x_)^2]*Sqrt[(c_) + (d_.)*(x_) 
^2]), x_Symbol] :> Simp[f/b   Int[Sqrt[a + b*x^2]/Sqrt[c + d*x^2], x], x] + 
 Simp[(b*e - a*f)/b   Int[1/(Sqrt[a + b*x^2]*Sqrt[c + d*x^2]), x], x] /; Fr 
eeQ[{a, b, c, d, e, f}, x] &&  !((PosQ[b/a] && PosQ[d/c]) || (NegQ[b/a] && 
(PosQ[d/c] || (GtQ[a, 0] && ( !GtQ[c, 0] || SimplerSqrtQ[-b/a, -d/c])))))
 

rule 403
Int[((a_) + (b_.)*(x_)^2)^(p_.)*((c_) + (d_.)*(x_)^2)^(q_.)*((e_) + (f_.)*( 
x_)^2), x_Symbol] :> Simp[f*x*(a + b*x^2)^(p + 1)*((c + d*x^2)^q/(b*(2*(p + 
 q + 1) + 1))), x] + Simp[1/(b*(2*(p + q + 1) + 1))   Int[(a + b*x^2)^p*(c 
+ d*x^2)^(q - 1)*Simp[c*(b*e - a*f + b*e*2*(p + q + 1)) + (d*(b*e - a*f) + 
f*2*q*(b*c - a*d) + b*d*e*2*(p + q + 1))*x^2, x], x], x] /; FreeQ[{a, b, c, 
 d, e, f, p}, x] && GtQ[q, 0] && NeQ[2*(p + q + 1) + 1, 0]
 

rule 762
Int[1/Sqrt[(a_) + (b_.)*(x_)^4], x_Symbol] :> Simp[(1/(Sqrt[a]*Rt[-b/a, 4]) 
)*EllipticF[ArcSin[Rt[-b/a, 4]*x], -1], x] /; FreeQ[{a, b}, x] && NegQ[b/a] 
 && GtQ[a, 0]
 

rule 1388
Int[(u_.)*((a_) + (c_.)*(x_)^(n2_.))^(p_.)*((d_) + (e_.)*(x_)^(n_))^(q_.), 
x_Symbol] :> Int[u*(d + e*x^n)^(p + q)*(a/d + (c/e)*x^n)^p, x] /; FreeQ[{a, 
 c, d, e, n, p, q}, x] && EqQ[n2, 2*n] && EqQ[c*d^2 + a*e^2, 0] && (Integer 
Q[p] || (GtQ[a, 0] && GtQ[d, 0]))
 
Maple [C] (verified)

Result contains higher order function than in optimal. Order 5 vs. order 4.

Time = 2.87 (sec) , antiderivative size = 77, normalized size of antiderivative = 1.18

method result size
meijerg \(\frac {b B \,x^{5} \operatorname {hypergeom}\left (\left [\frac {1}{2}, \frac {5}{4}\right ], \left [\frac {9}{4}\right ], b^{2} x^{4}\right )}{5}+\frac {b A \,x^{3} \operatorname {hypergeom}\left (\left [\frac {1}{2}, \frac {3}{4}\right ], \left [\frac {7}{4}\right ], b^{2} x^{4}\right )}{3}+\frac {B \,x^{3} \operatorname {hypergeom}\left (\left [\frac {1}{2}, \frac {3}{4}\right ], \left [\frac {7}{4}\right ], b^{2} x^{4}\right )}{3}+A x \operatorname {hypergeom}\left (\left [\frac {1}{4}, \frac {1}{2}\right ], \left [\frac {5}{4}\right ], b^{2} x^{4}\right )\) \(77\)
elliptic \(-\frac {B x \sqrt {-b^{2} x^{4}+1}}{3 b}+\frac {\left (A +\frac {B}{3 b}\right ) \sqrt {-b \,x^{2}+1}\, \sqrt {b \,x^{2}+1}\, \operatorname {EllipticF}\left (\sqrt {b}\, x , i\right )}{\sqrt {b}\, \sqrt {-b^{2} x^{4}+1}}-\frac {\left (b A +B \right ) \sqrt {-b \,x^{2}+1}\, \sqrt {b \,x^{2}+1}\, \left (\operatorname {EllipticF}\left (\sqrt {b}\, x , i\right )-\operatorname {EllipticE}\left (\sqrt {b}\, x , i\right )\right )}{b^{\frac {3}{2}} \sqrt {-b^{2} x^{4}+1}}\) \(132\)
default \(\frac {A \sqrt {-b \,x^{2}+1}\, \sqrt {b \,x^{2}+1}\, \operatorname {EllipticF}\left (\sqrt {b}\, x , i\right )}{\sqrt {b}\, \sqrt {-b^{2} x^{4}+1}}-\frac {\left (b A +B \right ) \sqrt {-b \,x^{2}+1}\, \sqrt {b \,x^{2}+1}\, \left (\operatorname {EllipticF}\left (\sqrt {b}\, x , i\right )-\operatorname {EllipticE}\left (\sqrt {b}\, x , i\right )\right )}{b^{\frac {3}{2}} \sqrt {-b^{2} x^{4}+1}}+B b \left (-\frac {x \sqrt {-b^{2} x^{4}+1}}{3 b^{2}}+\frac {\sqrt {-b \,x^{2}+1}\, \sqrt {b \,x^{2}+1}\, \operatorname {EllipticF}\left (\sqrt {b}\, x , i\right )}{3 b^{\frac {5}{2}} \sqrt {-b^{2} x^{4}+1}}\right )\) \(172\)
risch \(\frac {B x \left (b^{2} x^{4}-1\right )}{3 b \sqrt {-b^{2} x^{4}+1}}+\frac {\frac {B \sqrt {-b \,x^{2}+1}\, \sqrt {b \,x^{2}+1}\, \operatorname {EllipticF}\left (\sqrt {b}\, x , i\right )}{\sqrt {b}\, \sqrt {-b^{2} x^{4}+1}}-\frac {3 \left (b A +B \right ) \sqrt {-b \,x^{2}+1}\, \sqrt {b \,x^{2}+1}\, \left (\operatorname {EllipticF}\left (\sqrt {b}\, x , i\right )-\operatorname {EllipticE}\left (\sqrt {b}\, x , i\right )\right )}{\sqrt {b}\, \sqrt {-b^{2} x^{4}+1}}+\frac {3 \sqrt {b}\, A \sqrt {-b \,x^{2}+1}\, \sqrt {b \,x^{2}+1}\, \operatorname {EllipticF}\left (\sqrt {b}\, x , i\right )}{\sqrt {-b^{2} x^{4}+1}}}{3 b}\) \(185\)

Input:

int((b*x^2+1)*(B*x^2+A)/(-b^2*x^4+1)^(1/2),x,method=_RETURNVERBOSE)
 

Output:

1/5*b*B*x^5*hypergeom([1/2,5/4],[9/4],b^2*x^4)+1/3*b*A*x^3*hypergeom([1/2, 
3/4],[7/4],b^2*x^4)+1/3*B*x^3*hypergeom([1/2,3/4],[7/4],b^2*x^4)+A*x*hyper 
geom([1/4,1/2],[5/4],b^2*x^4)
 

Fricas [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 109 vs. \(2 (49) = 98\).

Time = 0.08 (sec) , antiderivative size = 109, normalized size of antiderivative = 1.68 \[ \int \frac {\left (1+b x^2\right ) \left (A+B x^2\right )}{\sqrt {1-b^2 x^4}} \, dx=-\frac {\frac {3 \, {\left (A b + B\right )} \sqrt {-b^{2}} x E(\arcsin \left (\frac {1}{\sqrt {b} x}\right )\,|\,-1)}{\sqrt {b}} - \frac {{\left (3 \, A b^{2} + {\left (3 \, A + B\right )} b + 3 \, B\right )} \sqrt {-b^{2}} x F(\arcsin \left (\frac {1}{\sqrt {b} x}\right )\,|\,-1)}{\sqrt {b}} + \sqrt {-b^{2} x^{4} + 1} {\left (B b^{2} x^{2} + 3 \, A b^{2} + 3 \, B b\right )}}{3 \, b^{3} x} \] Input:

integrate((b*x^2+1)*(B*x^2+A)/(-b^2*x^4+1)^(1/2),x, algorithm="fricas")
 

Output:

-1/3*(3*(A*b + B)*sqrt(-b^2)*x*elliptic_e(arcsin(1/(sqrt(b)*x)), -1)/sqrt( 
b) - (3*A*b^2 + (3*A + B)*b + 3*B)*sqrt(-b^2)*x*elliptic_f(arcsin(1/(sqrt( 
b)*x)), -1)/sqrt(b) + sqrt(-b^2*x^4 + 1)*(B*b^2*x^2 + 3*A*b^2 + 3*B*b))/(b 
^3*x)
 

Sympy [B] (verification not implemented)

Both result and optimal contain complex but leaf count of result is larger than twice the leaf count of optimal. 150 vs. \(2 (54) = 108\).

Time = 1.97 (sec) , antiderivative size = 150, normalized size of antiderivative = 2.31 \[ \int \frac {\left (1+b x^2\right ) \left (A+B x^2\right )}{\sqrt {1-b^2 x^4}} \, dx=\frac {A b x^{3} \Gamma \left (\frac {3}{4}\right ) {{}_{2}F_{1}\left (\begin {matrix} \frac {1}{2}, \frac {3}{4} \\ \frac {7}{4} \end {matrix}\middle | {b^{2} x^{4} e^{2 i \pi }} \right )}}{4 \Gamma \left (\frac {7}{4}\right )} + \frac {A x \Gamma \left (\frac {1}{4}\right ) {{}_{2}F_{1}\left (\begin {matrix} \frac {1}{4}, \frac {1}{2} \\ \frac {5}{4} \end {matrix}\middle | {b^{2} x^{4} e^{2 i \pi }} \right )}}{4 \Gamma \left (\frac {5}{4}\right )} + \frac {B b x^{5} \Gamma \left (\frac {5}{4}\right ) {{}_{2}F_{1}\left (\begin {matrix} \frac {1}{2}, \frac {5}{4} \\ \frac {9}{4} \end {matrix}\middle | {b^{2} x^{4} e^{2 i \pi }} \right )}}{4 \Gamma \left (\frac {9}{4}\right )} + \frac {B x^{3} \Gamma \left (\frac {3}{4}\right ) {{}_{2}F_{1}\left (\begin {matrix} \frac {1}{2}, \frac {3}{4} \\ \frac {7}{4} \end {matrix}\middle | {b^{2} x^{4} e^{2 i \pi }} \right )}}{4 \Gamma \left (\frac {7}{4}\right )} \] Input:

integrate((b*x**2+1)*(B*x**2+A)/(-b**2*x**4+1)**(1/2),x)
 

Output:

A*b*x**3*gamma(3/4)*hyper((1/2, 3/4), (7/4,), b**2*x**4*exp_polar(2*I*pi)) 
/(4*gamma(7/4)) + A*x*gamma(1/4)*hyper((1/4, 1/2), (5/4,), b**2*x**4*exp_p 
olar(2*I*pi))/(4*gamma(5/4)) + B*b*x**5*gamma(5/4)*hyper((1/2, 5/4), (9/4, 
), b**2*x**4*exp_polar(2*I*pi))/(4*gamma(9/4)) + B*x**3*gamma(3/4)*hyper(( 
1/2, 3/4), (7/4,), b**2*x**4*exp_polar(2*I*pi))/(4*gamma(7/4))
 

Maxima [F]

\[ \int \frac {\left (1+b x^2\right ) \left (A+B x^2\right )}{\sqrt {1-b^2 x^4}} \, dx=\int { \frac {{\left (B x^{2} + A\right )} {\left (b x^{2} + 1\right )}}{\sqrt {-b^{2} x^{4} + 1}} \,d x } \] Input:

integrate((b*x^2+1)*(B*x^2+A)/(-b^2*x^4+1)^(1/2),x, algorithm="maxima")
 

Output:

integrate((B*x^2 + A)*(b*x^2 + 1)/sqrt(-b^2*x^4 + 1), x)
 

Giac [F]

\[ \int \frac {\left (1+b x^2\right ) \left (A+B x^2\right )}{\sqrt {1-b^2 x^4}} \, dx=\int { \frac {{\left (B x^{2} + A\right )} {\left (b x^{2} + 1\right )}}{\sqrt {-b^{2} x^{4} + 1}} \,d x } \] Input:

integrate((b*x^2+1)*(B*x^2+A)/(-b^2*x^4+1)^(1/2),x, algorithm="giac")
 

Output:

integrate((B*x^2 + A)*(b*x^2 + 1)/sqrt(-b^2*x^4 + 1), x)
 

Mupad [F(-1)]

Timed out. \[ \int \frac {\left (1+b x^2\right ) \left (A+B x^2\right )}{\sqrt {1-b^2 x^4}} \, dx=\int \frac {\left (B\,x^2+A\right )\,\left (b\,x^2+1\right )}{\sqrt {1-b^2\,x^4}} \,d x \] Input:

int(((A + B*x^2)*(b*x^2 + 1))/(1 - b^2*x^4)^(1/2),x)
 

Output:

int(((A + B*x^2)*(b*x^2 + 1))/(1 - b^2*x^4)^(1/2), x)
 

Reduce [F]

\[ \int \frac {\left (1+b x^2\right ) \left (A+B x^2\right )}{\sqrt {1-b^2 x^4}} \, dx=-\left (\int \frac {\sqrt {-b^{2} x^{4}+1}}{b \,x^{2}-1}d x \right ) a -\left (\int \frac {\sqrt {-b^{2} x^{4}+1}\, x^{2}}{b \,x^{2}-1}d x \right ) b \] Input:

int((b*x^2+1)*(B*x^2+A)/(-b^2*x^4+1)^(1/2),x)
 

Output:

 - (int(sqrt( - b**2*x**4 + 1)/(b*x**2 - 1),x)*a + int((sqrt( - b**2*x**4 
+ 1)*x**2)/(b*x**2 - 1),x)*b)