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

Optimal result
Mathematica [A] (verified)
Rubi [A] (warning: unable to verify)
Maple [F]
Fricas [A] (verification not implemented)
Sympy [F]
Maxima [F]
Giac [F]
Mupad [F(-1)]
Reduce [F]

Optimal result

Integrand size = 19, antiderivative size = 84 \[ \int \frac {1}{1+\sqrt {x+\sqrt {1+x^2}}} \, dx=-\frac {1}{2 \left (x+\sqrt {1+x^2}\right )}+\frac {1}{\sqrt {x+\sqrt {1+x^2}}}+\sqrt {x+\sqrt {1+x^2}}+\frac {1}{2} \log \left (x+\sqrt {1+x^2}\right )-2 \log \left (1+\sqrt {x+\sqrt {1+x^2}}\right ) \] Output:

1/2*ln(x+(x^2+1)^(1/2))-2*ln(1+(x+(x^2+1)^(1/2))^(1/2))-1/2/(x+(x^2+1)^(1/ 
2))+1/(x+(x^2+1)^(1/2))^(1/2)+(x+(x^2+1)^(1/2))^(1/2)
 

Mathematica [A] (verified)

Time = 0.13 (sec) , antiderivative size = 105, normalized size of antiderivative = 1.25 \[ \int \frac {1}{1+\sqrt {x+\sqrt {1+x^2}}} \, dx=\frac {1}{2} \left (\frac {-1+5 x+2 (1+x) \sqrt {x+\sqrt {1+x^2}}+\sqrt {1+x^2} \left (5+2 \sqrt {x+\sqrt {1+x^2}}\right )}{x+\sqrt {1+x^2}}+\log \left (x+\sqrt {1+x^2}\right )-4 \log \left (1+\sqrt {x+\sqrt {1+x^2}}\right )\right ) \] Input:

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

Output:

((-1 + 5*x + 2*(1 + x)*Sqrt[x + Sqrt[1 + x^2]] + Sqrt[1 + x^2]*(5 + 2*Sqrt 
[x + Sqrt[1 + x^2]]))/(x + Sqrt[1 + x^2]) + Log[x + Sqrt[1 + x^2]] - 4*Log 
[1 + Sqrt[x + Sqrt[1 + x^2]]])/2
 

Rubi [A] (warning: unable to verify)

Time = 0.25 (sec) , antiderivative size = 73, normalized size of antiderivative = 0.87, number of steps used = 5, number of rules used = 4, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.211, Rules used = {2542, 2361, 2123, 2009}

Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.

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

\(\Big \downarrow \) 2542

\(\displaystyle \frac {1}{2} \int \frac {\left (x+\sqrt {x^2+1}\right )^2+1}{\left (x+\sqrt {x^2+1}\right )^2 \left (\sqrt {x+\sqrt {x^2+1}}+1\right )}d\left (x+\sqrt {x^2+1}\right )\)

\(\Big \downarrow \) 2361

\(\displaystyle \int \frac {\left (\sqrt {x^2+1}+x\right )^2+1}{\left (\sqrt {x^2+1}+x\right )^{3/2} \left (\sqrt {\sqrt {x^2+1}+x}+1\right )}d\sqrt {\sqrt {x^2+1}+x}\)

\(\Big \downarrow \) 2123

\(\displaystyle \int \left (-\frac {2}{\sqrt {\sqrt {x^2+1}+x}+1}+\frac {1}{\sqrt {\sqrt {x^2+1}+x}}-\frac {1}{\sqrt {x^2+1}+x}+\frac {1}{\left (\sqrt {x^2+1}+x\right )^{3/2}}+1\right )d\sqrt {\sqrt {x^2+1}+x}\)

\(\Big \downarrow \) 2009

\(\displaystyle \sqrt {\sqrt {x^2+1}+x}+\frac {1}{\sqrt {x^2+1}+x}-\frac {1}{2 \left (\sqrt {x^2+1}+x\right )^2}+\log \left (\sqrt {x^2+1}+x\right )-2 \log \left (\sqrt {x^2+1}+x+1\right )\)

Input:

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

Output:

-1/2*1/(x + Sqrt[1 + x^2])^2 + (x + Sqrt[1 + x^2])^(-1) + Sqrt[x + Sqrt[1 
+ x^2]] + Log[x + Sqrt[1 + x^2]] - 2*Log[1 + x + Sqrt[1 + x^2]]
 

Defintions of rubi rules used

rule 2009
Int[u_, x_Symbol] :> Simp[IntSum[u, x], x] /; SumQ[u]
 

rule 2123
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])
 

rule 2361
Int[(Pq_)*(x_)^(m_.)*((a_) + (b_.)*(x_)^(n_))^(p_.), x_Symbol] :> Simp[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] && IntegerQ[S 
implify[(m + 1)/n]]
 

rule 2542
Int[((g_.) + (h_.)*((d_.) + (e_.)*(x_) + (f_.)*Sqrt[(a_) + (c_.)*(x_)^2])^( 
n_))^(p_.), x_Symbol] :> Simp[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] /; Fr 
eeQ[{a, c, d, e, f, g, h, n}, x] && EqQ[e^2 - c*f^2, 0] && IntegerQ[p]
 
Maple [F]

\[\int \frac {1}{1+\sqrt {x +\sqrt {x^{2}+1}}}d x\]

Input:

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

Output:

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

Fricas [A] (verification not implemented)

Time = 0.07 (sec) , antiderivative size = 66, normalized size of antiderivative = 0.79 \[ \int \frac {1}{1+\sqrt {x+\sqrt {1+x^2}}} \, dx=-\sqrt {x + \sqrt {x^{2} + 1}} {\left (x - \sqrt {x^{2} + 1} - 1\right )} + \frac {1}{2} \, x - \frac {1}{2} \, \sqrt {x^{2} + 1} - 2 \, \log \left (\sqrt {x + \sqrt {x^{2} + 1}} + 1\right ) + \log \left (\sqrt {x + \sqrt {x^{2} + 1}}\right ) \] Input:

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

Output:

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

Sympy [F]

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

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

Output:

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

Maxima [F]

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

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

Output:

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

Giac [F]

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

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

Output:

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

Mupad [F(-1)]

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

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

Output:

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

Reduce [F]

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

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

Output:

(2*sqrt(sqrt(x**2 + 1) + x)*sqrt(x**2 + 1) - 2*sqrt(x**2 + 1) - 3*int(sqrt 
(sqrt(x**2 + 1) + x)/(x**2 + 1),x) - 3*int((sqrt(sqrt(x**2 + 1) + x)*x**2) 
/(x**2 + 1),x) + 2*int((sqrt(sqrt(x**2 + 1) + x)*sqrt(x**2 + 1))/(x**2 + 1 
),x) - 2*log(sqrt(x**2 + 1) + x - 1) + 2*log(sqrt(x**2 + 1) + x + 1) + 4*l 
og(sqrt(sqrt(x**2 + 1) + x) - 1) - 4*log(sqrt(sqrt(x**2 + 1) + x) + 1) - 2 
*log(x) + 2*x)/4