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

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

Optimal result

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

[Out]

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

Rubi [A] (verified)

Time = 0.23 (sec) , antiderivative size = 125, normalized size of antiderivative = 1.00, number of steps used = 16, number of rules used = 6, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.188, Rules used = {6860, 246, 218, 212, 209, 385} \[ \int \frac {2-x^4+2 x^8}{\sqrt [4]{1+x^4} \left (-2+x^4+x^8\right )} \, dx=\arctan \left (\frac {x}{\sqrt [4]{x^4+1}}\right )-\sqrt [4]{2} \arctan \left (\frac {x}{\sqrt [4]{2} \sqrt [4]{x^4+1}}\right )-\frac {\arctan \left (\frac {\sqrt [4]{2} x}{\sqrt [4]{x^4+1}}\right )}{2 \sqrt [4]{2}}+\text {arctanh}\left (\frac {x}{\sqrt [4]{x^4+1}}\right )-\sqrt [4]{2} \text {arctanh}\left (\frac {x}{\sqrt [4]{2} \sqrt [4]{x^4+1}}\right )-\frac {\text {arctanh}\left (\frac {\sqrt [4]{2} x}{\sqrt [4]{x^4+1}}\right )}{2 \sqrt [4]{2}} \]

[In]

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

[Out]

ArcTan[x/(1 + x^4)^(1/4)] - 2^(1/4)*ArcTan[x/(2^(1/4)*(1 + x^4)^(1/4))] - ArcTan[(2^(1/4)*x)/(1 + x^4)^(1/4)]/
(2*2^(1/4)) + ArcTanh[x/(1 + x^4)^(1/4)] - 2^(1/4)*ArcTanh[x/(2^(1/4)*(1 + x^4)^(1/4))] - ArcTanh[(2^(1/4)*x)/
(1 + x^4)^(1/4)]/(2*2^(1/4))

Rule 209

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

Rule 212

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] && (GtQ[a, 0] || LtQ[b, 0])

Rule 218

Int[((a_) + (b_.)*(x_)^4)^(-1), x_Symbol] :> With[{r = Numerator[Rt[-a/b, 2]], s = Denominator[Rt[-a/b, 2]]},
Dist[r/(2*a), Int[1/(r - s*x^2), x], x] + Dist[r/(2*a), Int[1/(r + s*x^2), x], x]] /; FreeQ[{a, b}, x] &&  !Gt
Q[a/b, 0]

Rule 246

Int[((a_) + (b_.)*(x_)^(n_))^(p_), x_Symbol] :> Dist[a^(p + 1/n), Subst[Int[1/(1 - b*x^n)^(p + 1/n + 1), x], x
, x/(a + b*x^n)^(1/n)], x] /; FreeQ[{a, b}, x] && IGtQ[n, 0] && LtQ[-1, p, 0] && NeQ[p, -2^(-1)] && IntegerQ[p
 + 1/n]

Rule 385

Int[((a_) + (b_.)*(x_)^(n_))^(p_)/((c_) + (d_.)*(x_)^(n_)), x_Symbol] :> Subst[Int[1/(c - (b*c - a*d)*x^n), x]
, x, x/(a + b*x^n)^(1/n)] /; FreeQ[{a, b, c, d}, x] && NeQ[b*c - a*d, 0] && EqQ[n*p + 1, 0] && IntegerQ[n]

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 {2}{\sqrt [4]{1+x^4}}+\frac {3 \left (2-x^4\right )}{\sqrt [4]{1+x^4} \left (-2+x^4+x^8\right )}\right ) \, dx \\ & = 2 \int \frac {1}{\sqrt [4]{1+x^4}} \, dx+3 \int \frac {2-x^4}{\sqrt [4]{1+x^4} \left (-2+x^4+x^8\right )} \, dx \\ & = 2 \text {Subst}\left (\int \frac {1}{1-x^4} \, dx,x,\frac {x}{\sqrt [4]{1+x^4}}\right )+3 \int \left (\frac {2}{3 \sqrt [4]{1+x^4} \left (-2+2 x^4\right )}-\frac {8}{3 \sqrt [4]{1+x^4} \left (4+2 x^4\right )}\right ) \, dx \\ & = 2 \int \frac {1}{\sqrt [4]{1+x^4} \left (-2+2 x^4\right )} \, dx-8 \int \frac {1}{\sqrt [4]{1+x^4} \left (4+2 x^4\right )} \, dx+\text {Subst}\left (\int \frac {1}{1-x^2} \, dx,x,\frac {x}{\sqrt [4]{1+x^4}}\right )+\text {Subst}\left (\int \frac {1}{1+x^2} \, dx,x,\frac {x}{\sqrt [4]{1+x^4}}\right ) \\ & = \arctan \left (\frac {x}{\sqrt [4]{1+x^4}}\right )+\text {arctanh}\left (\frac {x}{\sqrt [4]{1+x^4}}\right )+2 \text {Subst}\left (\int \frac {1}{-2+4 x^4} \, dx,x,\frac {x}{\sqrt [4]{1+x^4}}\right )-8 \text {Subst}\left (\int \frac {1}{4-2 x^4} \, dx,x,\frac {x}{\sqrt [4]{1+x^4}}\right ) \\ & = \arctan \left (\frac {x}{\sqrt [4]{1+x^4}}\right )+\text {arctanh}\left (\frac {x}{\sqrt [4]{1+x^4}}\right )-\frac {1}{2} \text {Subst}\left (\int \frac {1}{1-\sqrt {2} x^2} \, dx,x,\frac {x}{\sqrt [4]{1+x^4}}\right )-\frac {1}{2} \text {Subst}\left (\int \frac {1}{1+\sqrt {2} x^2} \, dx,x,\frac {x}{\sqrt [4]{1+x^4}}\right )-\sqrt {2} \text {Subst}\left (\int \frac {1}{\sqrt {2}-x^2} \, dx,x,\frac {x}{\sqrt [4]{1+x^4}}\right )-\sqrt {2} \text {Subst}\left (\int \frac {1}{\sqrt {2}+x^2} \, dx,x,\frac {x}{\sqrt [4]{1+x^4}}\right ) \\ & = \arctan \left (\frac {x}{\sqrt [4]{1+x^4}}\right )-\sqrt [4]{2} \arctan \left (\frac {x}{\sqrt [4]{2} \sqrt [4]{1+x^4}}\right )-\frac {\arctan \left (\frac {\sqrt [4]{2} x}{\sqrt [4]{1+x^4}}\right )}{2 \sqrt [4]{2}}+\text {arctanh}\left (\frac {x}{\sqrt [4]{1+x^4}}\right )-\sqrt [4]{2} \text {arctanh}\left (\frac {x}{\sqrt [4]{2} \sqrt [4]{1+x^4}}\right )-\frac {\text {arctanh}\left (\frac {\sqrt [4]{2} x}{\sqrt [4]{1+x^4}}\right )}{2 \sqrt [4]{2}} \\ \end{align*}

Mathematica [A] (verified)

Time = 0.45 (sec) , antiderivative size = 125, normalized size of antiderivative = 1.00 \[ \int \frac {2-x^4+2 x^8}{\sqrt [4]{1+x^4} \left (-2+x^4+x^8\right )} \, dx=\arctan \left (\frac {x}{\sqrt [4]{1+x^4}}\right )-\sqrt [4]{2} \arctan \left (\frac {x}{\sqrt [4]{2} \sqrt [4]{1+x^4}}\right )-\frac {\arctan \left (\frac {\sqrt [4]{2} x}{\sqrt [4]{1+x^4}}\right )}{2 \sqrt [4]{2}}+\text {arctanh}\left (\frac {x}{\sqrt [4]{1+x^4}}\right )-\sqrt [4]{2} \text {arctanh}\left (\frac {x}{\sqrt [4]{2} \sqrt [4]{1+x^4}}\right )-\frac {\text {arctanh}\left (\frac {\sqrt [4]{2} x}{\sqrt [4]{1+x^4}}\right )}{2 \sqrt [4]{2}} \]

[In]

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

[Out]

ArcTan[x/(1 + x^4)^(1/4)] - 2^(1/4)*ArcTan[x/(2^(1/4)*(1 + x^4)^(1/4))] - ArcTan[(2^(1/4)*x)/(1 + x^4)^(1/4)]/
(2*2^(1/4)) + ArcTanh[x/(1 + x^4)^(1/4)] - 2^(1/4)*ArcTanh[x/(2^(1/4)*(1 + x^4)^(1/4))] - ArcTanh[(2^(1/4)*x)/
(1 + x^4)^(1/4)]/(2*2^(1/4))

Maple [A] (verified)

Time = 3.43 (sec) , antiderivative size = 170, normalized size of antiderivative = 1.36

method result size
pseudoelliptic \(\arctan \left (\frac {2^{\frac {1}{4}} \left (x^{4}+1\right )^{\frac {1}{4}}}{x}\right ) 2^{\frac {1}{4}}-\frac {\ln \left (\frac {-x 2^{\frac {3}{4}}-2 \left (x^{4}+1\right )^{\frac {1}{4}}}{x 2^{\frac {3}{4}}-2 \left (x^{4}+1\right )^{\frac {1}{4}}}\right ) 2^{\frac {1}{4}}}{2}+\frac {\arctan \left (\frac {2^{\frac {3}{4}} \left (x^{4}+1\right )^{\frac {1}{4}}}{2 x}\right ) 2^{\frac {3}{4}}}{4}-\frac {\ln \left (\frac {-2^{\frac {1}{4}} x -\left (x^{4}+1\right )^{\frac {1}{4}}}{2^{\frac {1}{4}} x -\left (x^{4}+1\right )^{\frac {1}{4}}}\right ) 2^{\frac {3}{4}}}{8}+\frac {\ln \left (\frac {x +\left (x^{4}+1\right )^{\frac {1}{4}}}{x}\right )}{2}-\frac {\ln \left (\frac {\left (x^{4}+1\right )^{\frac {1}{4}}-x}{x}\right )}{2}-\arctan \left (\frac {\left (x^{4}+1\right )^{\frac {1}{4}}}{x}\right )\) \(170\)

[In]

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

[Out]

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

Fricas [C] (verification not implemented)

Result contains complex when optimal does not.

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

[In]

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

[Out]

-1/8*8^(3/4)*log((8^(1/4)*x + 2*(x^4 + 1)^(1/4))/x) + 1/8*8^(3/4)*log(-(8^(1/4)*x - 2*(x^4 + 1)^(1/4))/x) + 1/
8*I*8^(3/4)*log((I*8^(1/4)*x + 2*(x^4 + 1)^(1/4))/x) - 1/8*I*8^(3/4)*log((-I*8^(1/4)*x + 2*(x^4 + 1)^(1/4))/x)
 - 1/8*2^(3/4)*log((2^(1/4)*x + (x^4 + 1)^(1/4))/x) + 1/8*2^(3/4)*log(-(2^(1/4)*x - (x^4 + 1)^(1/4))/x) + 1/8*
I*2^(3/4)*log((I*2^(1/4)*x + (x^4 + 1)^(1/4))/x) - 1/8*I*2^(3/4)*log((-I*2^(1/4)*x + (x^4 + 1)^(1/4))/x) - arc
tan((x^4 + 1)^(1/4)/x) + 1/2*log((x + (x^4 + 1)^(1/4))/x) - 1/2*log(-(x - (x^4 + 1)^(1/4))/x)

Sympy [F]

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

[In]

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

[Out]

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

Maxima [F]

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

[In]

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

[Out]

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

Giac [F]

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

[In]

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

[Out]

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

Mupad [F(-1)]

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

[In]

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

[Out]

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