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

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

Optimal result

Integrand size = 24, antiderivative size = 114 \[ \int \frac {1+x^4}{x^4 \sqrt {x+\sqrt {1+x^2}}} \, dx=\frac {-8-57 x^2+48 x^4+456 x^6+384 x^8+\sqrt {1+x^2} \left (-30 x-36 x^3+264 x^5+384 x^7\right )}{24 x^3 \left (x+\sqrt {1+x^2}\right )^{9/2}}-\frac {1}{8} \arctan \left (\sqrt {x+\sqrt {1+x^2}}\right )-\frac {1}{8} \text {arctanh}\left (\sqrt {x+\sqrt {1+x^2}}\right ) \]

[Out]

1/24*(-8-57*x^2+48*x^4+456*x^6+384*x^8+(x^2+1)^(1/2)*(384*x^7+264*x^5-36*x^3-30*x))/x^3/(x+(x^2+1)^(1/2))^(9/2
)-1/8*arctan((x+(x^2+1)^(1/2))^(1/2))-1/8*arctanh((x+(x^2+1)^(1/2))^(1/2))

Rubi [A] (verified)

Time = 0.23 (sec) , antiderivative size = 141, normalized size of antiderivative = 1.24, number of steps used = 13, number of rules used = 11, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.458, Rules used = {6874, 2142, 14, 2144, 468, 294, 296, 335, 218, 212, 209} \[ \int \frac {1+x^4}{x^4 \sqrt {x+\sqrt {1+x^2}}} \, dx=-\frac {1}{8} \arctan \left (\sqrt {\sqrt {x^2+1}+x}\right )-\frac {1}{8} \text {arctanh}\left (\sqrt {\sqrt {x^2+1}+x}\right )+\sqrt {\sqrt {x^2+1}+x}+\frac {1}{24 x \sqrt {\sqrt {x^2+1}+x}}+\frac {1}{12 x^2 \left (\sqrt {x^2+1}+x\right )^{3/2}}-\frac {1}{3 \left (\sqrt {x^2+1}+x\right )^{3/2}}-\frac {1}{3 x^3 \sqrt {\sqrt {x^2+1}+x}} \]

[In]

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

[Out]

-1/3*1/(x + Sqrt[1 + x^2])^(3/2) + 1/(12*x^2*(x + Sqrt[1 + x^2])^(3/2)) - 1/(3*x^3*Sqrt[x + Sqrt[1 + x^2]]) +
1/(24*x*Sqrt[x + Sqrt[1 + x^2]]) + Sqrt[x + Sqrt[1 + x^2]] - ArcTan[Sqrt[x + Sqrt[1 + x^2]]]/8 - ArcTanh[Sqrt[
x + Sqrt[1 + x^2]]]/8

Rule 14

Int[(u_)*((c_.)*(x_))^(m_.), x_Symbol] :> Int[ExpandIntegrand[(c*x)^m*u, x], x] /; FreeQ[{c, m}, x] && SumQ[u]
 &&  !LinearQ[u, x] &&  !MatchQ[u, (a_) + (b_.)*(v_) /; FreeQ[{a, b}, x] && InverseFunctionQ[v]]

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 294

Int[((c_.)*(x_))^(m_.)*((a_) + (b_.)*(x_)^(n_))^(p_), x_Symbol] :> Simp[c^(n - 1)*(c*x)^(m - n + 1)*((a + b*x^
n)^(p + 1)/(b*n*(p + 1))), x] - Dist[c^n*((m - n + 1)/(b*n*(p + 1))), Int[(c*x)^(m - n)*(a + b*x^n)^(p + 1), x
], x] /; FreeQ[{a, b, c}, x] && IGtQ[n, 0] && LtQ[p, -1] && GtQ[m + 1, n] &&  !ILtQ[(m + n*(p + 1) + 1)/n, 0]
&& IntBinomialQ[a, b, c, n, m, p, x]

Rule 296

Int[((c_.)*(x_))^(m_.)*((a_) + (b_.)*(x_)^(n_))^(p_), x_Symbol] :> Simp[(-(c*x)^(m + 1))*((a + b*x^n)^(p + 1)/
(a*c*n*(p + 1))), x] + Dist[(m + n*(p + 1) + 1)/(a*n*(p + 1)), Int[(c*x)^m*(a + b*x^n)^(p + 1), x], x] /; Free
Q[{a, b, c, m}, x] && IGtQ[n, 0] && LtQ[p, -1] && IntBinomialQ[a, b, c, n, m, p, x]

Rule 335

Int[((c_.)*(x_))^(m_)*((a_) + (b_.)*(x_)^(n_))^(p_), x_Symbol] :> With[{k = Denominator[m]}, Dist[k/c, Subst[I
nt[x^(k*(m + 1) - 1)*(a + b*(x^(k*n)/c^n))^p, x], x, (c*x)^(1/k)], x]] /; FreeQ[{a, b, c, p}, x] && IGtQ[n, 0]
 && FractionQ[m] && IntBinomialQ[a, b, c, n, m, p, x]

Rule 468

Int[((e_.)*(x_))^(m_.)*((a_) + (b_.)*(x_)^(n_))^(p_.)*((c_) + (d_.)*(x_)^(n_)), x_Symbol] :> Simp[(-(b*c - a*d
))*(e*x)^(m + 1)*((a + b*x^n)^(p + 1)/(a*b*e*n*(p + 1))), x] - Dist[(a*d*(m + 1) - b*c*(m + n*(p + 1) + 1))/(a
*b*n*(p + 1)), Int[(e*x)^m*(a + b*x^n)^(p + 1), x], x] /; FreeQ[{a, b, c, d, e, m, n}, x] && NeQ[b*c - a*d, 0]
 && LtQ[p, -1] && (( !IntegerQ[p + 1/2] && NeQ[p, -5/4]) ||  !RationalQ[m] || (IGtQ[n, 0] && ILtQ[p + 1/2, 0]
&& LeQ[-1, m, (-n)*(p + 1)]))

Rule 2142

Int[((g_.) + (h_.)*((d_.) + (e_.)*(x_) + (f_.)*Sqrt[(a_) + (c_.)*(x_)^2])^(n_))^(p_.), x_Symbol] :> Dist[1/(2*
e), Subst[Int[(g + h*x^n)^p*((d^2 + a*f^2 - 2*d*x + x^2)/(d - x)^2), x], x, d + e*x + f*Sqrt[a + c*x^2]], x] /
; FreeQ[{a, c, d, e, f, g, h, n}, x] && EqQ[e^2 - c*f^2, 0] && IntegerQ[p]

Rule 2144

Int[((g_.) + (h_.)*(x_))^(m_.)*((e_.)*(x_) + (f_.)*Sqrt[(a_.) + (c_.)*(x_)^2])^(n_.), x_Symbol] :> Dist[1/(2^(
m + 1)*e^(m + 1)), Subst[Int[x^(n - m - 2)*(a*f^2 + x^2)*((-a)*f^2*h + 2*e*g*x + h*x^2)^m, x], x, e*x + f*Sqrt
[a + c*x^2]], x] /; FreeQ[{a, c, e, f, g, h, n}, x] && EqQ[e^2 - c*f^2, 0] && IntegerQ[m]

Rule 6874

Int[u_, x_Symbol] :> With[{v = ExpandIntegrand[u, x]}, Int[v, x] /; SumQ[v]]

Rubi steps \begin{align*} \text {integral}& = \int \left (\frac {1}{\sqrt {x+\sqrt {1+x^2}}}+\frac {1}{x^4 \sqrt {x+\sqrt {1+x^2}}}\right ) \, dx \\ & = \int \frac {1}{\sqrt {x+\sqrt {1+x^2}}} \, dx+\int \frac {1}{x^4 \sqrt {x+\sqrt {1+x^2}}} \, dx \\ & = \frac {1}{2} \text {Subst}\left (\int \frac {1+x^2}{x^{5/2}} \, dx,x,x+\sqrt {1+x^2}\right )+8 \text {Subst}\left (\int \frac {x^{3/2} \left (1+x^2\right )}{\left (-1+x^2\right )^4} \, dx,x,x+\sqrt {1+x^2}\right ) \\ & = -\frac {1}{3 x^3 \sqrt {x+\sqrt {1+x^2}}}+\frac {1}{2} \text {Subst}\left (\int \left (\frac {1}{x^{5/2}}+\frac {1}{\sqrt {x}}\right ) \, dx,x,x+\sqrt {1+x^2}\right )-\frac {4}{3} \text {Subst}\left (\int \frac {x^{3/2}}{\left (-1+x^2\right )^3} \, dx,x,x+\sqrt {1+x^2}\right ) \\ & = -\frac {1}{3 \left (x+\sqrt {1+x^2}\right )^{3/2}}+\frac {1}{12 x^2 \left (x+\sqrt {1+x^2}\right )^{3/2}}-\frac {1}{3 x^3 \sqrt {x+\sqrt {1+x^2}}}+\sqrt {x+\sqrt {1+x^2}}-\frac {1}{6} \text {Subst}\left (\int \frac {1}{\sqrt {x} \left (-1+x^2\right )^2} \, dx,x,x+\sqrt {1+x^2}\right ) \\ & = -\frac {1}{3 \left (x+\sqrt {1+x^2}\right )^{3/2}}+\frac {1}{12 x^2 \left (x+\sqrt {1+x^2}\right )^{3/2}}-\frac {1}{3 x^3 \sqrt {x+\sqrt {1+x^2}}}+\frac {1}{24 x \sqrt {x+\sqrt {1+x^2}}}+\sqrt {x+\sqrt {1+x^2}}+\frac {1}{8} \text {Subst}\left (\int \frac {1}{\sqrt {x} \left (-1+x^2\right )} \, dx,x,x+\sqrt {1+x^2}\right ) \\ & = -\frac {1}{3 \left (x+\sqrt {1+x^2}\right )^{3/2}}+\frac {1}{12 x^2 \left (x+\sqrt {1+x^2}\right )^{3/2}}-\frac {1}{3 x^3 \sqrt {x+\sqrt {1+x^2}}}+\frac {1}{24 x \sqrt {x+\sqrt {1+x^2}}}+\sqrt {x+\sqrt {1+x^2}}+\frac {1}{4} \text {Subst}\left (\int \frac {1}{-1+x^4} \, dx,x,\sqrt {x+\sqrt {1+x^2}}\right ) \\ & = -\frac {1}{3 \left (x+\sqrt {1+x^2}\right )^{3/2}}+\frac {1}{12 x^2 \left (x+\sqrt {1+x^2}\right )^{3/2}}-\frac {1}{3 x^3 \sqrt {x+\sqrt {1+x^2}}}+\frac {1}{24 x \sqrt {x+\sqrt {1+x^2}}}+\sqrt {x+\sqrt {1+x^2}}-\frac {1}{8} \text {Subst}\left (\int \frac {1}{1-x^2} \, dx,x,\sqrt {x+\sqrt {1+x^2}}\right )-\frac {1}{8} \text {Subst}\left (\int \frac {1}{1+x^2} \, dx,x,\sqrt {x+\sqrt {1+x^2}}\right ) \\ & = -\frac {1}{3 \left (x+\sqrt {1+x^2}\right )^{3/2}}+\frac {1}{12 x^2 \left (x+\sqrt {1+x^2}\right )^{3/2}}-\frac {1}{3 x^3 \sqrt {x+\sqrt {1+x^2}}}+\frac {1}{24 x \sqrt {x+\sqrt {1+x^2}}}+\sqrt {x+\sqrt {1+x^2}}-\frac {1}{8} \arctan \left (\sqrt {x+\sqrt {1+x^2}}\right )-\frac {1}{8} \text {arctanh}\left (\sqrt {x+\sqrt {1+x^2}}\right ) \\ \end{align*}

Mathematica [A] (verified)

Time = 0.19 (sec) , antiderivative size = 111, normalized size of antiderivative = 0.97 \[ \int \frac {1+x^4}{x^4 \sqrt {x+\sqrt {1+x^2}}} \, dx=\frac {1}{24} \left (\frac {-8-57 x^2+48 x^4+456 x^6+384 x^8+6 x \sqrt {1+x^2} \left (-5-6 x^2+44 x^4+64 x^6\right )}{x^3 \left (x+\sqrt {1+x^2}\right )^{9/2}}-3 \arctan \left (\sqrt {x+\sqrt {1+x^2}}\right )-3 \text {arctanh}\left (\sqrt {x+\sqrt {1+x^2}}\right )\right ) \]

[In]

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

[Out]

((-8 - 57*x^2 + 48*x^4 + 456*x^6 + 384*x^8 + 6*x*Sqrt[1 + x^2]*(-5 - 6*x^2 + 44*x^4 + 64*x^6))/(x^3*(x + Sqrt[
1 + x^2])^(9/2)) - 3*ArcTan[Sqrt[x + Sqrt[1 + x^2]]] - 3*ArcTanh[Sqrt[x + Sqrt[1 + x^2]]])/24

Maple [C] (verified)

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

Time = 0.05 (sec) , antiderivative size = 84, normalized size of antiderivative = 0.74

method result size
meijerg \(-\frac {\sqrt {2}\, \operatorname {hypergeom}\left (\left [\frac {1}{4}, \frac {3}{4}, \frac {7}{4}\right ], \left [\frac {3}{2}, \frac {11}{4}\right ], -\frac {1}{x^{2}}\right )}{7 x^{\frac {7}{2}}}-\frac {-\frac {32 \sqrt {\pi }\, \sqrt {2}\, \cosh \left (\frac {3 \,\operatorname {arcsinh}\left (\frac {1}{x}\right )}{2}\right )}{3 x^{\frac {3}{2}}}-\frac {8 \sqrt {\pi }\, \sqrt {2}\, x^{\frac {3}{2}} \left (-\frac {4}{3 x^{4}}-\frac {2}{3 x^{2}}+\frac {2}{3}\right ) \sinh \left (\frac {3 \,\operatorname {arcsinh}\left (\frac {1}{x}\right )}{2}\right )}{\sqrt {1+\frac {1}{x^{2}}}}}{8 \sqrt {\pi }}\) \(84\)

[In]

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

[Out]

-1/7*2^(1/2)/x^(7/2)*hypergeom([1/4,3/4,7/4],[3/2,11/4],-1/x^2)-1/8/Pi^(1/2)*(-32/3*Pi^(1/2)*2^(1/2)/x^(3/2)*c
osh(3/2*arcsinh(1/x))-8*Pi^(1/2)*2^(1/2)*x^(3/2)*(-4/3/x^4-2/3/x^2+2/3)*sinh(3/2*arcsinh(1/x))/(1+1/x^2)^(1/2)
)

Fricas [A] (verification not implemented)

none

Time = 0.27 (sec) , antiderivative size = 109, normalized size of antiderivative = 0.96 \[ \int \frac {1+x^4}{x^4 \sqrt {x+\sqrt {1+x^2}}} \, dx=-\frac {6 \, x^{3} \arctan \left (\sqrt {x + \sqrt {x^{2} + 1}}\right ) + 3 \, x^{3} \log \left (\sqrt {x + \sqrt {x^{2} + 1}} + 1\right ) - 3 \, x^{3} \log \left (\sqrt {x + \sqrt {x^{2} + 1}} - 1\right ) + 2 \, {\left (16 \, x^{5} - 19 \, x^{3} - {\left (16 \, x^{4} - 3 \, x^{2} - 8\right )} \sqrt {x^{2} + 1} - 10 \, x\right )} \sqrt {x + \sqrt {x^{2} + 1}}}{48 \, x^{3}} \]

[In]

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

[Out]

-1/48*(6*x^3*arctan(sqrt(x + sqrt(x^2 + 1))) + 3*x^3*log(sqrt(x + sqrt(x^2 + 1)) + 1) - 3*x^3*log(sqrt(x + sqr
t(x^2 + 1)) - 1) + 2*(16*x^5 - 19*x^3 - (16*x^4 - 3*x^2 - 8)*sqrt(x^2 + 1) - 10*x)*sqrt(x + sqrt(x^2 + 1)))/x^
3

Sympy [C] (verification not implemented)

Result contains complex when optimal does not.

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

[In]

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

[Out]

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

Maxima [F]

\[ \int \frac {1+x^4}{x^4 \sqrt {x+\sqrt {1+x^2}}} \, dx=\int { \frac {x^{4} + 1}{\sqrt {x + \sqrt {x^{2} + 1}} x^{4}} \,d x } \]

[In]

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

[Out]

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

Giac [F]

\[ \int \frac {1+x^4}{x^4 \sqrt {x+\sqrt {1+x^2}}} \, dx=\int { \frac {x^{4} + 1}{\sqrt {x + \sqrt {x^{2} + 1}} x^{4}} \,d x } \]

[In]

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

[Out]

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

Mupad [F(-1)]

Timed out. \[ \int \frac {1+x^4}{x^4 \sqrt {x+\sqrt {1+x^2}}} \, dx=\int \frac {x^4+1}{x^4\,\sqrt {x+\sqrt {x^2+1}}} \,d x \]

[In]

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

[Out]

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