# How to integrate $\int \sqrt{1+\sqrt{1+x}}\ \mathrm{d}x$?

I need help to integrate

$$\int \sqrt{1+\sqrt{1+x}}\mathrm{d}x$$

I am trying to evaluate this integral by substituting $$x=\tan^{2}(\theta)$$. Therefore, $$\mathrm{d}x=2\tan(\theta)\sec(\theta)^{2}\mathrm{d}\theta$$. So, the integral will become $$2\int \sqrt{1+\sec(\theta)}\tan(\theta)\sec(\theta)^2\mathrm{d}\theta$$ Now after this step, I wrote $$\sec(\theta):=\frac{1}{\cos(\theta)}$$. So, the above integral will be

$$2\int \sqrt{\frac{1+\cos(\theta)}{\cos(\theta)}}\tan(\theta)\sec(\theta)^2\mathrm{d}\theta$$

Now we know that $$1+\cos(\theta)=2\cos\left(\frac{\theta}{2}\right)^{2}$$. Now the integral will become

$$2\sqrt{2}\int \frac{\cos\left(\frac{\theta}{2}\right)}{\sqrt{\cos(\theta)}}\frac{\sin(\theta)}{\cos(\theta)^3}\mathrm{d}\theta$$ So, we can write the above integral as $$2\sqrt{2}\int \frac{\sin(\theta) \cdot \cos\left(\frac{\theta}{2}\right)}{\cos(\theta)^{\frac{7}{2}}}\mathrm{d}\theta$$ But after this step, I can't understand how to approach further. Please help me out.

• Hint: inverse of this function is easy to integrate. If you know the anti-derivative of the $f^{-1}$, what can you say about anti-derivative of $f$ if $f$ is one-one? Nov 12, 2023 at 17:56
• Try a simpler non-trigonometric substitution, like $u=\sqrt{1+x}$ Nov 12, 2023 at 17:58
• If $x\to x+1$, then your question is a duplicate of $\int \sqrt{1+\sqrt x}dx$ Nov 12, 2023 at 17:58
• When you have some square roots in integrals just try to substitute the whole square root. i.e set $u=\sqrt{1+\sqrt{1+x}}$ you'll be surprised how often than not it leads to simplification. And in this case it does lead to $\int 4u^2(u^2-1)du$. It's just scary how often this trick works.
– zwim
Nov 12, 2023 at 19:38

Instead substitute $$u= \sqrt{x+1}$$ so that $$du = \frac{1}{2(x+1)^\frac{1}{2}}dx$$

And hence the integral becomes: $$2\cdot \int u\cdot \sqrt{u+1} \ \ du$$

Then proceed via substituting $$t=u+1$$, with $$dt = du$$.

So in essence it should be: $$2\cdot \int (t-1)\cdot\sqrt{t} \ \ dt$$ where $$t = 1+ \sqrt{1+x}$$.

Let $$f(x)=((x^2-1)^2-1)^2$$.

It is monotone increasing over $$(\sqrt 2, \infty)$$.

If you consider $$f:[\sqrt 2,\infty)\to [0,\infty)$$, it is invertible. (There are other regions too where it is invertible.)

We want to find the anti-derivative of $$f^{-1}(x)$$.

$$\int f^{-1}(x)\ \mathrm dx\\ =xf^{-1}(x)-F\circ f^{-1}(x)+ C$$ where $$F(x)=\int f(x)\ \mathrm dx$$ and $$\circ$$ is function composition.

Let $$u=\sqrt{1+\sqrt{1+x}}$$ and then $$x=(u^2-1)^2-1$$. So $$\int\sqrt{1+\sqrt{1+x}}dx=\int u(4u^3-4u)du=\frac45u^5-\frac43u^3+C=\frac45(\sqrt{1+\sqrt{1+x}})^5-\frac43(\sqrt{1+\sqrt{1+x}})^3+C.$$