hey I cant seem to solve this at all, not sure how you do it with no x values
$$y'=-y^2, y(1)= \sqrt{2}$$
hey I cant seem to solve this at all, not sure how you do it with no x values
$$y'=-y^2, y(1)= \sqrt{2}$$
On
The standard technique for separable equations gives $$y=\frac1{x+c}.$$Now you ask what if $y=0$ at some point? Then that technique doesn't work.
Non-mathematical comment: If this is homework for a standard DE class I guarantee you that the grader will not expect you to worry about that, you can just ignore the issue.
Of course that doesn't solve the problem. (Pointing out that $y=0$ is the trivial solution also doesn't resolve the issue - that applies if $y$ is identically $0$, not if it's just $0$ at some point.)
In fact $y\ne0$, which you can prove as follows:
We're given that $y(1)\ne0$. Since $y$ is continuous (being differentiable) it follows that there exist $a,b$ with $a<1<b$ such that $y$ has no zero in the open interval $(a,b)$.
Suppose (to get a contradiction) that there exists $x>1$ with $y(x)=0$. Since $y$ is continuous, there is a smallest $ B>1$ such that $y(B)=0$. So $y\ne0$ on the interval $[1,B)$, and so the separable-equation technique shows that there exists $c$ such that $$y(x)=\frac1{x+c}\quad\text{if } 1\le x<B.$$
But again $y$ is continuous, hence $y(B)=1/(B+c)$, which implies $y(B)\ne0$, contradiction.
Similarly $y(x)\ne0$ for $x<1$.
(If you didn't follow that sorry; none of the students in my DE classes would follow it, which is why we ignore this sort of issue in that class.)
Note If you know the standard existence and uniqueness theorem then it follows that there's no problem: $y=1/(x+c)$ is a solution to the given IVP (for an appropriate $c$), hence it's the only solution, hence the solution never vanishes.
The second proof looks simpler, but in fact if you add in the proof of the existence and uniqueness theorem it's much harder; the point to the first proof I gave is we don't need that big theorem.
Someone asks about the general case. Turns out it's never a problem.
Edit: In a previous version I said something assuming that if $\phi$ abd $\psi$ are Lipschitz on all of $\Bbb R$ then $y'=\phi(y)$, $u(x_0)=y_0$ has a solution valid on all of $\Bbb R$. That's nonsense; in fact the IVP in the OP shows it's nonsense. But it is true that where there is a solution we must have $\phi(y(x))\ne0$, so if a solution exists on an interval it is given by $\int dy/\phi(y)=\int \psi(x)\,dx$:
Thm. Suppose $\alpha<\beta$, $x_0\in(\alpha,\beta)$, $\phi(y_0)\ne0$, and the IVP $y'=\psi(x)\phi(y),\quad y(x_0)=y_0$ has a solution on $(\alpha,\beta)$. Then $\phi(y(x))$ has no zero in $(\alpha,\beta)$.
Suppose otoh that $x_a\in(\alpha,\beta)$ and $\phi(y(x_1))=0$. Let $y_1=y(x_1)$. Now $z=y$ is a solution to the second IVP $$z'=\psi(x)\phi(z),\,\,z(x_1)=y_1.$$But $z=y_1$ is also a solution to that second IVP, so uniqueness implies $y=y_1$. Hence $\phi(y_0)=\phi(y(x_0))=\phi(y_1)=0$, contradiction.
(So you can use the separable-equation technique as long as $\phi(y_0)\ne0$. Of course it can't work if $\phi(y_0)=0$, but in that case you don't need it; $y=y_0$ is the solution.)
Hint: since $y' = {dy\over dx}$ we get: $$\int {dy\over y^2} = -\int dx$$