solving the differential equation $y'=2xy$, $y(0)=2$ When solving the differential equation $y'=2xy$, $y(0)=2$, we say:
$$\int\dfrac{dy}{y}=\int2xdx+C$$
$$ln|y|=x^2+C$$
But how could we divide by y, What if it is equal to zero at some point?
 A: Whenever you solve a separable ODE, you should begin by identifying any stationary solutions to the equation. Provided you have uniqueness, any other solutions will never cross the stationary solutions, so that all solutions are either completely stationary or can be found by separation of variables. Without uniqueness, problems can arise; you might consider the problem $y'=y^{2/3},y(0)=0$ for an example.
In your particular problem, the possible solutions to the original DE are the one you found using separation of variables, as well as $y=0$. Your equation has unique solutions, so with your initial condition, you will not hit zero, and so the division is legitimate.
A: It was good to notice we would have a problem if $y(x) = 0$ for some $x$. To see why we do not need to worry about this, let's suppose $y(x) = 0$ for all $x$. You would get the differential equation $y' = 0$ which is clearly satisfied by $y = 0$. However, your initial condition would fail as $2 \neq y(0) = 0$. This tells us that $y(x)$ must be non-zero some of the time. So we are secure in considering the case that $y(x) \neq 0$. Taking the algebra you've done so far and treating each side as an exponent of $e$ yields  $$y(x) = ce^{x^2}$$ which is valid so long as $y(x) \neq 0$ and where $c = 2$ from your initial condition. Now that we have a quantity $2e^{x^2}$ you can try to find values of $x$ such that $y(x)=0$. Or equivalently, values of $x$ where $2e^{x^2} = 0$. This is impossible as $e^{x^2}>0$ for all $x \in \Bbb{R}$ (despite the quantity approaching $0$ as $x \to \pm \infty)$. Hence, dividing by $y$ is always safe since it can never take on a value of $0$. 
A: In addition to having the nice explanation by @Ian you can look at the particular example. When you start your trajectory at $y(0)=2$ you see that for small positive values of $x$ the equations gives $y'(x)=2xy(x)>0$ since $x>0$ and $y(x)$ is nearly $2$. Since the derivative is positive, the function is increasing, thus, $y(x)$ stays above $2$ all the time for $x>0$.
