# $f:[0,2] \rightarrow \mathbb{R}$ continuous and positive such that $\int_{0}^{1} f(x) dx=1$

Let $$f:[0,2] \rightarrow \mathbb{R}$$ continuous and positive such that $$\int_{0}^{1} f(x) dx=1$$ for each $$x \in [0,1]$$ prove that there is a unique $$g(x) \in[1,2]$$ such that $$\int_{x}^{g(x)} f(t) dt=1$$ prove that the function $$g:[0,1] \rightarrow \mathbb{R}$$ is the class $$\mathbb{C}^1$$

by the fundamental theorem of calculus $$F(1)-F(0)= \int_{0}^{1} f(x)dx$$

Counterexample: Choose $$f$$ as above, with $$\int_{1/2}^1f=\int_1^2f=1/3.$$Then $$\int_{x}^{g(x)}f\le2/3$$for every $$x\in[1/2,1]$$.