Suppose I have an ODE-problem of the form: \begin{equation} \begin{cases} x'(t)= g(t) h(x(t))\\ x(t_{0})=x_{0}, \end{cases} \end{equation} where both functions $g$ and $h$ are smooth. Suppose further that $h(t)=0$ if and only if $t=0$.
Now, if $x_{0} =0$, then clearly the solution of the problem is the constant function $x=0$. Else, if $x_{0} \neq 0$, then there exists an open interval containing $x_{0}$ where $h$ is non-zero. Thus, dividing by $h(x(t))$, we can solve the separable ODE using the standard method.
Suppose that, when $x_{0} \neq 0$, the solution of \begin{equation} \begin{cases} x'(t)/h(x(t))= g(t) \\ x(t_{0})=x_{0}, \end{cases} \end{equation} is well-defined and non-zero for all $t \in \mathbb{R}$. Since this solution also solves the first system, by uniqueness, it must be the solution of the first system.
My question is: Is this reasoning correct? I am a bit confused because it seems to me like we are finding the solution under the assumption that it is non-zero. What is the best way of handling this problem?
Your argument is wrong. Consider the following IVP: $$ x'=x-1,x(0)=0. $$ Clearly it has the solution $$ x=1-e^t $$ which is not a zero solution.