Finding a function with certain properties I ran into a problem, and I'm not sure how to continue.
Problem: 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 $\dfrac{a+\sqrt{cx+d}}{b}$, where $a$, $b$, $c$, $d$ are integers and $a$, $b$ are relatively prime. Find $a+b+c+d$.
So, I tried to cancel out the radicals, and got $(f(x))^4-2x(f(x))^2-f(x)+x^2-x=0$. Setting $y=f(x)$, I tried to apply the quadratic formula to find $x$ in terms of $y$. I got 
$$
x=\frac{x+2xy^2 \pm \sqrt{(x+2xy^2)^2-4(y^4-y)}}{2}. 
$$
From here, I tried simplifying the radical, but got 
$$
x=\frac{x+2xy^2 \pm \sqrt{(x^2)(2y^2+1)^2-y(4y^3+1)}}{2}.
$$
I don't know if I factored it wrong, or if I'm missing something painfully obvious. Can I have a hint as to how to continue? It would be greatly appreciated.

We have $f(x)=O(\sqrt x)$. Note that $\lim_{x\to\infty}\frac{f(x)}{\sqrt x}=\frac{\sqrt c}{b}$, whereas
$\lim_{x\to\infty}\frac{\sqrt{x-\sqrt{x+f(x)}}}{\sqrt x}=1$. So we conclude $c=b^2$.
Then $$ \sqrt{x+f(x)}=x-f(x)^2=x-\frac{a^2+2a\sqrt{b^2x+d}+b^2x+d}{b^2}=-\frac{(a^2+d)+2a|b|\sqrt{x+d/b^2}}{b^2}$$
Repeat the trick from above, i.e. divide by $\sqrt x$ and take the limit as $x\to\infty$, to conclude that $-\frac{2a|b|}{b^2}=1$. From this with $\gcd(a,b)=1$, conclude $a=-1$, $b=2$, hence $c=4$.
Can you do the last step to find $d$?
