3.22.17 \(\int \frac {x}{1+\sqrt {x+\sqrt {1+x^2}}} \, dx\)

Optimal. Leaf size=153 \[ \frac {-12 x^3-3 x^2+\sqrt {x^2+1} \left (-12 x^2+\left (8 x^2+12 x-4\right ) \sqrt {\sqrt {x^2+1}+x}-3 x\right )+\left (8 x^3+12 x^2+4\right ) \sqrt {\sqrt {x^2+1}+x}-6 x}{24 \sqrt {x^2+1} x+12 \left (2 x^2+1\right )}-\tanh ^{-1}\left (\frac {\sqrt {\sqrt {x^2+1}+x}-1}{\sqrt {\sqrt {x^2+1}+x}+1}\right ) \]

________________________________________________________________________________________

Rubi [A]  time = 0.22, antiderivative size = 109, normalized size of antiderivative = 0.71, number of steps used = 13, number of rules used = 9, integrand size = 21, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.429, Rules used = {6742, 195, 215, 2117, 14, 2119, 448, 2122, 270} \begin {gather*} \frac {x^2}{4}-\frac {1}{4} \sqrt {x^2+1} x+\frac {1}{6} \left (\sqrt {x^2+1}+x\right )^{3/2}+\frac {1}{2} \sqrt {\sqrt {x^2+1}+x}-\frac {1}{2 \sqrt {\sqrt {x^2+1}+x}}-\frac {1}{6 \left (\sqrt {x^2+1}+x\right )^{3/2}}-\frac {x}{2}-\frac {1}{4} \sinh ^{-1}(x) \end {gather*}

Antiderivative was successfully verified.

[In]

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

[Out]

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

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 195

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

Rule 215

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

Rule 270

Int[((c_.)*(x_))^(m_.)*((a_) + (b_.)*(x_)^(n_))^(p_.), x_Symbol] :> Int[ExpandIntegrand[(c*x)^m*(a + b*x^n)^p,
 x], x] /; FreeQ[{a, b, c, m, n}, x] && IGtQ[p, 0]

Rule 448

Int[((e_.)*(x_))^(m_.)*((a_) + (b_.)*(x_)^(n_))^(p_.)*((c_) + (d_.)*(x_)^(n_))^(q_.), x_Symbol] :> Int[ExpandI
ntegrand[(e*x)^m*(a + b*x^n)^p*(c + d*x^n)^q, x], x] /; FreeQ[{a, b, c, d, e, m, n}, x] && NeQ[b*c - a*d, 0] &
& IGtQ[p, 0] && IGtQ[q, 0]

Rule 2117

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 2119

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 2122

Int[((g_) + (i_.)*(x_)^2)^(m_.)*((d_.) + (e_.)*(x_) + (f_.)*Sqrt[(a_) + (c_.)*(x_)^2])^(n_.), x_Symbol] :> Dis
t[(1*(i/c)^m)/(2^(2*m + 1)*e*f^(2*m)), Subst[Int[(x^n*(d^2 + a*f^2 - 2*d*x + x^2)^(2*m + 1))/(-d + x)^(2*(m +
1)), x], x, d + e*x + f*Sqrt[a + c*x^2]], x] /; FreeQ[{a, c, d, e, f, g, i, n}, x] && EqQ[e^2 - c*f^2, 0] && E
qQ[c*g - a*i, 0] && IntegerQ[2*m] && (IntegerQ[m] || GtQ[i/c, 0])

Rule 6742

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

Rubi steps

\begin {align*} \int \frac {x}{1+\sqrt {x+\sqrt {1+x^2}}} \, dx &=\int \left (-\frac {1}{2}+\frac {x}{2}-\frac {\sqrt {1+x^2}}{2}+\frac {1}{2} \sqrt {x+\sqrt {1+x^2}}-\frac {1}{2} x \sqrt {x+\sqrt {1+x^2}}+\frac {1}{2} \sqrt {1+x^2} \sqrt {x+\sqrt {1+x^2}}\right ) \, dx\\ &=-\frac {x}{2}+\frac {x^2}{4}-\frac {1}{2} \int \sqrt {1+x^2} \, dx+\frac {1}{2} \int \sqrt {x+\sqrt {1+x^2}} \, dx-\frac {1}{2} \int x \sqrt {x+\sqrt {1+x^2}} \, dx+\frac {1}{2} \int \sqrt {1+x^2} \sqrt {x+\sqrt {1+x^2}} \, dx\\ &=-\frac {x}{2}+\frac {x^2}{4}-\frac {1}{4} x \sqrt {1+x^2}-\frac {1}{8} \operatorname {Subst}\left (\int \frac {\left (-1+x^2\right ) \left (1+x^2\right )}{x^{5/2}} \, dx,x,x+\sqrt {1+x^2}\right )+\frac {1}{8} \operatorname {Subst}\left (\int \frac {\left (1+x^2\right )^2}{x^{5/2}} \, dx,x,x+\sqrt {1+x^2}\right )-\frac {1}{4} \int \frac {1}{\sqrt {1+x^2}} \, dx+\frac {1}{4} \operatorname {Subst}\left (\int \frac {1+x^2}{x^{3/2}} \, dx,x,x+\sqrt {1+x^2}\right )\\ &=-\frac {x}{2}+\frac {x^2}{4}-\frac {1}{4} x \sqrt {1+x^2}-\frac {1}{4} \sinh ^{-1}(x)-\frac {1}{8} \operatorname {Subst}\left (\int \left (-\frac {1}{x^{5/2}}+x^{3/2}\right ) \, dx,x,x+\sqrt {1+x^2}\right )+\frac {1}{8} \operatorname {Subst}\left (\int \left (\frac {1}{x^{5/2}}+\frac {2}{\sqrt {x}}+x^{3/2}\right ) \, dx,x,x+\sqrt {1+x^2}\right )+\frac {1}{4} \operatorname {Subst}\left (\int \left (\frac {1}{x^{3/2}}+\sqrt {x}\right ) \, dx,x,x+\sqrt {1+x^2}\right )\\ &=-\frac {x}{2}+\frac {x^2}{4}-\frac {1}{4} x \sqrt {1+x^2}-\frac {1}{6 \left (x+\sqrt {1+x^2}\right )^{3/2}}-\frac {1}{2 \sqrt {x+\sqrt {1+x^2}}}+\frac {1}{2} \sqrt {x+\sqrt {1+x^2}}+\frac {1}{6} \left (x+\sqrt {1+x^2}\right )^{3/2}-\frac {1}{4} \sinh ^{-1}(x)\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]  time = 1.06, size = 217, normalized size = 1.42 \begin {gather*} \frac {1}{60} \left (15 x^2-15 \sqrt {x^2+1} x-20 \left (\sqrt {x^2+1}-2 x\right ) \sqrt {\sqrt {x^2+1}+x}-\frac {4 \sqrt {x^2+1} \left (6 x^4+6 x^2+3 \sqrt {x^2+1} x+6 \sqrt {x^2+1} x^3+2\right )}{\sqrt {\sqrt {x^2+1}+x} \left (x^2+\sqrt {x^2+1} x+1\right )}+\frac {4 \sqrt {\sqrt {x^2+1}+x} \left (6 x^4+21 x^2+18 \sqrt {x^2+1} x+6 \sqrt {x^2+1} x^3+7\right )}{2 x^2+2 \sqrt {x^2+1} x+1}-30 x-15 \sinh ^{-1}(x)\right ) \end {gather*}

Antiderivative was successfully verified.

[In]

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

[Out]

(-30*x + 15*x^2 - 15*x*Sqrt[1 + x^2] - 20*(-2*x + Sqrt[1 + x^2])*Sqrt[x + Sqrt[1 + x^2]] - (4*Sqrt[1 + x^2]*(2
 + 6*x^2 + 6*x^4 + 3*x*Sqrt[1 + x^2] + 6*x^3*Sqrt[1 + x^2]))/(Sqrt[x + Sqrt[1 + x^2]]*(1 + x^2 + x*Sqrt[1 + x^
2])) + (4*Sqrt[x + Sqrt[1 + x^2]]*(7 + 21*x^2 + 6*x^4 + 18*x*Sqrt[1 + x^2] + 6*x^3*Sqrt[1 + x^2]))/(1 + 2*x^2
+ 2*x*Sqrt[1 + x^2]) - 15*ArcSinh[x])/60

________________________________________________________________________________________

IntegrateAlgebraic [A]  time = 0.27, size = 153, normalized size = 1.00 \begin {gather*} \frac {-6 x-3 x^2-12 x^3+\left (4+12 x^2+8 x^3\right ) \sqrt {x+\sqrt {1+x^2}}+\sqrt {1+x^2} \left (-3 x-12 x^2+\left (-4+12 x+8 x^2\right ) \sqrt {x+\sqrt {1+x^2}}\right )}{24 x \sqrt {1+x^2}+12 \left (1+2 x^2\right )}-\tanh ^{-1}\left (\frac {-1+\sqrt {x+\sqrt {1+x^2}}}{1+\sqrt {x+\sqrt {1+x^2}}}\right ) \end {gather*}

Antiderivative was successfully verified.

[In]

IntegrateAlgebraic[x/(1 + Sqrt[x + Sqrt[1 + x^2]]),x]

[Out]

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

________________________________________________________________________________________

fricas [A]  time = 0.57, size = 66, normalized size = 0.43 \begin {gather*} \frac {1}{4} \, x^{2} - \frac {1}{3} \, {\left (x^{2} - \sqrt {x^{2} + 1} {\left (x - 1\right )} - 2 \, x - 1\right )} \sqrt {x + \sqrt {x^{2} + 1}} - \frac {1}{4} \, \sqrt {x^{2} + 1} x - \frac {1}{2} \, x - \frac {1}{2} \, \log \left (\sqrt {x + \sqrt {x^{2} + 1}}\right ) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

giac [F]  time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \frac {x}{\sqrt {x + \sqrt {x^{2} + 1}} + 1}\,{d x} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

maple [F]  time = 0.02, size = 0, normalized size = 0.00 \[\int \frac {x}{1+\sqrt {x +\sqrt {x^{2}+1}}}\, dx\]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

maxima [F]  time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \frac {x}{\sqrt {x + \sqrt {x^{2} + 1}} + 1}\,{d x} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

mupad [F]  time = 0.00, size = -1, normalized size = -0.01 \begin {gather*} \int \frac {x}{\sqrt {x+\sqrt {x^2+1}}+1} \,d x \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

sympy [F]  time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \frac {x}{\sqrt {x + \sqrt {x^{2} + 1}} + 1}\, dx \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________