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

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

Optimal result

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

(A-B+C)*x*(-x^4+1)^(1/2)/(2*x^2+2)+1/2*(A-B+3*C)*EllipticE(x,I)+(B-2*C)*El 
lipticF(x,I)
 

Mathematica [A] (verified)

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

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

Output:

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

Rubi [B] (verified)

Leaf count is larger than twice the leaf count of optimal. \(119\) vs. \(2(56)=112\).

Time = 0.52 (sec) , antiderivative size = 119, normalized size of antiderivative = 2.12, number of steps used = 3, number of rules used = 3, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.097, Rules used = {1388, 7293, 2009}

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+C x^4}{\left (x^2+1\right ) \sqrt {1-x^4}} \, dx\)

\(\Big \downarrow \) 1388

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

\(\Big \downarrow \) 7293

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

\(\Big \downarrow \) 2009

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

Input:

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

Output:

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

Defintions of rubi rules used

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]))
 

rule 2009
Int[u_, x_Symbol] :> Simp[IntSum[u, x], x] /; SumQ[u]
 

rule 7293
Int[u_, x_Symbol] :> With[{v = ExpandIntegrand[u, x]}, Int[v, x] /; SumQ[v] 
]
 
Maple [B] (verified)

Both result and optimal contain complex but leaf count of result is larger than twice the leaf count of optimal. 124 vs. \(2 (51 ) = 102\).

Time = 1.14 (sec) , antiderivative size = 125, normalized size of antiderivative = 2.23

method result size
elliptic \(-\frac {2 \left (-x^{2}+1\right ) \left (-\frac {A}{4}+\frac {B}{4}-\frac {C}{4}\right ) x}{\sqrt {\left (x^{2}+1\right ) \left (-x^{2}+1\right )}}+\frac {\left (\frac {B}{2}-\frac {C}{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 {3 C}{2}+\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}}\) \(125\)
risch \(-\frac {\left (A -B +C \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 +3 C \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}}-\frac {C \sqrt {-x^{2}+1}\, \sqrt {x^{2}+1}\, \operatorname {EllipticF}\left (x , i\right )}{2 \sqrt {-x^{4}+1}}\) \(167\)
default \(\frac {B \sqrt {-x^{2}+1}\, \sqrt {x^{2}+1}\, \operatorname {EllipticF}\left (x , i\right )}{\sqrt {-x^{4}+1}}-\frac {C \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}}+\left (A -B +C \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 )-\frac {C \sqrt {-x^{2}+1}\, \sqrt {x^{2}+1}\, \operatorname {EllipticF}\left (x , i\right )}{\sqrt {-x^{4}+1}}\) \(206\)

Input:

int((C*x^4+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-1/4*C)*x/((x^2+1)*(-x^2+1))^(1/2)+(1/2*B-1/2*C+1 
/2*A)*(-x^2+1)^(1/2)*(x^2+1)^(1/2)/(-x^4+1)^(1/2)*EllipticF(x,I)-(3/2*C+1/ 
2*A-1/2*B)*(-x^2+1)^(1/2)*(x^2+1)^(1/2)/(-x^4+1)^(1/2)*(EllipticF(x,I)-Ell 
ipticE(x,I))
 

Fricas [A] (verification not implemented)

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

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

Output:

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

Sympy [F]

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

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

Output:

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

Maxima [F]

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

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

Output:

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

Giac [F]

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

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

Output:

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

Mupad [F(-1)]

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

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

Output:

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

Reduce [F]

\[ \int \frac {A+B x^2+C x^4}{\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^{6}+x^{4}-x^{2}-1}d x \right ) b \,x^{2}-\left (\int \frac {\sqrt {-x^{4}+1}}{x^{6}+x^{4}-x^{2}-1}d x \right ) b +\left (\int \frac {\sqrt {-x^{4}+1}\, x^{4}}{x^{6}+x^{4}-x^{2}-1}d x \right ) b \,x^{2}+\left (\int \frac {\sqrt {-x^{4}+1}\, x^{4}}{x^{6}+x^{4}-x^{2}-1}d x \right ) b -2 \left (\int \frac {\sqrt {-x^{4}+1}\, x^{4}}{x^{6}+x^{4}-x^{2}-1}d x \right ) c \,x^{2}-2 \left (\int \frac {\sqrt {-x^{4}+1}\, x^{4}}{x^{6}+x^{4}-x^{2}-1}d x \right ) c}{2 x^{2}+2} \] Input:

int((C*x^4+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**6 + x**4 - x**2 - 1),x)*b*x**2 - int(sqrt( - x**4 + 
 1)/(x**6 + x**4 - x**2 - 1),x)*b + int((sqrt( - x**4 + 1)*x**4)/(x**6 + x 
**4 - x**2 - 1),x)*b*x**2 + int((sqrt( - x**4 + 1)*x**4)/(x**6 + x**4 - x* 
*2 - 1),x)*b - 2*int((sqrt( - x**4 + 1)*x**4)/(x**6 + x**4 - x**2 - 1),x)* 
c*x**2 - 2*int((sqrt( - x**4 + 1)*x**4)/(x**6 + x**4 - x**2 - 1),x)*c)/(2* 
(x**2 + 1))