# Let $f,g:[0,1]\to\Bbb{R}$ such that $f(1)<0<f(0)$, $g$ is continuous on $[0,1]$ and $f+g$ is nondecreasing, Prove that $\exists x_0\in [0,1],f(x_0)=0$

I got this problem:

Let $f,g:[0,1]\to\Bbb{R}$ be functions such that $f(1)<0<f(0)$, $g$ is continuous on $[0,1]$ and $f+g$ is nondecreasing on $[0,1]$. Prove that there exist $x_0\in [0,1]$ such that $f(x_0)=0$.

My try:
Let's define a set $A=\{x\in[0,1]| 0\leq f(x)\}$, Since $0<f(0)$ we get that $0\leq f(0)$ and so $0\in[0,1]$ which implies that $A\neq \emptyset$, Now since $1$ is an upper bound of $A$ we get that $\sup(A)$ exists. Set $x_0=\sup(A)$. Now let's define a function $h :[0,1]\to\Bbb{R}$ by the rule $\forall x\in[0,1], h(x)=f(x )+g(x)$, Now since $h$ is non decreasing in $[0,1]$ we get that $\forall x\in A, g(x )\leq h(x) \leq h(x_0)$

Now any help on how to continue/alternative solution will be appreciated.

Next, $g$ is continuous thus $h(x_o)\ge g(x)$ gives $h(x_o)\ge g(x_o)$, and so $f(x_o)\ge0$ then notice that$g(1)>h(1)\ge h(x_o)\ge g(x_o)$ . Since $g$ is continuous $\exists t\ge x_o$ such that $g(t)=h(x_o)$. Then $h(t)\ge h(x_o)=g(t)$, so that $f(t)\ge0$. But since $x_o$ is the supremum of $A$ we must have $t=x_o$, so that $h(x_o)=g(x_o)$ implying $f(x_o)=0$
• By the way, is $x_0$ must be in $A$? Or it doesn't matter? – MathNerd Sep 27 '14 at 18:16
• just to have assurance that it lies in $[0,1]$ – Bhauryal Sep 27 '14 at 18:35
• I still do not get why $\forall x\in A, g(x)\leq h(x) \leq h(x_0)$ implies that $g(x_0)\leq h(x_0)$ (since we do not know wether $x_0\in A$) ? – MathNerd Sep 28 '14 at 8:04
• $g(x)$ is continuous on $[0,1]$ so we're taking $\displaystyle \lim_{x\to x_o}$ both sides – Bhauryal Sep 28 '14 at 8:33
• Does there exist a left or right neighborhood of $x_0$ such that each $x$ in this neighborhood satisfies $g(x)\leq h(x_0)$ and so we will be able to conclude that $g(x_0)\leq h(x_0)$ by continuity ? – MathNerd Sep 28 '14 at 8:34