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

Optimal. Leaf size=154 \[ \frac {5}{4} \log \left (\sqrt {x^2+1}+x\right )-4 \log \left (\sqrt {\sqrt {x^2+1}+x}+1\right )+\frac {-24 x^3+214 x^2+\sqrt {x^2+1} \left (-24 x^2+\left (16 x^2+72 x+40\right ) \sqrt {\sqrt {x^2+1}+x}+214 x-24\right )+\left (16 x^3+72 x^2+48 x+40\right ) \sqrt {\sqrt {x^2+1}+x}-36 x+104}{48 \sqrt {x^2+1} x+24 \left (2 x^2+1\right )} \]

________________________________________________________________________________________

Rubi [A]  time = 0.72, antiderivative size = 208, normalized size of antiderivative = 1.35, number of steps used = 32, number of rules used = 22, integrand size = 31, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.710, Rules used = {6742, 2117, 1821, 1620, 195, 215, 266, 50, 63, 207, 14, 2122, 270, 2120, 462, 459, 329, 298, 203, 206, 466, 461} \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 {\sqrt {x^2+1}}{2}+\frac {3}{2} \sqrt {\sqrt {x^2+1}+x}+\frac {3}{2 \sqrt {\sqrt {x^2+1}+x}}-\frac {1}{2 \left (\sqrt {x^2+1}+x\right )}+\frac {1}{6 \left (\sqrt {x^2+1}+x\right )^{3/2}}+\frac {1}{2} \log \left (\sqrt {x^2+1}+x\right )-2 \log \left (\sqrt {\sqrt {x^2+1}+x}+1\right )+\frac {1}{2} \tanh ^{-1}\left (\sqrt {x^2+1}\right )-2 \tanh ^{-1}\left (\sqrt {\sqrt {x^2+1}+x}\right )-\frac {\log (x)}{2}+\frac {1}{4} \sinh ^{-1}(x) \end {gather*}

Antiderivative was successfully verified.

[In]

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

[Out]

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

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 50

Int[((a_.) + (b_.)*(x_))^(m_)*((c_.) + (d_.)*(x_))^(n_), x_Symbol] :> Simp[((a + b*x)^(m + 1)*(c + d*x)^n)/(b*
(m + n + 1)), x] + Dist[(n*(b*c - a*d))/(b*(m + n + 1)), Int[(a + b*x)^m*(c + d*x)^(n - 1), x], x] /; FreeQ[{a
, b, c, d}, x] && NeQ[b*c - a*d, 0] && GtQ[n, 0] && NeQ[m + n + 1, 0] &&  !(IGtQ[m, 0] && ( !IntegerQ[n] || (G
tQ[m, 0] && LtQ[m - n, 0]))) &&  !ILtQ[m + n + 2, 0] && IntLinearQ[a, b, c, d, m, n, x]

Rule 63

Int[((a_.) + (b_.)*(x_))^(m_)*((c_.) + (d_.)*(x_))^(n_), x_Symbol] :> With[{p = Denominator[m]}, Dist[p/b, Sub
st[Int[x^(p*(m + 1) - 1)*(c - (a*d)/b + (d*x^p)/b)^n, x], x, (a + b*x)^(1/p)], x]] /; FreeQ[{a, b, c, d}, x] &
& NeQ[b*c - a*d, 0] && LtQ[-1, m, 0] && LeQ[-1, n, 0] && LeQ[Denominator[n], Denominator[m]] && IntLinearQ[a,
b, c, d, m, n, x]

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 203

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

Rule 206

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

Rule 207

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

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 266

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

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 298

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

Rule 329

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 459

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

Rule 461

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

Rule 462

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

Rule 466

Int[((e_.)*(x_))^(m_)*((a_) + (b_.)*(x_)^(n_))^(p_)*((c_) + (d_.)*(x_)^(n_))^(q_), x_Symbol] :> With[{k = Deno
minator[m]}, Dist[k/e, Subst[Int[x^(k*(m + 1) - 1)*(a + (b*x^(k*n))/e^n)^p*(c + (d*x^(k*n))/e^n)^q, x], x, (e*
x)^(1/k)], x]] /; FreeQ[{a, b, c, d, e, p, q}, x] && NeQ[b*c - a*d, 0] && IGtQ[n, 0] && FractionQ[m] && Intege
rQ[p]

Rule 1620

Int[(Px_)*((a_.) + (b_.)*(x_))^(m_.)*((c_.) + (d_.)*(x_))^(n_.), x_Symbol] :> Int[ExpandIntegrand[Px*(a + b*x)
^m*(c + d*x)^n, x], x] /; FreeQ[{a, b, c, d, m, n}, x] && PolyQ[Px, x] && (IntegersQ[m, n] || IGtQ[m, -2]) &&
GtQ[Expon[Px, x], 2]

Rule 1821

Int[(Pq_)*(x_)^(m_.)*((a_) + (b_.)*(x_)^(n_))^(p_.), x_Symbol] :> Dist[1/n, Subst[Int[x^(Simplify[(m + 1)/n] -
 1)*SubstFor[x^n, Pq, x]*(a + b*x)^p, x], x, x^n], x] /; FreeQ[{a, b, m, n, p}, x] && PolyQ[Pq, x^n] && Intege
rQ[Simplify[(m + 1)/n]]

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 2120

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

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 {1+\sqrt {1+x^2}}{1+\sqrt {x+\sqrt {1+x^2}}} \, dx &=\int \left (\frac {1}{1+\sqrt {x+\sqrt {1+x^2}}}+\frac {\sqrt {1+x^2}}{1+\sqrt {x+\sqrt {1+x^2}}}\right ) \, dx\\ &=\int \frac {1}{1+\sqrt {x+\sqrt {1+x^2}}} \, dx+\int \frac {\sqrt {1+x^2}}{1+\sqrt {x+\sqrt {1+x^2}}} \, dx\\ &=\frac {1}{2} \operatorname {Subst}\left (\int \frac {1+x^2}{\left (1+\sqrt {x}\right ) x^2} \, dx,x,x+\sqrt {1+x^2}\right )+\int \left (\frac {\sqrt {1+x^2}}{2}-\frac {\sqrt {1+x^2}}{2 x}-\frac {1+x^2}{2 x}-\frac {1}{2} \sqrt {1+x^2} \sqrt {x+\sqrt {1+x^2}}+\frac {\sqrt {1+x^2} \sqrt {x+\sqrt {1+x^2}}}{2 x}+\frac {\left (1+x^2\right ) \sqrt {x+\sqrt {1+x^2}}}{2 x}\right ) \, dx\\ &=\frac {1}{2} \int \sqrt {1+x^2} \, dx-\frac {1}{2} \int \frac {\sqrt {1+x^2}}{x} \, dx-\frac {1}{2} \int \frac {1+x^2}{x} \, dx-\frac {1}{2} \int \sqrt {1+x^2} \sqrt {x+\sqrt {1+x^2}} \, dx+\frac {1}{2} \int \frac {\sqrt {1+x^2} \sqrt {x+\sqrt {1+x^2}}}{x} \, dx+\frac {1}{2} \int \frac {\left (1+x^2\right ) \sqrt {x+\sqrt {1+x^2}}}{x} \, dx+\operatorname {Subst}\left (\int \frac {1+x^4}{x^3 (1+x)} \, dx,x,\sqrt {x+\sqrt {1+x^2}}\right )\\ &=\frac {1}{4} x \sqrt {1+x^2}-\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}{8} \operatorname {Subst}\left (\int \frac {\left (1+x^2\right )^3}{x^{5/2} \left (-1+x^2\right )} \, 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 {\sqrt {1+x}}{x} \, dx,x,x^2\right )+\frac {1}{4} \operatorname {Subst}\left (\int \frac {\left (1+x^2\right )^2}{x^{3/2} \left (-1+x^2\right )} \, dx,x,x+\sqrt {1+x^2}\right )-\frac {1}{2} \int \left (\frac {1}{x}+x\right ) \, dx+\operatorname {Subst}\left (\int \left (1+\frac {1}{x^3}-\frac {1}{x^2}+\frac {1}{x}-\frac {2}{1+x}\right ) \, dx,x,\sqrt {x+\sqrt {1+x^2}}\right )\\ &=-\frac {x^2}{4}-\frac {\sqrt {1+x^2}}{2}+\frac {1}{4} x \sqrt {1+x^2}-\frac {1}{2 \left (x+\sqrt {1+x^2}\right )}+\frac {3}{2 \sqrt {x+\sqrt {1+x^2}}}+\sqrt {x+\sqrt {1+x^2}}+\frac {1}{4} \sinh ^{-1}(x)-\frac {\log (x)}{2}+\frac {1}{2} \log \left (x+\sqrt {1+x^2}\right )-2 \log \left (1+\sqrt {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 \frac {1}{x \sqrt {1+x}} \, dx,x,x^2\right )+\frac {1}{4} \operatorname {Subst}\left (\int \frac {\left (1+x^4\right )^3}{x^4 \left (-1+x^4\right )} \, dx,x,\sqrt {x+\sqrt {1+x^2}}\right )-\frac {1}{2} \operatorname {Subst}\left (\int \frac {\sqrt {x} \left (-\frac {3}{2}-\frac {x^2}{2}\right )}{-1+x^2} \, dx,x,x+\sqrt {1+x^2}\right )\\ &=-\frac {x^2}{4}-\frac {\sqrt {1+x^2}}{2}+\frac {1}{4} x \sqrt {1+x^2}+\frac {1}{12 \left (x+\sqrt {1+x^2}\right )^{3/2}}-\frac {1}{2 \left (x+\sqrt {1+x^2}\right )}+\frac {3}{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}{20} \left (x+\sqrt {1+x^2}\right )^{5/2}+\frac {1}{4} \sinh ^{-1}(x)-\frac {\log (x)}{2}+\frac {1}{2} \log \left (x+\sqrt {1+x^2}\right )-2 \log \left (1+\sqrt {x+\sqrt {1+x^2}}\right )+\frac {1}{4} \operatorname {Subst}\left (\int \left (4-\frac {1}{x^4}+x^4+\frac {4}{-1+x^2}-\frac {4}{1+x^2}\right ) \, dx,x,\sqrt {x+\sqrt {1+x^2}}\right )-\frac {1}{2} \operatorname {Subst}\left (\int \frac {1}{-1+x^2} \, dx,x,\sqrt {1+x^2}\right )+\operatorname {Subst}\left (\int \frac {\sqrt {x}}{-1+x^2} \, dx,x,x+\sqrt {1+x^2}\right )\\ &=-\frac {x^2}{4}-\frac {\sqrt {1+x^2}}{2}+\frac {1}{4} x \sqrt {1+x^2}+\frac {1}{6 \left (x+\sqrt {1+x^2}\right )^{3/2}}-\frac {1}{2 \left (x+\sqrt {1+x^2}\right )}+\frac {3}{2 \sqrt {x+\sqrt {1+x^2}}}+\frac {3}{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)+\frac {1}{2} \tanh ^{-1}\left (\sqrt {1+x^2}\right )-\frac {\log (x)}{2}+\frac {1}{2} \log \left (x+\sqrt {1+x^2}\right )-2 \log \left (1+\sqrt {x+\sqrt {1+x^2}}\right )+2 \operatorname {Subst}\left (\int \frac {x^2}{-1+x^4} \, dx,x,\sqrt {x+\sqrt {1+x^2}}\right )+\operatorname {Subst}\left (\int \frac {1}{-1+x^2} \, dx,x,\sqrt {x+\sqrt {1+x^2}}\right )-\operatorname {Subst}\left (\int \frac {1}{1+x^2} \, dx,x,\sqrt {x+\sqrt {1+x^2}}\right )\\ &=-\frac {x^2}{4}-\frac {\sqrt {1+x^2}}{2}+\frac {1}{4} x \sqrt {1+x^2}+\frac {1}{6 \left (x+\sqrt {1+x^2}\right )^{3/2}}-\frac {1}{2 \left (x+\sqrt {1+x^2}\right )}+\frac {3}{2 \sqrt {x+\sqrt {1+x^2}}}+\frac {3}{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)-\tan ^{-1}\left (\sqrt {x+\sqrt {1+x^2}}\right )+\frac {1}{2} \tanh ^{-1}\left (\sqrt {1+x^2}\right )-\tanh ^{-1}\left (\sqrt {x+\sqrt {1+x^2}}\right )-\frac {\log (x)}{2}+\frac {1}{2} \log \left (x+\sqrt {1+x^2}\right )-2 \log \left (1+\sqrt {x+\sqrt {1+x^2}}\right )-\operatorname {Subst}\left (\int \frac {1}{1-x^2} \, dx,x,\sqrt {x+\sqrt {1+x^2}}\right )+\operatorname {Subst}\left (\int \frac {1}{1+x^2} \, dx,x,\sqrt {x+\sqrt {1+x^2}}\right )\\ &=-\frac {x^2}{4}-\frac {\sqrt {1+x^2}}{2}+\frac {1}{4} x \sqrt {1+x^2}+\frac {1}{6 \left (x+\sqrt {1+x^2}\right )^{3/2}}-\frac {1}{2 \left (x+\sqrt {1+x^2}\right )}+\frac {3}{2 \sqrt {x+\sqrt {1+x^2}}}+\frac {3}{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)+\frac {1}{2} \tanh ^{-1}\left (\sqrt {1+x^2}\right )-2 \tanh ^{-1}\left (\sqrt {x+\sqrt {1+x^2}}\right )-\frac {\log (x)}{2}+\frac {1}{2} \log \left (x+\sqrt {1+x^2}\right )-2 \log \left (1+\sqrt {x+\sqrt {1+x^2}}\right )\\ \end {align*}

________________________________________________________________________________________

Mathematica [C]  time = 2.08, size = 482, normalized size = 3.13 \begin {gather*} -\frac {2 \sqrt {x^2+1} \left (\sqrt {x^2+1}+x\right )^{9/2} \left (\left (4 x^2+4 \sqrt {x^2+1} x+2\right ) \, _2F_1\left (\frac {3}{4},1;\frac {7}{4};\left (x+\sqrt {x^2+1}\right )^2\right )-x^2-\sqrt {x^2+1} x-2\right )}{48 x^6+84 x^4+39 x^2+15 \sqrt {x^2+1} x+48 \sqrt {x^2+1} x^5+60 \sqrt {x^2+1} x^3+3}+\frac {1}{3} \left (\sqrt {x^2+1}-2 x\right ) \sqrt {\sqrt {x^2+1}+x}-\frac {x^2}{4}+\frac {1}{4} (x-4) \sqrt {x^2+1}+\log \left (\sqrt {x^2+1}+1\right )+\frac {2 \sqrt {x^2+1} \left (\sqrt {x^2+1}+x\right ) \left (\sqrt {\sqrt {x^2+1}+x}-\tan ^{-1}\left (\sqrt {\sqrt {x^2+1}+x}\right )-\tanh ^{-1}\left (\sqrt {\sqrt {x^2+1}+x}\right )\right )}{x^2+\sqrt {x^2+1} x+1}-\frac {\left (6 x^4+21 x^2+18 \sqrt {x^2+1} x+6 \sqrt {x^2+1} x^3+7\right ) \sqrt {\sqrt {x^2+1}+x}}{15 \left (2 x^2+2 \sqrt {x^2+1} x+1\right )}+\frac {\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 )}{15 \left (x^2+\sqrt {x^2+1} x+1\right ) \sqrt {\sqrt {x^2+1}+x}}+\frac {x}{2}-2 \log (x)+\frac {1}{4} \sinh ^{-1}(x) \end {gather*}

Antiderivative was successfully verified.

[In]

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

[Out]

x/2 - x^2/4 + ((-4 + x)*Sqrt[1 + x^2])/4 + ((-2*x + Sqrt[1 + x^2])*Sqrt[x + Sqrt[1 + x^2]])/3 + (Sqrt[1 + x^2]
*(2 + 6*x^2 + 6*x^4 + 3*x*Sqrt[1 + x^2] + 6*x^3*Sqrt[1 + x^2]))/(15*Sqrt[x + Sqrt[1 + x^2]]*(1 + x^2 + x*Sqrt[
1 + x^2])) - (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]))/(15*(1
+ 2*x^2 + 2*x*Sqrt[1 + x^2])) + ArcSinh[x]/4 + (2*Sqrt[1 + x^2]*(x + Sqrt[1 + x^2])*(Sqrt[x + Sqrt[1 + x^2]] -
 ArcTan[Sqrt[x + Sqrt[1 + x^2]]] - ArcTanh[Sqrt[x + Sqrt[1 + x^2]]]))/(1 + x^2 + x*Sqrt[1 + x^2]) - (2*Sqrt[1
+ x^2]*(x + Sqrt[1 + x^2])^(9/2)*(-2 - x^2 - x*Sqrt[1 + x^2] + (2 + 4*x^2 + 4*x*Sqrt[1 + x^2])*Hypergeometric2
F1[3/4, 1, 7/4, (x + Sqrt[1 + x^2])^2]))/(3 + 39*x^2 + 84*x^4 + 48*x^6 + 15*x*Sqrt[1 + x^2] + 60*x^3*Sqrt[1 +
x^2] + 48*x^5*Sqrt[1 + x^2]) - 2*Log[x] + Log[1 + Sqrt[1 + x^2]]

________________________________________________________________________________________

IntegrateAlgebraic [A]  time = 0.24, size = 154, normalized size = 1.00 \begin {gather*} \frac {104-36 x+214 x^2-24 x^3+\left (40+48 x+72 x^2+16 x^3\right ) \sqrt {x+\sqrt {1+x^2}}+\sqrt {1+x^2} \left (-24+214 x-24 x^2+\left (40+72 x+16 x^2\right ) \sqrt {x+\sqrt {1+x^2}}\right )}{48 x \sqrt {1+x^2}+24 \left (1+2 x^2\right )}+\frac {5}{4} \log \left (x+\sqrt {1+x^2}\right )-4 \log \left (1+\sqrt {x+\sqrt {1+x^2}}\right ) \end {gather*}

Antiderivative was successfully verified.

[In]

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

[Out]

(104 - 36*x + 214*x^2 - 24*x^3 + (40 + 48*x + 72*x^2 + 16*x^3)*Sqrt[x + Sqrt[1 + x^2]] + Sqrt[1 + x^2]*(-24 +
214*x - 24*x^2 + (40 + 72*x + 16*x^2)*Sqrt[x + Sqrt[1 + x^2]]))/(48*x*Sqrt[1 + x^2] + 24*(1 + 2*x^2)) + (5*Log
[x + Sqrt[1 + x^2]])/4 - 4*Log[1 + Sqrt[x + Sqrt[1 + x^2]]]

________________________________________________________________________________________

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

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((1+(x^2+1)^(1/2))/(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 - 5) - 4*x + 5)*sqrt(x + sqrt(x^2 + 1)) + 1/4*sqrt(x^2 + 1)*(x - 4) + 1
/2*x - 4*log(sqrt(x + sqrt(x^2 + 1)) + 1) + 5/2*log(sqrt(x + sqrt(x^2 + 1)))

________________________________________________________________________________________

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

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

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

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

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

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

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

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

int(((x^2 + 1)^(1/2) + 1)/((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 {\sqrt {x^{2} + 1} + 1}{\sqrt {x + \sqrt {x^{2} + 1}} + 1}\, dx \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________