Find $r$ such that the equation $x^4+x^2(1-2r)-2x+1=0$ has only one real solution I'm looking for $r$ such that the equation $$x^4+x^2(1-2r)-2x+1=0$$
has only one real solution. I've made some attempts to this problem, but it seems that I even didn't get close to the solution. The approximation for $r$ is 0.3347498 
Is it possible to find analytic solution for $r$ and if yes then how?
Thanks for all the help.

We can write the function in following form where $c>0$.
$(x-a)^2((x-b)^2+c)=0$
$(x^2-2ax+a^2)(x^2-2bx+b^2+c)=0$
$x^4-(2a+2b)x^3+(a^2+b^2+4ab+c)x^2-(2ab^2+2ac+2a^2b)x+a^2b^2+a^2c=0$
Therefore,
$b=-a, c={1-a^4\over a^2} > 0$
$2ab^2+2ac+2a^2b=2a^3+{2-2a^4\over a}-2a^3=-2,a^4-a-1=0$
$1-2r=a^2+b^2+4ab+c=2a^2-4a^2+{1-a^4\over a^2}={1-3a^4\over a^2}=-{3a+2\over a^2}$
$r={a^2+3a+2\over 2a^2}$
We take the real root where $a^4<1$ in $a^4-a-1=0$ which is around $-0.72449$ and gives $r$ around $0.33476$. And yes, there is a closed formula for quartic equation using radicals so $r$ also has an exact formula as well, but it should be pretty messy.
