<s>[INST] 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.$
 [/INST] 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.
</s>