Let $f:\mathbb{R}\to \mathbb{R}$ a continuous and positive function such that $\int_0^{1}f(t)dt=5$. Show that there is an interval $J=[0,a]$ such that for all $x\in J$ there is an unique $g(x)\in [0,1]$ such that $\int_x^{g(x)}f(t)dt=3$. Find $g'(x)$.
My effort:
I considered the open set, $$U=\{(x,y)\in \mathbb{R}^2:x<y\},$$ and I defined the function $F:U\to \mathbb{R}^2$ defined by, $$F(x,y)=\int_x^{y}f(t)dt-5.$$ But, I have a problem because I don't know if the fuction $f$ is Riemann integrable in $\mathbb{R}$, I only know that It is Riemann integrable in $[0,1]$. So, I have to define a new open set. How can I define it?
Finding a value $g(x)$ for each $x$ does not require the implicit function theorem. Since the function $G(x,y) = \int_x^y f(t) dt$ is continuous, and $G(0,1) = 5$, we may find $a \in (0,1)$ close to $0$ such that for all $x \in J = [0,a]$, $3 < G(x,1)$.
Then, leaving $x \in J$ fixed, notice that $\lim_{y \to x^+} G(x,y) = 0$ and $G(x,1) > 3$. By the intermediate value theorem, we may find $g(x)$ such that $G(x,g(x)) = 3$. We may now apply the implicit function theorem (since $G$ is continuously differentiable) to the function $G(x,g(x)) - 3$, and obtain that $g(x)$ is differentiable along with a way to compute its derivative.