Always "one double root" between "no root" and "at least one root" ? (Second version) Let $a<b$ be two real numbers. Let $f(x,y)$ be a bivariate polynomial. Suppose that $f(x,.)$ has no real roots in the interval $[a,b]$ when $x<0$, but has at least one real root in the interval $[a,b]$ when $x>0$. Does it automatically follow that $f(0,.)$ either vanishes on one of the endpoints (i.e. $f(0,a)=0$ or $f(0,b)=0$), or $f(0,.)$ has a double root in the open interval $(a,b)$ ?
This is closely related to that recent MSE question of mine, and I initially asked it in the same question, but finally decided to move it here.
 A: Proof:
Without loss of generality, assume $f(x,\cdot)$ is positive in $[a,b]$ for $x<0$.
Assume $f(0,\cdot)$ have no roots in $[a,b]$. Then since $[a,b]$ is compact and $f(0,\cdot)$ is continuous, it must have a minimum $\epsilon>0$. Then since $f(\frac{1}{n},\cdot)$ is a sequence of function converge pointwise to $f(0,\cdot)$ and each function is analytic and $[a,b]$ is compact, it must converge uniformly. In other word, there exist an $N$ such that $|f(\frac{1}{N},\cdot)-f(0,\cdot)|$ is bounded above by $\frac{\epsilon}{2}$, which means $f(\frac{1}{N},\cdot)$ have no roots. Contradiction.
Hence $f(0,\cdot)$ have at least $1$ root. Let that be $r$. If $r=a$ or $r=b$ we are done. Otherwise $r\in(a,b)$.
Assume $f(0,\cdot)$ take on negative value $-\epsilon<0$ at $y=t\in(a,b)$, then once again by the same argument as above $f(-\frac{1}{n},\cdot)$ is a sequence of function converge pointwise to $f(0,\cdot)$ and each function is analytic and $[a,b]$ is compact, it must converge uniformly. So there exist an $N$ such that $|f(-\frac{1}{N},\cdot)-f(0,\cdot)|$ is bounded above by $\frac{\epsilon}{2}$, which means $f(-\frac{1}{N},\cdot)$ is negative at $y=t$. Hence by immediate value theorem (since $t\in(a,b)$ but $f(-\frac{1}{N},\cdot)$ is positive at $a$ and $b$) we have $f(-\frac{1}{N},\cdot)$ have a root in $[a,b]$, contradiction.
Hence $f(0,\cdot)$ is nonnegative in $[a,b]$. Since $r\in(a,b)$ is a root so $r$ must be a local minima. Hence $\frac{d}{dy}f(0,y)|_{y=r}=0$.
Write $f(0,\cdot)$ as $(y-r)P(y)$. Then by product rule $\frac{d}{dy}f(0,y)=P(y)+(y-r)P^{\prime}(y)$. Since $P(y)+(y-r)P^{\prime}(y)=0$ when $y=r$ we must have $P(r)=0$ so $y-r$ is a factor of $P(y)$, so $P(y)=(y-r)Q(y)$. Hence $f(0,\cdot)=(y-r)^{2}Q(y)$ and so have double root.
This is the counterexample for previous version:
Consider $a=0,b=1$ and $f(x,y)=y^{2}+xy-1$. Then the roots are $\frac{1}{2}(-x\pm\sqrt{x^{2}+4})$. Easily checked that $\frac{1}{2}(-x-\sqrt{x^{2}+4})$ is always negative, so that root don't concern us. Then $\frac{1}{2}(-x+\sqrt{x^{2}+4})$ is a monotone strictly decreasing function that pass $1$ when $x=0$, but is always positive. Hence the requirement are satisfied. Easily checked that there are never double root when $x\in\mathbb{R}$.
