# Existence and uniqueness of solution of IVP with separation of variables

I know that if $f$ is Lipschitz or $C^1$ then the IVP $x'=f(t,x), x(t_0)=x_0$ has a solution, which is also unique.

Now I'm wondering whether the IVP $y'(x)=h(x)g(y(x)), y(x_0)=y_0$ ($h\in C([x_0-h,x_0+h],\mathbb{R}), g\in C([y_0-\delta,y_0+\delta],\mathbb{R}), g(y_0)\neq 0$) has a solution which is also unique.

Attempt 1: I considered $\Omega:=[x_0-h,x_0+h]\times [y_0-\delta,y_0+\delta]$ and $f\in C(\Omega,R),\ f(x,y):=h(x)g(y(x))$ which would guarantee a unique solution by Peano-Picard theorem if $f$ were Lipschitz or $C^1$ which is not necessarily the case unfortunately.

Attempt 2: I tried by separating variables, obtaining $\int \frac{dy}{g(y(x))}=\int h(x)dx$ but not knowing the expression of $g$ and $h$ I don't see how I can go further.

I'm stuck so I'd appreciate some help.

Thanks.

Your second attempt is correct. Let $\varphi(\cdot)$ be a solution of the IVP. We do not yet know if such a solution exists, but if it exists, it must satisfy: $$\frac{\varphi'(x)}{g(\varphi(x))} = h(x) \quad \text{ for } x \in (\alpha, \beta).$$ Integrate the above from $x_0$ to $x$ to obtain $$\int\limits_{x_0}^{x} \frac{\varphi'(\xi)}{g(\varphi(\xi))} d\xi = \int\limits_{x_0}^{x} h(\xi) \, d\xi,$$ which gives, by integration by substitution $$\tag{*} \int\limits_{y_0}^{\varphi(x)} \frac{d\eta}{g(\eta)} = \int\limits_{x_0}^{x} h(\xi) \, d\xi, \quad \text{ for } x \in (\alpha, \beta).$$ Introduce the notation $$P(y) := \int\limits_{y_0}^{y} \frac{d\eta}{g(\eta)}, \quad H(x) := \int\limits_{x_0}^{x} h(\xi) \, d\xi.$$ In that notation ($*$) takes the form $$\tag{**} P(\varphi(x)) = H(x) \quad \forall{x \in (\alpha, \beta)}.$$ Assume for the sake of simplicity that $g(y_0) < 0$. By continuity, $g(y) < 0$ for $y$ sufficiently close to $y_0$. Therefore, the mapping $$y \mapsto P(y)$$ is strictly decreasing, consequently invertible, on some neighborhood of $y_0$. We can apply its inverse, $P^{-1}$ (not reciprocal!) to ($**$) to obtain $$\tag{***} \varphi(x) = P^{-1}(H(x)) \quad \forall{x \in (\alpha, \beta)}.$$ We have thus obtained both existence and uniqueness (because ($***$) is the only possibility for a solution to the IVP).