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

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

Optimal result

Integrand size = 20, antiderivative size = 49 \[ \int \frac {x^2}{\sqrt {-1+x^4} \left (1+x^4\right )} \, dx=-\frac {1}{4} \arctan \left (\frac {1+x^2}{x \sqrt {-1+x^4}}\right )-\frac {1}{4} \text {arctanh}\left (\frac {1-x^2}{x \sqrt {-1+x^4}}\right ) \] Output:

-1/4*arctan((x^2+1)/x/(x^4-1)^(1/2))-1/4*arctanh((-x^2+1)/x/(x^4-1)^(1/2))
 

Mathematica [C] (verified)

Result contains complex when optimal does not.

Time = 0.20 (sec) , antiderivative size = 53, normalized size of antiderivative = 1.08 \[ \int \frac {x^2}{\sqrt {-1+x^4} \left (1+x^4\right )} \, dx=\left (-\frac {1}{8}-\frac {i}{8}\right ) \arctan \left (\frac {(1+i) x}{\sqrt {-1+x^4}}\right )+\left (\frac {1}{8}-\frac {i}{8}\right ) \arctan \left (\frac {\left (\frac {1}{2}+\frac {i}{2}\right ) \sqrt {-1+x^4}}{x}\right ) \] Input:

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

Output:

(-1/8 - I/8)*ArcTan[((1 + I)*x)/Sqrt[-1 + x^4]] + (1/8 - I/8)*ArcTan[((1/2 
 + I/2)*Sqrt[-1 + x^4])/x]
 

Rubi [C] (verified)

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

Time = 0.62 (sec) , antiderivative size = 175, normalized size of antiderivative = 3.57, number of steps used = 7, number of rules used = 6, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.300, Rules used = {993, 1535, 763, 2213, 216, 219}

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

\(\Big \downarrow \) 993

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

\(\Big \downarrow \) 1535

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

\(\Big \downarrow \) 763

\(\displaystyle \frac {1}{2} \left (-\frac {1}{2} i \int \frac {i-x^2}{\left (x^2+i\right ) \sqrt {x^4-1}}dx-\frac {i \sqrt {x^2-1} \sqrt {x^2+1} \operatorname {EllipticF}\left (\arcsin \left (\frac {\sqrt {2} x}{\sqrt {x^2-1}}\right ),\frac {1}{2}\right )}{2 \sqrt {2} \sqrt {x^4-1}}\right )+\frac {1}{2} \left (\frac {1}{2} i \int \frac {x^2+i}{\left (i-x^2\right ) \sqrt {x^4-1}}dx+\frac {i \sqrt {x^2-1} \sqrt {x^2+1} \operatorname {EllipticF}\left (\arcsin \left (\frac {\sqrt {2} x}{\sqrt {x^2-1}}\right ),\frac {1}{2}\right )}{2 \sqrt {2} \sqrt {x^4-1}}\right )\)

\(\Big \downarrow \) 2213

\(\displaystyle \frac {1}{2} \left (\frac {1}{2} \int \frac {1}{i-\frac {2 x^2}{x^4-1}}d\frac {x}{\sqrt {x^4-1}}-\frac {i \sqrt {x^2-1} \sqrt {x^2+1} \operatorname {EllipticF}\left (\arcsin \left (\frac {\sqrt {2} x}{\sqrt {x^2-1}}\right ),\frac {1}{2}\right )}{2 \sqrt {2} \sqrt {x^4-1}}\right )+\frac {1}{2} \left (\frac {i \sqrt {x^2-1} \sqrt {x^2+1} \operatorname {EllipticF}\left (\arcsin \left (\frac {\sqrt {2} x}{\sqrt {x^2-1}}\right ),\frac {1}{2}\right )}{2 \sqrt {2} \sqrt {x^4-1}}-\frac {1}{2} \int \frac {1}{\frac {2 x^2}{x^4-1}+i}d\frac {x}{\sqrt {x^4-1}}\right )\)

\(\Big \downarrow \) 216

\(\displaystyle \frac {1}{2} \left (\frac {1}{2} \int \frac {1}{i-\frac {2 x^2}{x^4-1}}d\frac {x}{\sqrt {x^4-1}}-\frac {i \sqrt {x^2-1} \sqrt {x^2+1} \operatorname {EllipticF}\left (\arcsin \left (\frac {\sqrt {2} x}{\sqrt {x^2-1}}\right ),\frac {1}{2}\right )}{2 \sqrt {2} \sqrt {x^4-1}}\right )+\frac {1}{2} \left (\frac {i \sqrt {x^2-1} \sqrt {x^2+1} \operatorname {EllipticF}\left (\arcsin \left (\frac {\sqrt {2} x}{\sqrt {x^2-1}}\right ),\frac {1}{2}\right )}{2 \sqrt {2} \sqrt {x^4-1}}+\left (\frac {1}{4}+\frac {i}{4}\right ) \text {arctanh}\left (\frac {(1+i) x}{\sqrt {x^4-1}}\right )\right )\)

\(\Big \downarrow \) 219

\(\displaystyle \frac {1}{2} \left (\left (-\frac {1}{4}-\frac {i}{4}\right ) \arctan \left (\frac {(1+i) x}{\sqrt {x^4-1}}\right )-\frac {i \sqrt {x^2-1} \sqrt {x^2+1} \operatorname {EllipticF}\left (\arcsin \left (\frac {\sqrt {2} x}{\sqrt {x^2-1}}\right ),\frac {1}{2}\right )}{2 \sqrt {2} \sqrt {x^4-1}}\right )+\frac {1}{2} \left (\frac {i \sqrt {x^2-1} \sqrt {x^2+1} \operatorname {EllipticF}\left (\arcsin \left (\frac {\sqrt {2} x}{\sqrt {x^2-1}}\right ),\frac {1}{2}\right )}{2 \sqrt {2} \sqrt {x^4-1}}+\left (\frac {1}{4}+\frac {i}{4}\right ) \text {arctanh}\left (\frac {(1+i) x}{\sqrt {x^4-1}}\right )\right )\)

Input:

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

Output:

((-1/4 - I/4)*ArcTan[((1 + I)*x)/Sqrt[-1 + x^4]] - ((I/2)*Sqrt[-1 + x^2]*S 
qrt[1 + x^2]*EllipticF[ArcSin[(Sqrt[2]*x)/Sqrt[-1 + x^2]], 1/2])/(Sqrt[2]* 
Sqrt[-1 + x^4]))/2 + ((1/4 + I/4)*ArcTanh[((1 + I)*x)/Sqrt[-1 + x^4]] + (( 
I/2)*Sqrt[-1 + x^2]*Sqrt[1 + x^2]*EllipticF[ArcSin[(Sqrt[2]*x)/Sqrt[-1 + x 
^2]], 1/2])/(Sqrt[2]*Sqrt[-1 + x^4]))/2
 

Defintions of rubi rules used

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

rule 219
Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(1/(Rt[a, 2]*Rt[-b, 2]))* 
ArcTanh[Rt[-b, 2]*(x/Rt[a, 2])], x] /; FreeQ[{a, b}, x] && NegQ[a/b] && (Gt 
Q[a, 0] || LtQ[b, 0])
 

rule 763
Int[1/Sqrt[(a_) + (b_.)*(x_)^4], x_Symbol] :> With[{q = Rt[(-a)*b, 2]}, Sim 
p[Sqrt[-a + q*x^2]*(Sqrt[(a + q*x^2)/q]/(Sqrt[2]*Sqrt[-a]*Sqrt[a + b*x^4])) 
*EllipticF[ArcSin[x/Sqrt[(a + q*x^2)/(2*q)]], 1/2], x] /; IntegerQ[q]] /; F 
reeQ[{a, b}, x] && LtQ[a, 0] && GtQ[b, 0]
 

rule 993
Int[(x_)^2/(((a_) + (b_.)*(x_)^4)*Sqrt[(c_) + (d_.)*(x_)^4]), x_Symbol] :> 
With[{r = Numerator[Rt[-a/b, 2]], s = Denominator[Rt[-a/b, 2]]}, Simp[s/(2* 
b)   Int[1/((r + s*x^2)*Sqrt[c + d*x^4]), x], x] - Simp[s/(2*b)   Int[1/((r 
 - s*x^2)*Sqrt[c + d*x^4]), x], x]] /; FreeQ[{a, b, c, d}, x] && NeQ[b*c - 
a*d, 0]
 

rule 1535
Int[1/(((d_) + (e_.)*(x_)^2)*Sqrt[(a_) + (c_.)*(x_)^4]), x_Symbol] :> Simp[ 
1/(2*d)   Int[1/Sqrt[a + c*x^4], x], x] + Simp[1/(2*d)   Int[(d - e*x^2)/(( 
d + e*x^2)*Sqrt[a + c*x^4]), x], x] /; FreeQ[{a, c, d, e}, x] && NeQ[c*d^2 
+ a*e^2, 0] && EqQ[c*d^2 - a*e^2, 0]
 

rule 2213
Int[((A_) + (B_.)*(x_)^2)/(((d_) + (e_.)*(x_)^2)*Sqrt[(a_) + (c_.)*(x_)^4]) 
, x_Symbol] :> Simp[A   Subst[Int[1/(d + 2*a*e*x^2), x], x, x/Sqrt[a + c*x^ 
4]], x] /; FreeQ[{a, c, d, e, A, B}, x] && EqQ[c*d^2 - a*e^2, 0] && EqQ[B*d 
 + A*e, 0]
 
Maple [C] (verified)

Result contains complex when optimal does not.

Time = 1.18 (sec) , antiderivative size = 50, normalized size of antiderivative = 1.02

method result size
pseudoelliptic \(\left (\frac {1}{8}-\frac {i}{8}\right ) \left (\ln \left (2\right )+\ln \left (\frac {\left (1+i\right ) \sqrt {x^{4}-1}+2 x}{i x^{2}-1}\right )+\arctan \left (\frac {\left (\frac {1}{2}+\frac {i}{2}\right ) \sqrt {x^{4}-1}}{x}\right )\right )\) \(50\)
default \(\frac {\ln \left (\frac {\frac {x^{4}-1}{2 x^{2}}+\frac {\sqrt {x^{4}-1}}{x}+1}{\frac {x^{4}-1}{2 x^{2}}-\frac {\sqrt {x^{4}-1}}{x}+1}\right )}{16}+\frac {\arctan \left (\frac {\sqrt {x^{4}-1}}{x}+1\right )}{8}+\frac {\arctan \left (\frac {\sqrt {x^{4}-1}}{x}-1\right )}{8}\) \(87\)
elliptic \(\frac {\ln \left (\frac {\frac {x^{4}-1}{2 x^{2}}+\frac {\sqrt {x^{4}-1}}{x}+1}{\frac {x^{4}-1}{2 x^{2}}-\frac {\sqrt {x^{4}-1}}{x}+1}\right )}{16}+\frac {\arctan \left (\frac {\sqrt {x^{4}-1}}{x}+1\right )}{8}+\frac {\arctan \left (\frac {\sqrt {x^{4}-1}}{x}-1\right )}{8}\) \(87\)
trager \(\frac {\ln \left (-\frac {-8 \operatorname {RootOf}\left (32 \textit {\_Z}^{2}-8 \textit {\_Z} +1\right ) x +\sqrt {x^{4}-1}+2 x}{8 x^{2} \operatorname {RootOf}\left (32 \textit {\_Z}^{2}-8 \textit {\_Z} +1\right )-x^{2}-1}\right )}{4}-\ln \left (-\frac {-8 \operatorname {RootOf}\left (32 \textit {\_Z}^{2}-8 \textit {\_Z} +1\right ) x +\sqrt {x^{4}-1}+2 x}{8 x^{2} \operatorname {RootOf}\left (32 \textit {\_Z}^{2}-8 \textit {\_Z} +1\right )-x^{2}-1}\right ) \operatorname {RootOf}\left (32 \textit {\_Z}^{2}-8 \textit {\_Z} +1\right )+\operatorname {RootOf}\left (32 \textit {\_Z}^{2}-8 \textit {\_Z} +1\right ) \ln \left (-\frac {8 \operatorname {RootOf}\left (32 \textit {\_Z}^{2}-8 \textit {\_Z} +1\right ) x +\sqrt {x^{4}-1}}{8 x^{2} \operatorname {RootOf}\left (32 \textit {\_Z}^{2}-8 \textit {\_Z} +1\right )-x^{2}+1}\right )\) \(185\)

Input:

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

Output:

(1/8-1/8*I)*(ln(2)+ln(((1+I)*(x^4-1)^(1/2)+2*x)/(I*x^2-1))+arctan((1/2+1/2 
*I)*(x^4-1)^(1/2)/x))
 

Fricas [A] (verification not implemented)

Time = 0.13 (sec) , antiderivative size = 51, normalized size of antiderivative = 1.04 \[ \int \frac {x^2}{\sqrt {-1+x^4} \left (1+x^4\right )} \, dx=\frac {1}{4} \, \arctan \left (\frac {\sqrt {x^{4} - 1} x}{x^{2} + 1}\right ) + \frac {1}{8} \, \log \left (\frac {x^{4} + 2 \, x^{2} + 2 \, \sqrt {x^{4} - 1} x - 1}{x^{4} + 1}\right ) \] Input:

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

Output:

1/4*arctan(sqrt(x^4 - 1)*x/(x^2 + 1)) + 1/8*log((x^4 + 2*x^2 + 2*sqrt(x^4 
- 1)*x - 1)/(x^4 + 1))
 

Sympy [F]

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

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

Output:

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

Maxima [F]

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

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

Output:

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

Giac [F]

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

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

Output:

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

Mupad [F(-1)]

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

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

Output:

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

Reduce [F]

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

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

Output:

int((sqrt(x**4 - 1)*x**2)/(x**8 - 1),x)