enter image description here

I have solved the above using the below method.

$$x= 12 + \frac{1}{2+\left(\frac{1}{2}+x\right)}$$

After solving for $x$, I got the answer as $11.7515$ and $-1.41824$

So what is the real value of $x$, it should be one value for the expression. Why am I getting two values? Please assist

Silvia Ghinassi
  • 4,517
  • 7
  • 21
  • 43

5 Answers5


You wrote it wrong in the question, but that's not why you get two answers. First I'll show the solving steps: \begin{align} x&=12+(2+(2+x^{-1})^{-1})^{-1}\\ x-12&=(2+(2+x^{-1})^{-1})^{-1}\\ (x-12)(2+(2+x^{-1})^{-1})&=1\\ x(2+x^{-1})^{-1}-12(2+x^{-1})^{-1}&=25-2x\\ x-12&=(25-2x)(2+x^{-1})\\ x^2-12x&=(25-2x)(2x+1)\\ 5x^2-60x-25&=0\\ x^2-12x-5&=0\\ (x-6)^2&=41\\ x&=6\pm\sqrt{41} \end{align} Now as you understandably ask, why are there two solutions?

The simple answer is that both numbers satisfy the equation we set up, that is, when we turned the infinite fraction into an equation, we introduced an extra solution. This is because the equation and the infinite fraction are not equivalent statements, one implies the other but not the other way around.

Remember to always check whether your solutions are actually solutions when you solve an equation, this time you see one solution is wrong since it's obviously at least 12.

This same problem can also happen in other equations, let's say you solve the following equation: \begin{align} \frac{x^2}{x+1} &= \frac1{x+1}\\ x^2 &= 1\\ x &= \pm1\\ \end{align} We find the solutions $1$ and $-1$, but notice how only $1$ is actually an solution, with $-1$ you get division by zero. This is a similar problem with the same answer, check your solutions after finding them.

Alice Ryhl
  • 7,513
  • 2
  • 19
  • 42

You should be solving $x=12+\frac 1{2+\frac 1{2+\frac 1x}}$, which is not the same as your equation. Just looking at your expression, the value must be greater than $12$. The correct expression gives $x=6\pm 2\sqrt{41}$, which is about $12.403, -2.403$ The positive root is the one you want. The second value also satisfies the equation as written, but is a spurious root.

Ross Millikan
  • 362,355
  • 27
  • 241
  • 432

From the expression given $x=12+\frac{1}{2+\frac{1}{2+\frac{1}{12+...}}}$, your equation should be

$x=12+\frac{1}{2+\frac{1}{2+\frac{1}{x}}}$ ---------$(1)$

On solving $(1)$ we get two values: $x= 12.483315$ or $x= -2.483315$

Now, we get two values because eqn (1) was a quadratic equation in $x$. We have to take only $x= 12.483315$ because in the given expression, $x= 12+$(some positive value).

Where does the other value come from? It comes from the equation (1) itself. It happens so because the equation (1) is not exactly equivalent of the given expression for $x$. We get the equation simply because we assume that the infinite expression of $x$ converges. Which implies that $x$ must be a root of (1), but all the roots of (1) may not be x. According to the statements of the problem here, only one root $x= 12.483315$ is valid.

Potemkin Metro Card
  • 1,423
  • 10
  • 21

Notice, one should get $$x=12+\frac{1}{2+\frac{1}{2+\frac{1}{x}}}$$ $$x^2-12x-5=0$$
Solving for $x$ by using quadratic formula, $$x=\frac{12\pm\sqrt{12^2-4(1)(-5)}}{2}=6\pm\sqrt{41}$$ but $x>12$ hence, $$x=6+\sqrt{41}\approx 12.40312424\ldots$$

Harish Chandra Rajpoot
  • 36,524
  • 70
  • 73
  • 111

$$\frac{1}{2+\frac{1}{x}}\neq\frac{1}{2}+x$$ The equation you should be solving is $$x=12+\frac{1}{2+\frac{1}{2+\frac{1}{x{}}}}$$ \begin{gather} (x-12)\left(2+\frac{1}{2+\frac{1}{x}}\right)=1\\ (x-12)\left(\frac{2(2+\frac{1}{x})+1}{2+\frac{1}{x}}\right)=1\\ (x-12)(2x^{-1}+5)=2+x^{-1}\\ 5x-24x^{-1}-58=2+x^{-1}\\ 5x-25x^{-1}-60=0\\ x^2-12x-5=0 \end{gather}

The roots of this equation are $6\pm\sqrt{41}$, and we discard the negative case by convention, seeing that the expression is greater than $12$.

  • 1,717
  • 9
  • 21