\(\int \frac {\sqrt {1-x^4} (1+x^4)}{4-7 x^4+4 x^8} \, dx\) [862]

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

Optimal result

Integrand size = 31, antiderivative size = 65 \[ \int \frac {\sqrt {1-x^4} \left (1+x^4\right )}{4-7 x^4+4 x^8} \, dx=\frac {1}{8} \arctan \left (\frac {-1+\frac {x^2}{2}+x^4}{x \sqrt {1-x^4}}\right )-\frac {1}{8} \text {arctanh}\left (\frac {-1-\frac {x^2}{2}+x^4}{x \sqrt {1-x^4}}\right ) \]

[Out]

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

Rubi [C] (verified)

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

Time = 0.38 (sec) , antiderivative size = 155, normalized size of antiderivative = 2.38, number of steps used = 16, number of rules used = 6, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.194, Rules used = {6860, 415, 227, 418, 1227, 551} \[ \int \frac {\sqrt {1-x^4} \left (1+x^4\right )}{4-7 x^4+4 x^8} \, dx=-\frac {1}{8} \left (1+i \sqrt {15}\right ) \operatorname {EllipticF}(\arcsin (x),-1)-\frac {1}{8} \left (1-i \sqrt {15}\right ) \operatorname {EllipticF}(\arcsin (x),-1)+\frac {1}{8} \operatorname {EllipticPi}\left (-\frac {2}{\sqrt {\frac {1}{2} \left (7-i \sqrt {15}\right )}},\arcsin (x),-1\right )+\frac {1}{8} \operatorname {EllipticPi}\left (\frac {2}{\sqrt {\frac {1}{2} \left (7-i \sqrt {15}\right )}},\arcsin (x),-1\right )+\frac {1}{8} \operatorname {EllipticPi}\left (-\frac {2}{\sqrt {\frac {1}{2} \left (7+i \sqrt {15}\right )}},\arcsin (x),-1\right )+\frac {1}{8} \operatorname {EllipticPi}\left (\frac {2}{\sqrt {\frac {1}{2} \left (7+i \sqrt {15}\right )}},\arcsin (x),-1\right ) \]

[In]

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

[Out]

-1/8*((1 - I*Sqrt[15])*EllipticF[ArcSin[x], -1]) - ((1 + I*Sqrt[15])*EllipticF[ArcSin[x], -1])/8 + EllipticPi[
-2/Sqrt[(7 - I*Sqrt[15])/2], ArcSin[x], -1]/8 + EllipticPi[2/Sqrt[(7 - I*Sqrt[15])/2], ArcSin[x], -1]/8 + Elli
pticPi[-2/Sqrt[(7 + I*Sqrt[15])/2], ArcSin[x], -1]/8 + EllipticPi[2/Sqrt[(7 + I*Sqrt[15])/2], ArcSin[x], -1]/8

Rule 227

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

Rule 415

Int[Sqrt[(a_) + (b_.)*(x_)^4]/((c_) + (d_.)*(x_)^4), x_Symbol] :> Dist[b/d, Int[1/Sqrt[a + b*x^4], x], x] - Di
st[(b*c - a*d)/d, Int[1/(Sqrt[a + b*x^4]*(c + d*x^4)), x], x] /; FreeQ[{a, b, c, d}, x] && NeQ[b*c - a*d, 0]

Rule 418

Int[1/(Sqrt[(a_) + (b_.)*(x_)^4]*((c_) + (d_.)*(x_)^4)), x_Symbol] :> Dist[1/(2*c), Int[1/(Sqrt[a + b*x^4]*(1
- Rt[-d/c, 2]*x^2)), x], x] + Dist[1/(2*c), Int[1/(Sqrt[a + b*x^4]*(1 + Rt[-d/c, 2]*x^2)), x], x] /; FreeQ[{a,
 b, c, d}, x] && NeQ[b*c - a*d, 0]

Rule 551

Int[1/(((a_) + (b_.)*(x_)^2)*Sqrt[(c_) + (d_.)*(x_)^2]*Sqrt[(e_) + (f_.)*(x_)^2]), x_Symbol] :> Simp[(1/(a*Sqr
t[c]*Sqrt[e]*Rt[-d/c, 2]))*EllipticPi[b*(c/(a*d)), ArcSin[Rt[-d/c, 2]*x], c*(f/(d*e))], x] /; FreeQ[{a, b, c,
d, e, f}, x] &&  !GtQ[d/c, 0] && GtQ[c, 0] && GtQ[e, 0] &&  !( !GtQ[f/e, 0] && SimplerSqrtQ[-f/e, -d/c])

Rule 1227

Int[1/(((d_) + (e_.)*(x_)^2)*Sqrt[(a_) + (c_.)*(x_)^4]), x_Symbol] :> With[{q = Rt[(-a)*c, 2]}, Dist[Sqrt[-c],
 Int[1/((d + e*x^2)*Sqrt[q + c*x^2]*Sqrt[q - c*x^2]), x], x]] /; FreeQ[{a, c, d, e}, x] && GtQ[a, 0] && LtQ[c,
 0]

Rule 6860

Int[(u_)/((a_.) + (b_.)*(x_)^(n_.) + (c_.)*(x_)^(n2_.)), x_Symbol] :> With[{v = RationalFunctionExpand[u/(a +
b*x^n + c*x^(2*n)), x]}, Int[v, x] /; SumQ[v]] /; FreeQ[{a, b, c}, x] && EqQ[n2, 2*n] && IGtQ[n, 0]

Rubi steps \begin{align*} \text {integral}& = \int \left (\frac {\left (1-i \sqrt {15}\right ) \sqrt {1-x^4}}{-7-i \sqrt {15}+8 x^4}+\frac {\left (1+i \sqrt {15}\right ) \sqrt {1-x^4}}{-7+i \sqrt {15}+8 x^4}\right ) \, dx \\ & = \left (1-i \sqrt {15}\right ) \int \frac {\sqrt {1-x^4}}{-7-i \sqrt {15}+8 x^4} \, dx+\left (1+i \sqrt {15}\right ) \int \frac {\sqrt {1-x^4}}{-7+i \sqrt {15}+8 x^4} \, dx \\ & = \frac {1}{8} \left (-1-i \sqrt {15}\right ) \int \frac {1}{\sqrt {1-x^4}} \, dx+\frac {1}{4} \left (-7+i \sqrt {15}\right ) \int \frac {1}{\sqrt {1-x^4} \left (-7+i \sqrt {15}+8 x^4\right )} \, dx+\frac {1}{8} \left (-1+i \sqrt {15}\right ) \int \frac {1}{\sqrt {1-x^4}} \, dx-\frac {1}{8} \left (i+\sqrt {15}\right )^2 \int \frac {1}{\sqrt {1-x^4} \left (-7-i \sqrt {15}+8 x^4\right )} \, dx \\ & = -\frac {1}{8} \left (1-i \sqrt {15}\right ) \operatorname {EllipticF}(\arcsin (x),-1)-\frac {1}{8} \left (1+i \sqrt {15}\right ) \operatorname {EllipticF}(\arcsin (x),-1)+\frac {1}{8} \int \frac {1}{\left (1-\frac {2 x^2}{\sqrt {\frac {1}{2} \left (7-i \sqrt {15}\right )}}\right ) \sqrt {1-x^4}} \, dx+\frac {1}{8} \int \frac {1}{\left (1+\frac {2 x^2}{\sqrt {\frac {1}{2} \left (7-i \sqrt {15}\right )}}\right ) \sqrt {1-x^4}} \, dx+\frac {1}{8} \int \frac {1}{\left (1-\frac {2 x^2}{\sqrt {\frac {1}{2} \left (7+i \sqrt {15}\right )}}\right ) \sqrt {1-x^4}} \, dx+\frac {1}{8} \int \frac {1}{\left (1+\frac {2 x^2}{\sqrt {\frac {1}{2} \left (7+i \sqrt {15}\right )}}\right ) \sqrt {1-x^4}} \, dx \\ & = -\frac {1}{8} \left (1-i \sqrt {15}\right ) \operatorname {EllipticF}(\arcsin (x),-1)-\frac {1}{8} \left (1+i \sqrt {15}\right ) \operatorname {EllipticF}(\arcsin (x),-1)+\frac {1}{8} \int \frac {1}{\sqrt {1-x^2} \sqrt {1+x^2} \left (1-\frac {2 x^2}{\sqrt {\frac {1}{2} \left (7-i \sqrt {15}\right )}}\right )} \, dx+\frac {1}{8} \int \frac {1}{\sqrt {1-x^2} \sqrt {1+x^2} \left (1+\frac {2 x^2}{\sqrt {\frac {1}{2} \left (7-i \sqrt {15}\right )}}\right )} \, dx+\frac {1}{8} \int \frac {1}{\sqrt {1-x^2} \sqrt {1+x^2} \left (1-\frac {2 x^2}{\sqrt {\frac {1}{2} \left (7+i \sqrt {15}\right )}}\right )} \, dx+\frac {1}{8} \int \frac {1}{\sqrt {1-x^2} \sqrt {1+x^2} \left (1+\frac {2 x^2}{\sqrt {\frac {1}{2} \left (7+i \sqrt {15}\right )}}\right )} \, dx \\ & = -\frac {1}{8} \left (1-i \sqrt {15}\right ) \operatorname {EllipticF}(\arcsin (x),-1)-\frac {1}{8} \left (1+i \sqrt {15}\right ) \operatorname {EllipticF}(\arcsin (x),-1)+\frac {1}{8} \operatorname {EllipticPi}\left (-\frac {2}{\sqrt {\frac {1}{2} \left (7-i \sqrt {15}\right )}},\arcsin (x),-1\right )+\frac {1}{8} \operatorname {EllipticPi}\left (\frac {2}{\sqrt {\frac {1}{2} \left (7-i \sqrt {15}\right )}},\arcsin (x),-1\right )+\frac {1}{8} \operatorname {EllipticPi}\left (-\frac {2}{\sqrt {\frac {1}{2} \left (7+i \sqrt {15}\right )}},\arcsin (x),-1\right )+\frac {1}{8} \operatorname {EllipticPi}\left (\frac {2}{\sqrt {\frac {1}{2} \left (7+i \sqrt {15}\right )}},\arcsin (x),-1\right ) \\ \end{align*}

Mathematica [C] (verified)

Result contains complex when optimal does not.

Time = 0.25 (sec) , antiderivative size = 57, normalized size of antiderivative = 0.88 \[ \int \frac {\sqrt {1-x^4} \left (1+x^4\right )}{4-7 x^4+4 x^8} \, dx=\left (\frac {1}{8}-\frac {i}{8}\right ) \arctan \left (\frac {\left (\frac {1}{2}+\frac {i}{2}\right ) x}{\sqrt {1-x^4}}\right )-\left (\frac {1}{8}+\frac {i}{8}\right ) \arctan \left (\frac {(1+i) \sqrt {1-x^4}}{x}\right ) \]

[In]

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

[Out]

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

Maple [C] (verified)

Result contains complex when optimal does not.

Time = 3.85 (sec) , antiderivative size = 44, normalized size of antiderivative = 0.68

method result size
pseudoelliptic \(\left (-\frac {1}{8}+\frac {i}{8}\right ) \arctan \left (\frac {\left (1-i\right ) \sqrt {-x^{4}+1}}{x}\right )+\left (-\frac {1}{8}-\frac {i}{8}\right ) \arctan \left (\frac {\left (1+i\right ) \sqrt {-x^{4}+1}}{x}\right )\) \(44\)
default \(-\frac {\ln \left (\frac {\frac {-x^{4}+1}{2 x^{2}}-\frac {\sqrt {-x^{4}+1}}{2 x}+\frac {1}{4}}{\frac {-x^{4}+1}{2 x^{2}}+\frac {\sqrt {-x^{4}+1}}{2 x}+\frac {1}{4}}\right )}{16}-\frac {\arctan \left (\frac {2 \sqrt {-x^{4}+1}}{x}+1\right )}{8}-\frac {\arctan \left (\frac {2 \sqrt {-x^{4}+1}}{x}-1\right )}{8}\) \(102\)
elliptic \(-\frac {\ln \left (\frac {\frac {-x^{4}+1}{2 x^{2}}-\frac {\sqrt {-x^{4}+1}}{2 x}+\frac {1}{4}}{\frac {-x^{4}+1}{2 x^{2}}+\frac {\sqrt {-x^{4}+1}}{2 x}+\frac {1}{4}}\right )}{16}-\frac {\arctan \left (\frac {2 \sqrt {-x^{4}+1}}{x}+1\right )}{8}-\frac {\arctan \left (\frac {2 \sqrt {-x^{4}+1}}{x}-1\right )}{8}\) \(102\)
trager \(\operatorname {RootOf}\left (128 \textit {\_Z}^{2}+16 \textit {\_Z} +1\right ) \ln \left (-\frac {-8 \operatorname {RootOf}\left (128 \textit {\_Z}^{2}+16 \textit {\_Z} +1\right ) x^{4}+64 x^{2} \operatorname {RootOf}\left (128 \textit {\_Z}^{2}+16 \textit {\_Z} +1\right )^{2}+4 x^{2} \operatorname {RootOf}\left (128 \textit {\_Z}^{2}+16 \textit {\_Z} +1\right )+\sqrt {-x^{4}+1}\, x +8 \operatorname {RootOf}\left (128 \textit {\_Z}^{2}+16 \textit {\_Z} +1\right )}{2 x^{4}+16 x^{2} \operatorname {RootOf}\left (128 \textit {\_Z}^{2}+16 \textit {\_Z} +1\right )+x^{2}-2}\right )-\frac {\ln \left (-\frac {16 \operatorname {RootOf}\left (128 \textit {\_Z}^{2}+16 \textit {\_Z} +1\right ) x^{4}+128 x^{2} \operatorname {RootOf}\left (128 \textit {\_Z}^{2}+16 \textit {\_Z} +1\right )^{2}+2 x^{4}+24 x^{2} \operatorname {RootOf}\left (128 \textit {\_Z}^{2}+16 \textit {\_Z} +1\right )+2 \sqrt {-x^{4}+1}\, x +x^{2}-16 \operatorname {RootOf}\left (128 \textit {\_Z}^{2}+16 \textit {\_Z} +1\right )-2}{-2 x^{4}+16 x^{2} \operatorname {RootOf}\left (128 \textit {\_Z}^{2}+16 \textit {\_Z} +1\right )+x^{2}+2}\right )}{8}-\ln \left (-\frac {16 \operatorname {RootOf}\left (128 \textit {\_Z}^{2}+16 \textit {\_Z} +1\right ) x^{4}+128 x^{2} \operatorname {RootOf}\left (128 \textit {\_Z}^{2}+16 \textit {\_Z} +1\right )^{2}+2 x^{4}+24 x^{2} \operatorname {RootOf}\left (128 \textit {\_Z}^{2}+16 \textit {\_Z} +1\right )+2 \sqrt {-x^{4}+1}\, x +x^{2}-16 \operatorname {RootOf}\left (128 \textit {\_Z}^{2}+16 \textit {\_Z} +1\right )-2}{-2 x^{4}+16 x^{2} \operatorname {RootOf}\left (128 \textit {\_Z}^{2}+16 \textit {\_Z} +1\right )+x^{2}+2}\right ) \operatorname {RootOf}\left (128 \textit {\_Z}^{2}+16 \textit {\_Z} +1\right )\) \(367\)

[In]

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

[Out]

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

Fricas [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 130 vs. \(2 (57) = 114\).

Time = 0.36 (sec) , antiderivative size = 130, normalized size of antiderivative = 2.00 \[ \int \frac {\sqrt {1-x^4} \left (1+x^4\right )}{4-7 x^4+4 x^8} \, dx=-\frac {1}{8} \, \arctan \left (-\frac {4 \, x^{8} - 7 \, x^{4} - 4 \, {\left (2 \, x^{5} + x^{3} - 2 \, x\right )} \sqrt {-x^{4} + 1} + 4}{4 \, x^{8} + 8 \, x^{6} - 7 \, x^{4} - 8 \, x^{2} + 4}\right ) + \frac {1}{16} \, \log \left (\frac {4 \, x^{8} - 8 \, x^{6} - 7 \, x^{4} + 8 \, x^{2} - 4 \, {\left (2 \, x^{5} - x^{3} - 2 \, x\right )} \sqrt {-x^{4} + 1} + 4}{4 \, x^{8} - 7 \, x^{4} + 4}\right ) \]

[In]

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

[Out]

-1/8*arctan(-(4*x^8 - 7*x^4 - 4*(2*x^5 + x^3 - 2*x)*sqrt(-x^4 + 1) + 4)/(4*x^8 + 8*x^6 - 7*x^4 - 8*x^2 + 4)) +
 1/16*log((4*x^8 - 8*x^6 - 7*x^4 + 8*x^2 - 4*(2*x^5 - x^3 - 2*x)*sqrt(-x^4 + 1) + 4)/(4*x^8 - 7*x^4 + 4))

Sympy [F]

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

[In]

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

[Out]

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

Maxima [F]

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

[In]

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

[Out]

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

Giac [F]

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

[In]

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

[Out]

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

Mupad [F(-1)]

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

[In]

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

[Out]

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