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

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

Optimal result

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

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

Mathematica [A] (verified)

Time = 10.23 (sec) , antiderivative size = 46, normalized size of antiderivative = 0.96 \[ \int \frac {A+B x^2}{\left (1+x^2\right ) \sqrt {1-x^4}} \, dx=-\frac {(A-B) x \left (-1+x^2\right )}{2 \sqrt {1-x^4}}+\frac {1}{2} (A-B) E(\arcsin (x)|-1)+B \operatorname {EllipticF}(\arcsin (x),-1) \] Input:

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

Output:

-1/2*((A - B)*x*(-1 + x^2))/Sqrt[1 - x^4] + ((A - B)*EllipticE[ArcSin[x], 
-1])/2 + B*EllipticF[ArcSin[x], -1]
 

Rubi [A] (verified)

Time = 0.23 (sec) , antiderivative size = 53, normalized size of antiderivative = 1.10, number of steps used = 7, number of rules used = 7, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.269, Rules used = {1388, 402, 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 {A+B x^2}{\left (x^2+1\right ) \sqrt {1-x^4}} \, dx\)

\(\Big \downarrow \) 1388

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

\(\Big \downarrow \) 402

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

\(\Big \downarrow \) 25

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

\(\Big \downarrow \) 399

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

\(\Big \downarrow \) 284

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

\(\Big \downarrow \) 327

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

\(\Big \downarrow \) 762

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

Input:

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

Output:

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

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 402
Int[((a_) + (b_.)*(x_)^2)^(p_)*((c_) + (d_.)*(x_)^2)^(q_.)*((e_) + (f_.)*(x 
_)^2), x_Symbol] :> Simp[(-(b*e - a*f))*x*(a + b*x^2)^(p + 1)*((c + d*x^2)^ 
(q + 1)/(a*2*(b*c - a*d)*(p + 1))), x] + Simp[1/(a*2*(b*c - a*d)*(p + 1)) 
 Int[(a + b*x^2)^(p + 1)*(c + d*x^2)^q*Simp[c*(b*e - a*f) + e*2*(b*c - a*d) 
*(p + 1) + d*(b*e - a*f)*(2*(p + q + 2) + 1)*x^2, x], x], x] /; FreeQ[{a, b 
, c, d, e, f, q}, x] && LtQ[p, -1]
 

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 [B] (verified)

Both result and optimal contain complex but leaf count of result is larger than twice the leaf count of optimal. 115 vs. \(2 (43 ) = 86\).

Time = 0.82 (sec) , antiderivative size = 116, normalized size of antiderivative = 2.42

method result size
elliptic \(-\frac {2 \left (-x^{2}+1\right ) \left (-\frac {A}{4}+\frac {B}{4}\right ) x}{\sqrt {\left (x^{2}+1\right ) \left (-x^{2}+1\right )}}+\frac {\left (\frac {B}{2}+\frac {A}{2}\right ) \sqrt {-x^{2}+1}\, \sqrt {x^{2}+1}\, \operatorname {EllipticF}\left (x , i\right )}{\sqrt {-x^{4}+1}}-\frac {\left (\frac {A}{2}-\frac {B}{2}\right ) \sqrt {-x^{2}+1}\, \sqrt {x^{2}+1}\, \left (\operatorname {EllipticF}\left (x , i\right )-\operatorname {EllipticE}\left (x , i\right )\right )}{\sqrt {-x^{4}+1}}\) \(116\)
risch \(-\frac {\left (A -B \right ) x \left (x^{2}-1\right )}{2 \sqrt {-x^{4}+1}}+\frac {A \sqrt {-x^{2}+1}\, \sqrt {x^{2}+1}\, \operatorname {EllipticF}\left (x , i\right )}{2 \sqrt {-x^{4}+1}}+\frac {B \sqrt {-x^{2}+1}\, \sqrt {x^{2}+1}\, \operatorname {EllipticF}\left (x , i\right )}{2 \sqrt {-x^{4}+1}}-\frac {\left (A -B \right ) \sqrt {-x^{2}+1}\, \sqrt {x^{2}+1}\, \left (\operatorname {EllipticF}\left (x , i\right )-\operatorname {EllipticE}\left (x , i\right )\right )}{2 \sqrt {-x^{4}+1}}\) \(131\)
default \(\frac {B \sqrt {-x^{2}+1}\, \sqrt {x^{2}+1}\, \operatorname {EllipticF}\left (x , i\right )}{\sqrt {-x^{4}+1}}+\left (A -B \right ) \left (\frac {\left (-x^{2}+1\right ) x}{2 \sqrt {\left (x^{2}+1\right ) \left (-x^{2}+1\right )}}+\frac {\sqrt {-x^{2}+1}\, \sqrt {x^{2}+1}\, \operatorname {EllipticF}\left (x , i\right )}{2 \sqrt {-x^{4}+1}}-\frac {\sqrt {-x^{2}+1}\, \sqrt {x^{2}+1}\, \left (\operatorname {EllipticF}\left (x , i\right )-\operatorname {EllipticE}\left (x , i\right )\right )}{2 \sqrt {-x^{4}+1}}\right )\) \(134\)

Input:

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

Output:

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

Fricas [A] (verification not implemented)

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

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

Output:

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

Sympy [F]

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

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

Output:

Integral((A + B*x**2)/(sqrt(-(x - 1)*(x + 1)*(x**2 + 1))*(x**2 + 1)), x)
 

Maxima [F]

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

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

Output:

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

Giac [F]

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

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

Output:

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

Mupad [F(-1)]

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

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

Output:

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

Reduce [F]

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

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

Output:

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