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.

Equation $$x^4 + x^2 (1 - 2 r) - 2 x + 1 = 0$$
has only one real solution if the curve $y=x^4 + x^2 (1 - 2 r) - 2 x + 1$ is tangent to $x$-axis, that is: the curve has a absolute minimum, provided that $y''=2 (1-2 r)+12 x^2$ is positive, which means $1-2r>0\to r<\frac{1}{2}$
Derivative is $y'=4 x^3 +2 (1-2 r) x-2$. We have $y'=0$ for $r=\frac{2 x^3+x-1}{2 x}$.
Substitute in the given equation
$$x^4 + x^2 \left(1 - 2\cdot \frac{2 x^3+x-1}{2 x}\right) - 2 x + 1 = 0$$
which gives
$$x^4+x-1=0$$
Real solutions are
$$x_1=-1.22074;\;x_2= 0.724492$$
Correspondent $r$ values are
$$r_1=2.3998;\; r_2=0.33475$$
$r_1$ must be discarded because it is larger than $1/2$ so the unique solution is
$$r = 0.33475$$
