×

# How to solve "nested" problems

Something that I see a lot at math competitions or on Brilliant is a problem asking to find the value of $$\sqrt{x+\sqrt{x+\sqrt{x+\ldots}}}$$ for $$x=$$ some value. I'm going to talk about how to solve that "nested radical" as well as "nested" fractions.

First I'm going to talk about how to solve a problem such as finding the value of $$\sqrt{6+\sqrt{6+\sqrt{6+\ldots}}}.$$ Let $$k=\sqrt{6+\sqrt{6+\sqrt{6+\ldots}}}.$$ You may notice that you are adding $$k$$ to $$6$$ and taking the square root of this. I'll demonstrate this with some parentheses. $\sqrt{6+\sqrt{6+\sqrt{6+\ldots}}}=\sqrt{6+\left(\sqrt{6+\sqrt{6+\ldots}}\right)}=\sqrt{6+\sqrt{\left(6+\sqrt{6+\ldots}\right)}}=\ldots$ For simplicity, we're just going to use $$\sqrt{6+\sqrt{6+\sqrt{6+\ldots}}}=\sqrt{6+\left(\sqrt{6+\sqrt{6+\ldots}}\right)}.$$ You may notice that this is the same thing as saying that $$k=\sqrt{6+k}.$$ Let's try solving that. \begin{align} k&=\sqrt{6+k}\\ k^2&=6+k\\ k^2-k-6&=0\\ (k-3)(k+2)&=0\\ k=3\text{ or }k=-2\\ \end{align} We can eliminate the $$k=-2$$ solution because the nested radical obviously is non-negative. Thus, we can say that $$\sqrt{6+\sqrt{6+\sqrt{6+\ldots}}}=\boxed{3}.$$

Now we can use a similar line of logic to find a general form for $$\sqrt{x+\sqrt{x+\sqrt{x+\ldots}}}.$$ Let that equal $$y.$$ We will make use of the same procedure, but using the quadratic formula to solve for $$y.$$ \begin{align} y&=\sqrt{x+\sqrt{x+\sqrt{x+\ldots}}}\\ y&=\sqrt{x+y}\\ y^2&=x+y\\ y^2-y-x&=0\\ y&=\dfrac{1\pm\sqrt{1+4x}}{2}\\ \end{align} Since we are dealing with real numbers, the value under the radical cannot be negative (except for $$x=0$$.) Thus, we can say that $$\sqrt{x+\sqrt{x+\sqrt{x+\ldots}}}=\dfrac{1+\sqrt{1+4x}}{2}.$$

Now let's use the same logic to derive a formula for nested fractions of the form $$\dfrac{1}{a+\frac{1}{a+\ddots}}$$ as well as continued fractions where the numerator is not necessarily $$1.$$

First, the obligatory demonstration of such a fraction. \begin{align} \dfrac{1}{2+\frac{1}{2+\ddots}}&=\dfrac{1}{2+\left(\frac{1}{2+\ddots}\right)}\\ k&=\dfrac{1}{2+k}\\ k^2+2k&=1\\ k^2+2k-1&=0\\ k&=\dfrac{-2\pm\sqrt{4+4}}{2}\\ k&=-1\pm\sqrt{2} \end{align} Again, we can throw out the negative solution and say that $$\dfrac{1}{2+\frac{1}{2+\ddots}}=-1+\sqrt{2}.$$

Moving on, we can derive a general formula for finding $$\dfrac{c}{x+\frac{c}{x+\ddots}},$$ allowing this expression to be equal to $$y.$$

\begin{align} y&=\dfrac{c}{x+\frac{c}{x+\ddots}}\\ y&=\dfrac{c}{x+y}\\ y^2+xy&=c\\ y^2+xy-c&=0\\ y&=\dfrac{-x+\sqrt{x^2+4c}}{2} \end{align}

So a summary of what we have proved here:

• $$\sqrt{x+\sqrt{x+\sqrt{x+\ldots}}}=\dfrac{1+\sqrt{1+4x}}{2}$$
• $$\dfrac{c}{x+\frac{c}{x+\ddots}}=\dfrac{-x+\sqrt{x^2+4c}}{2}$$

If you want some practice problems, here's two.

1. Find a closed form for $$x+\dfrac{1}{2x+\frac{1}{2x+\ddots}}.$$

2. This calculus problem

3. Find all values of $$n$$ for which $$\sqrt{n+\sqrt{n+\sqrt{n+\ldots}}}$$ is an integer.

I hope this helps you out! Please feel free to share what you think in the comments. Thank you very much!

Note by Trevor B.
2 years, 3 months ago

Sort by:

$$\displaystyle \sqrt{x + \sqrt{x - \sqrt{x + \ldots }}} = \dfrac{1 + \sqrt{4x -3}}{2}$$

$$\displaystyle \sqrt{x - \sqrt{x + \sqrt{x - \ldots }}} = \dfrac{-1 + \sqrt{4x - 3}}{2}$$ · 2 years, 3 months ago

If you want to practice some problems on Nested Radicals ,
you may refer to my set Nested Radicals · 2 years, 3 months ago

Thank you :) · 2 years, 3 months ago

3.Let $$\sqrt{n+\sqrt{n+\sqrt{\cdots}}}=x$$.Then we can write it as $$\sqrt{n+x}=x$$ as you have just shown.Now solving: $n+x=x^2\\ x^2-x-n=0\\ x=\frac{-1\pm\sqrt{(-1)^2-4(1)(-n)}}{2(1)}\\ x=\frac{-1\pm\sqrt{4n+1}}{2}$ As the nested radical is positive,so we discard the negative square root.And we are left with: $\boxed{x=\frac{-1+\sqrt{4n+1}}{2}}$ By observation we conclude that $$4n+1$$ must be a perfect square odd number.That's as far as I got.Perhaps someone could complete this. · 2 years, 3 months ago

My workings are similar to yours. I think your application of the quadratic equation is wrong though. If I am mistaken please correct me!

x = [1 +sqrt(1+4n)] / 2

x is an integer when 1 + 4n is a perfect square (and positive). 1 + 4n is an odd perfect square, therefore its square root is an odd integer.

Let (y + 1)^2 = 1 + 4n y^2 + 2y + 1 = 1+ 4n 4n = y^2 + 2y n = [y^2 + 2y] / 4 = y^2/4 + y/2 y is an even integer.

Thus n is an integer, whereby for all even integers y: n = (y^2)/4 + y/2 · 1 month, 1 week ago

This is excellent. Thanks Trevor. Staff · 2 years, 3 months ago

Thanks dude, I'll keep your tips it in mind while solving such questions $$\ddot\smile$$ · 2 years, 3 months ago