# What is the algorithm for solving an equation like this one?

The solutions of the equation : $\sqrt{x+2\sqrt{x-1}} + \sqrt{x-2 \sqrt{x-1}} = 2$ are:

• A) $x=1$;
• B) $x=2$;
• C) $x\in [1,2]$;
• D) $x\in \begin{bmatrix} \frac{3}{2},2 \end{bmatrix}$;
• E) $x=\frac{3}{2}$;
-
It should hardly be worth mentioning (though I'm often surprised to find that it isn't a universally-applied strategy) that (A), (B), and (E) can be quickly determined by simple substitution. – Rick Decker Jul 5 '12 at 15:56
Define "like this one". – lhf Jul 5 '12 at 15:58
Check the ones that are easy to check by substitution. Once you verify that $x=1$ and $x=2$ both work, answer (C) is the only possibility. – mjqxxxx Jul 5 '12 at 16:04
@RickDecker: Well, I don't know about simple substitution in the $x=\frac 3 2$ case.... – Cameron Buie Jul 5 '12 at 16:05
@Cameron Well, for sufficiently complicated values of "simple" it is, but I'll concede your point. I still stand by my parenthetical remark, though – Rick Decker Jul 5 '12 at 18:43

As you have some answer possibilities you can just check if they solve your equation. Denoting your right hand side by $f(x) = \sqrt{x + 2\sqrt{x-1}} + \sqrt{x - 2\sqrt{x-1}},$ we have

• $f(1) = 2$,
• $f(2) = 2$,
• $f(\frac 32) = 2$,

so C) is the only possibility.

If you don't have choices given, you could try to rewrite $f$, noting that the maximal domain of definition of $f$ is $[1,2]$. We have \begin{align*} f(x)^2 &= x + 2\sqrt{x-1} + 2\sqrt{(x+2\sqrt{x-1})(x-2\sqrt{x-1})} + x - 2\sqrt{x-1}\\ &= 2x + 2\sqrt{x^2 - 4(x-1)}\\ &= 2x + 2\sqrt{x^2 - 4x + 4}\\ &= 2x + 2\sqrt{(x-2)^2}\\ &= 2x + 2\left|x-2\right|\\ &= 2x + 2(2-x)\\ &= 4 \end{align*} As $f$ is non-negative, this gives $f(x) = 2$ for all $x \in [1,2]$ (that is, where $f$ is defined).

-

Note that $$\sqrt{x\pm 2\sqrt{x-1}}=\sqrt{(\sqrt{x-1}\pm 1)^2}=|\sqrt{x-1}\pm 1|$$ So $$f(x)=|\sqrt{x-1}-1|+|\sqrt{x-1}+1|=|\sqrt{x-1}-1|+\sqrt{x-1}+1$$ After considering cases $x>2$ and $1\leq x\leq 2$ you get $$f(x)= \begin{cases} 2\sqrt{x-1}&\quad\text{ if }\quad x>2\\ 2&\quad\text{ if }\quad 1\leq x\leq 2 \end{cases}$$ From there it is easy to proceed.

-

An efficient one (but not always convergent) is Newton-Raphson's method:
$$x_{n+1}=x_n-f(x_n)/f'(x_n)$$ or it's numeric equivalent (small steps for incrementing)

For the initial guess you can use an Exhaustive Search (e.g start from -10 to +10) and for halting a "difference checking while loop" would do good.

You can also use Bisection method which has a convergence guaranty.

-
You have missed the point entirely! – TonyK Jul 7 '12 at 14:05

Let $x-1=y^2$,

then the given equation becomes $\sqrt{y^2+1+2y}+\sqrt{y^2+1-2y}=2$

Now. $\sqrt{y^2+1+2y}$=(y+1) if (y+1)>0 i.e., y≥-1, else -(y+1)

and $\sqrt{y^2+1-2y}$=(y-1) if y>1, else -(y-1)

Then, three cases arise, y< -1, -1≤y≤1 and y>1.

If y < -1, the given equation becomes -(y+1)-(y-1)=2 => y=-1 which is not possible as y < -1.

If -1≤y≤1, y+1 -(y-1)=2 which becomes identity=> one set of solution is -1≤y≤1.

If y>1 y+1+(y-1)=2 => y=1 which is again impossible as y>1.

If -1≤y≤1, 0≤$y^2$≤1 => 1≤$y^2+1$≤2 => 1≤x≤2

-

If $x < 1$, then $$\begin{array}{lcl} f(x) & = & \sqrt{x + 2\sqrt{x-1}} + \sqrt{x - 2\sqrt{x-1}} \\ & = & \sqrt{x + 2I \sqrt{1 - x}} + \sqrt{x - 2I \sqrt{1 - x}} \\ & = & \sqrt{\left( 1 + I \sqrt{1 - x} \right)^2} + \sqrt{\left( 1 - I \sqrt{1 - x} \right)^2} \\ & = & \pm \left( 1 + I \sqrt{1 - x} \right) + \pm \left( 1 - I \sqrt{1 - x} \right) \\ & = & \left\{ \pm 2, \ \pm I \sqrt{1 - x} \right\} \ni 2 \end{array}$$

-
{"found_math": true, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 2, "mathjax_display_tex": 1, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0}