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

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

Optimal result

Integrand size = 26, antiderivative size = 26 \[ \int \frac {\left (-1+x^4\right ) \left (1+x^2+x^4\right )}{x^4 \sqrt {1+x^4}} \, dx=\frac {\sqrt {1+x^4} \left (1+3 x^2+x^4\right )}{3 x^3} \]

[Out]

1/3*(x^4+1)^(1/2)*(x^4+3*x^2+1)/x^3

Rubi [A] (verified)

Time = 0.08 (sec) , antiderivative size = 44, normalized size of antiderivative = 1.69, number of steps used = 5, number of rules used = 4, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.154, Rules used = {1849, 1600, 1598, 391} \[ \int \frac {\left (-1+x^4\right ) \left (1+x^2+x^4\right )}{x^4 \sqrt {1+x^4}} \, dx=\frac {1}{3} \sqrt {x^4+1} x+\frac {\sqrt {x^4+1}}{x}+\frac {\sqrt {x^4+1}}{3 x^3} \]

[In]

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

[Out]

Sqrt[1 + x^4]/(3*x^3) + Sqrt[1 + x^4]/x + (x*Sqrt[1 + x^4])/3

Rule 391

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

Rule 1598

Int[(u_.)*(x_)^(m_.)*((a_.)*(x_)^(p_.) + (b_.)*(x_)^(q_.))^(n_.), x_Symbol] :> Int[u*x^(m + n*p)*(a + b*x^(q -
 p))^n, x] /; FreeQ[{a, b, m, p, q}, x] && IntegerQ[n] && PosQ[q - p]

Rule 1600

Int[(u_.)*(Px_)^(p_.)*(Qx_)^(q_.), x_Symbol] :> Int[u*PolynomialQuotient[Px, Qx, x]^p*Qx^(p + q), x] /; FreeQ[
q, x] && PolyQ[Px, x] && PolyQ[Qx, x] && EqQ[PolynomialRemainder[Px, Qx, x], 0] && IntegerQ[p] && LtQ[p*q, 0]

Rule 1849

Int[(Pq_)*((c_.)*(x_))^(m_)*((a_) + (b_.)*(x_)^(n_))^(p_), x_Symbol] :> With[{Pq0 = Coeff[Pq, x, 0]}, Simp[Pq0
*(c*x)^(m + 1)*((a + b*x^n)^(p + 1)/(a*c*(m + 1))), x] + Dist[1/(2*a*c*(m + 1)), Int[(c*x)^(m + 1)*ExpandToSum
[2*a*(m + 1)*((Pq - Pq0)/x) - 2*b*Pq0*(m + n*(p + 1) + 1)*x^(n - 1), x]*(a + b*x^n)^p, x], x] /; NeQ[Pq0, 0]]
/; FreeQ[{a, b, c, p}, x] && PolyQ[Pq, x] && IGtQ[n, 0] && LtQ[m, -1] && LeQ[n - 1, Expon[Pq, x]]

Rubi steps \begin{align*} \text {integral}& = \frac {\sqrt {1+x^4}}{3 x^3}-\frac {1}{6} \int \frac {6 x-2 x^3-6 x^5-6 x^7}{x^3 \sqrt {1+x^4}} \, dx \\ & = \frac {\sqrt {1+x^4}}{3 x^3}-\frac {1}{6} \int \frac {6-2 x^2-6 x^4-6 x^6}{x^2 \sqrt {1+x^4}} \, dx \\ & = \frac {\sqrt {1+x^4}}{3 x^3}+\frac {\sqrt {1+x^4}}{x}+\frac {1}{12} \int \frac {4 x+12 x^5}{x \sqrt {1+x^4}} \, dx \\ & = \frac {\sqrt {1+x^4}}{3 x^3}+\frac {\sqrt {1+x^4}}{x}+\frac {1}{12} \int \frac {4+12 x^4}{\sqrt {1+x^4}} \, dx \\ & = \frac {\sqrt {1+x^4}}{3 x^3}+\frac {\sqrt {1+x^4}}{x}+\frac {1}{3} x \sqrt {1+x^4} \\ \end{align*}

Mathematica [A] (verified)

Time = 0.44 (sec) , antiderivative size = 26, normalized size of antiderivative = 1.00 \[ \int \frac {\left (-1+x^4\right ) \left (1+x^2+x^4\right )}{x^4 \sqrt {1+x^4}} \, dx=\frac {\sqrt {1+x^4} \left (1+3 x^2+x^4\right )}{3 x^3} \]

[In]

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

[Out]

(Sqrt[1 + x^4]*(1 + 3*x^2 + x^4))/(3*x^3)

Maple [A] (verified)

Time = 0.85 (sec) , antiderivative size = 23, normalized size of antiderivative = 0.88

method result size
gosper \(\frac {\sqrt {x^{4}+1}\, \left (x^{4}+3 x^{2}+1\right )}{3 x^{3}}\) \(23\)
trager \(\frac {\sqrt {x^{4}+1}\, \left (x^{4}+3 x^{2}+1\right )}{3 x^{3}}\) \(23\)
pseudoelliptic \(\frac {\sqrt {x^{4}+1}\, \left (x^{4}+3 x^{2}+1\right )}{3 x^{3}}\) \(23\)
risch \(\frac {x^{8}+3 x^{6}+2 x^{4}+3 x^{2}+1}{3 x^{3} \sqrt {x^{4}+1}}\) \(33\)
default \(\frac {\sqrt {x^{4}+1}\, x}{3}+\frac {\sqrt {x^{4}+1}}{3 x^{3}}+\frac {\sqrt {x^{4}+1}}{x}\) \(35\)
elliptic \(\frac {\left (\frac {\sqrt {2}\, \left (x^{4}+1\right )^{\frac {3}{2}}}{3 x^{3}}+\frac {\sqrt {2}\, \sqrt {x^{4}+1}}{x}\right ) \sqrt {2}}{2}\) \(36\)
meijerg \(\frac {x^{5} \operatorname {hypergeom}\left (\left [\frac {1}{2}, \frac {5}{4}\right ], \left [\frac {9}{4}\right ], -x^{4}\right )}{5}+\frac {x^{3} \operatorname {hypergeom}\left (\left [\frac {1}{2}, \frac {3}{4}\right ], \left [\frac {7}{4}\right ], -x^{4}\right )}{3}+\frac {\operatorname {hypergeom}\left (\left [-\frac {3}{4}, \frac {1}{2}\right ], \left [\frac {1}{4}\right ], -x^{4}\right )}{3 x^{3}}+\frac {\operatorname {hypergeom}\left (\left [-\frac {1}{4}, \frac {1}{2}\right ], \left [\frac {3}{4}\right ], -x^{4}\right )}{x}\) \(65\)

[In]

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

[Out]

1/3*(x^4+1)^(1/2)*(x^4+3*x^2+1)/x^3

Fricas [A] (verification not implemented)

none

Time = 0.25 (sec) , antiderivative size = 22, normalized size of antiderivative = 0.85 \[ \int \frac {\left (-1+x^4\right ) \left (1+x^2+x^4\right )}{x^4 \sqrt {1+x^4}} \, dx=\frac {{\left (x^{4} + 3 \, x^{2} + 1\right )} \sqrt {x^{4} + 1}}{3 \, x^{3}} \]

[In]

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

[Out]

1/3*(x^4 + 3*x^2 + 1)*sqrt(x^4 + 1)/x^3

Sympy [C] (verification not implemented)

Result contains complex when optimal does not.

Time = 1.57 (sec) , antiderivative size = 126, normalized size of antiderivative = 4.85 \[ \int \frac {\left (-1+x^4\right ) \left (1+x^2+x^4\right )}{x^4 \sqrt {1+x^4}} \, dx=\frac {x^{5} \Gamma \left (\frac {5}{4}\right ) {{}_{2}F_{1}\left (\begin {matrix} \frac {1}{2}, \frac {5}{4} \\ \frac {9}{4} \end {matrix}\middle | {x^{4} e^{i \pi }} \right )}}{4 \Gamma \left (\frac {9}{4}\right )} + \frac {x^{3} \Gamma \left (\frac {3}{4}\right ) {{}_{2}F_{1}\left (\begin {matrix} \frac {1}{2}, \frac {3}{4} \\ \frac {7}{4} \end {matrix}\middle | {x^{4} e^{i \pi }} \right )}}{4 \Gamma \left (\frac {7}{4}\right )} - \frac {\Gamma \left (- \frac {1}{4}\right ) {{}_{2}F_{1}\left (\begin {matrix} - \frac {1}{4}, \frac {1}{2} \\ \frac {3}{4} \end {matrix}\middle | {x^{4} e^{i \pi }} \right )}}{4 x \Gamma \left (\frac {3}{4}\right )} - \frac {\Gamma \left (- \frac {3}{4}\right ) {{}_{2}F_{1}\left (\begin {matrix} - \frac {3}{4}, \frac {1}{2} \\ \frac {1}{4} \end {matrix}\middle | {x^{4} e^{i \pi }} \right )}}{4 x^{3} \Gamma \left (\frac {1}{4}\right )} \]

[In]

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

[Out]

x**5*gamma(5/4)*hyper((1/2, 5/4), (9/4,), x**4*exp_polar(I*pi))/(4*gamma(9/4)) + x**3*gamma(3/4)*hyper((1/2, 3
/4), (7/4,), x**4*exp_polar(I*pi))/(4*gamma(7/4)) - gamma(-1/4)*hyper((-1/4, 1/2), (3/4,), x**4*exp_polar(I*pi
))/(4*x*gamma(3/4)) - gamma(-3/4)*hyper((-3/4, 1/2), (1/4,), x**4*exp_polar(I*pi))/(4*x**3*gamma(1/4))

Maxima [A] (verification not implemented)

none

Time = 0.31 (sec) , antiderivative size = 22, normalized size of antiderivative = 0.85 \[ \int \frac {\left (-1+x^4\right ) \left (1+x^2+x^4\right )}{x^4 \sqrt {1+x^4}} \, dx=\frac {{\left (x^{4} + 3 \, x^{2} + 1\right )} \sqrt {x^{4} + 1}}{3 \, x^{3}} \]

[In]

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

[Out]

1/3*(x^4 + 3*x^2 + 1)*sqrt(x^4 + 1)/x^3

Giac [F]

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

[In]

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

[Out]

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

Mupad [B] (verification not implemented)

Time = 5.13 (sec) , antiderivative size = 25, normalized size of antiderivative = 0.96 \[ \int \frac {\left (-1+x^4\right ) \left (1+x^2+x^4\right )}{x^4 \sqrt {1+x^4}} \, dx=\frac {{\left (x^4+1\right )}^{3/2}+3\,x^2\,\sqrt {x^4+1}}{3\,x^3} \]

[In]

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

[Out]

((x^4 + 1)^(3/2) + 3*x^2*(x^4 + 1)^(1/2))/(3*x^3)