A function with domain that is asking for sum of a+b+c+d Let $f$ be a function such that $$ \sqrt {x - \sqrt { x + f(x) } } = f(x) , $$for $x > 1$. In that domain, $f(x)$ has the form $\frac{a+\sqrt{cx+d}}{b},$ where $a,b,c,d$ are integers and $a,b$ are relatively prime. Find $a+b+c+d.$
 A: Let $y$ equal $f(x)$. Therefore, we have $$y=\sqrt{x-\sqrt{x+y}}\tag{1}$$
Repeatedly squaring both sides gives us $$y^4-2xy^2-y+x^2-x=0\implies x^2+(-2y^2-1)+y^4-y=0\tag2$$
And using the quadratic formula on $(2)$, we get $$x=\frac {2y^2+1\pm(2y+1)}{2}\tag3$$
Simplifying $(3)$ gives us $$x_1=y^2+y+1\\x_2=y^2-y\tag4$$
So now, we have $2$ cases to consider.
Case 1: $x_1=y^2+y+1$
When $x=y^2+y+1$, we have $$x+y=(y+1)^2\\\therefore \sqrt{x+y}=|y+1|$$
Since the square root of a number cannot be less than $0$, we know that $y\geq 0$. Thus, $y+1\geq 1$ and we see that $\sqrt{x+y}=y+1$. Plugging that back into $(1)$ gives us $$\sqrt{x-\sqrt{x+y}}=\sqrt {y^2}=y$$
And from $(4)$, we see that $$y=\frac {-1\pm\sqrt{4x-3}}{2}$$
Case 2: $x_2=y^2-y$
Since $\sqrt{x+y}=x-y^2$, substituting gives us $$\sqrt{y^2}=-y$$ which has no solution because we take the $x$ values larger than $1$. So therefore, Case 1 is correct and $$a+b+c+d=2$$

Using the factoring method I mentioned in the comments:
From $(1)$, we factor it into $$(y^2-y-x)(y^2+y-x+1)=0$$ which has roots $$x=\frac {1\pm\sqrt{4x+1}}{2}\\x=\frac {-1\pm\sqrt{4x-3}}{2}$$
with the latter of the two being the right answer.
A: Let $y = f(x)$. Our first goal is to find all pairs of real numbers $(x,y)$ that satisfy
[\sqrt{x - \sqrt{x + y}} = y.]We observe that $y$ must be nonnegative. Squaring both sides, we get
[x - \sqrt{x + y} = y^2,]so
[\sqrt{x + y} = x - y^2.]Squaring both sides again, we get
[x + y = x^2 - 2xy^2 + y^4,]so
[y^4 - 2xy^2 - y + x^2 - x = 0.]This is a quartic equation in $y$, which has no obvious solutions. However, we can re-write it as a quadratic equation in $x$, which we can solve:
[x^2 - (2y^2 + 1)x + y^4 - y = 0.]By the quadratic formula,
\begin{align*}
x &= \frac{(2y^2 + 1) \pm \sqrt{(2y^2 + 1)^2 - 4(y^4 - y)}}{2} \\
&= \frac{(2y^2 + 1) \pm \sqrt{4y^4 + 4y^2 + 1 - 4y^4 + 4y}}{2} \\
&= \frac{(2y^2 + 1) \pm \sqrt{4y^2 + 4y + 1}}{2} \\
&= \frac{(2y^2 + 1) \pm \sqrt{(2y + 1)^2}}{2} \\
&= \frac{2y^2 + 1 \pm (2y + 1)}{2},
\end{align*}so
[x = \frac{2y^2 + 1 + 2y + 1}{2} = y^2 + y + 1,]or
[x = \frac{2y^2 + 1 - (2y + 1)}{2} = y^2 - y.]We consider these solutions separately.
Case 1: $x = y^2 + y + 1$.
In this case,
[x + y = y^2 + 2y + 1 = (y + 1)^2,]so
[\sqrt{x + y} = |y + 1|.]We know that $y \ge 0$, so $y + 1 \ge 1$. Hence, $\sqrt{x + y} = y + 1$. Then
[x - \sqrt{x + y} = y^2 + y + 1 - (y + 1) = y^2,]so
[\sqrt{x - \sqrt{x + y}} = \sqrt{y^2} = |y| = y.]Thus, if $x = y^2 + y + 1$, then $(x,y)$ satisfies the given equation. We also know that $y \ge 0$, so $x \ge 1$. From the equation $x = y^2 + y + 1$, we have that $y^2 + y + 1 - x = 0$, so by the quadratic equation,
[y = \frac{-1 \pm \sqrt{1 - 4(1 - x)}}{2} = \frac{-1 \pm \sqrt{4x - 3}}{2}.]Since $y \ge 0$, we must take the root with the plus sign. Hence,
[y = \frac{-1 + \sqrt{4x - 3}}{2}.]
Case 2: $x = y^2 - y$.
Recall above that we also found $\sqrt{x+y}=x-y^2.$ Substituting $x=y^2-y$ gives
[\sqrt{y^2}=-y,]which is only satisfied when $y=0$, in which case $x = 0$, but we are given that $x > 0$.
We conclude that the function $f(x)$ is given by
$$f(x) = \frac{-1 + \sqrt{4x - 3}}{2}.$$This gives $a = -1, b = 2, c = 4, d = -3,$ or $a+b+c+d = \boxed{ 2 }.$
