Let $a(x)>0$ be a piecewise continuous function defined on $[0, \infty)$ and assume for a differentiable function $f: [0, \infty) \rightarrow R$ we have,
$$ \frac{d}{dx}f = a(x) + a_0\,f+ a_{1}\,f^{2} + ... + a_n \, f^n,$$
for some integer $n$ and real numbers $a_i$.
Is the solution $f(x)$ of the above differential equation with initial condition $f(0)>0$ always a positive function?
For a continuous $a(x) >0 $ I have this proof:
Fix $T>0$ and let $M>0$ be such that $a(x) \ge M$ on $[0, T]$ (any continuous positive function on a compact set has a positive minimum). Obviously $f$ is continuous because derivative exists for all $x$. Starting from $f(0)>0$ if $f(a)=0$ at some $a$, then there exists interval $(a-\delta t, a)$ on which $0 <|a_0\,f|+ |a_{1}\,f^{2}| + ... + |a_n \, f^n| < M$ and hence $\frac{d}{dx}f >0$ on $(a-\delta t, a)$ which means $f$ increases on this interval which contradicts with $f(a)=0$. Therefore, $f(x)>0$ on $[0,T]$. Since $T$ is arbitrary therefore, $f(x)>0$ for all $x$.
Can we also show the solution is always positive if $a(x)>0$ is piecewise continuous?