# Solve for x (quadratic equation)

How do you solve the following equation:

\begin{align*} \sqrt{2017 + \sqrt{2017 - x}} &= x \end{align*}

I tried squaring it twice, but then I am left with quadratic equation that I can not solve.

• it must be $$0\le x\le 2017$$ – Dr. Sonnhard Graubner Jan 28 '17 at 12:21
• You have quadratic equation in your title, yet you haven't ....... your equation. (Fill in the blanks.) – B. Pasternak Jan 28 '17 at 12:21

Let $2017-x=y^2$, where $y\geq0$.

Hence, $x+y>0$ and $2017+y=x^2$, which gives $y+x=x^2-y^2$ or $x-y=1$ and the rest is smooth. We have $y=x-1$, $2017+x-1=x^2$ or $$x^2-x-2016=0$$ and since $x>0$, we get the answer $\{\frac{1+\sqrt{8065}}{2}\}$.

• Then how to solve it further? – Kanwaljit Singh Jan 28 '17 at 12:36
• @Kanwaljit Singh I fixed my post for you. – Michael Rozenberg Jan 28 '17 at 12:40
• y=x-1 and you directly write $2017+x-1=x^2$. How? – Kanwaljit Singh Jan 28 '17 at 12:44
• @Kanwaljit Singh Because $2017+y=x^2$. – Michael Rozenberg Jan 28 '17 at 12:50
• Probably a typo : $8085$ should be $8065$ (I guess). – Claude Leibovici Jan 28 '17 at 16:40

after squaring we will get $$\sqrt{2017-x}=x^2-2017$$ squaring one more times we obtain $$0=x^4-4034x^2+x-2017+2017^2$$ the solution is given by $$x=\frac{1}{2} \left(1+\sqrt{8065}\right)$$

• How can we get the said solution from $x^4 - ... =0$? – Mick Jan 28 '17 at 15:16
• it can be factorized into $$\left(x^2-x-2016\right) \left(x^2+x-2017\right)$$ – Dr. Sonnhard Graubner Jan 28 '17 at 15:19
• I have 2 questions. 1) How to group the terms (or insert auxiliary terms) so that it can be factorized as such? 2) Why are the other 3 roots ignored? Is it because you have verified already? – Mick Jan 28 '17 at 15:45