I'm trying to solve the following problem. It's exercise 1.6 of the book Ordinary Differential Equations by Barreira & Valls.
Let $f:(a,b) \rightarrow \mathbb{R} \backslash \{0\}$ be a continuous function.
a) Show that the function $g:(a,b) \rightarrow \mathbb{R}$ defined by
$$g(x) = \int_{x_0}^x \frac{1}{f(y)}dy$$
is invertible for each $x_0 \in \mathbb{R}$.
b) Show that the initial value problem (1.13) has a unique solution. Hint: For a solution $x(t)$, compute the derivative of the function $t \mapsto g(x(t))$
Note: (1.13) is the following IVP
\begin{cases} x' = f(t,x),\\ x(t_0) = x_0, \end{cases} where $(t_0,x_0) \in D \subseteq \mathbb{R} \times \mathbb{R}^n$, and $D$ is an open set.
a) I think I have to use the inverse function theorem, but this theorem requires that $g$ be $C^1$ according to Wikipedia https://en.wikipedia.org/wiki/Inverse_function_theorem. I don't even know if I can integrate $\frac{1}{f(x)}$. What if $f(x) = x$ and $(a,b) = (0,1)$. I could pick $x_0 = 0$ and $g(x)$ wouldn't even be defined. And what if $f(x)$ gets really big and $\frac{1}{f(x)}$ gets really close to zero. Is it still true that $g'(x)$ is nonzero? Sure, if I just blindly apply the fundamental theorem of calculus and the inverse function theorem I get that $g'(x) = \frac{1}{f(x)}$, but is that correct?
b) I do not understand the hint. I have to solve the following (autonomous) problem
\begin{cases} x' = f(x),\\ x(t_0) = x_0. \end{cases}
I do what the hint says
$$\frac{dg(x)}{dt} = \frac{dg(x)}{dx} \frac{dx}{dt} = \frac{1}{f(x)}x'(t).$$
I have assumed $\frac{dg(x)}{dx} = \frac{1}{f(x)}$. I don't see how I can get a solution from this. Already Peano's theorem tells me I have a solution because $f$ is continuous but I imagine the book wants me to find a specific solution and then prove it's the only one.
Any help is appreciated.
Let us take $x_0\in(a,b)$ and $f(t,x)=f(x)$, which needs to be the intention.
Note that $g'(x)=1/f(x)$ is always positive or always negative (since $f$ never vanishes). Therefore, $g$ is either strictly increasing or strictly decreasing, and so it is invertible.
Using the hint, for a solution $x(t)$ of the equation $x'=f(x)$ we obtain $$ \frac{d}{dt}g(x(t))=\frac{x'(t)}{f(x(t))}=1 $$ and so $$g(x(t))-g(x_0)=t-t_0.$$ Therefore, $$x(t)=g^{-1}(t-t_0+g(x_0))$$ in some appropriate domain. In particular any solution is unique (given by the former formula).