Solve $y'=\sqrt{xy}$ with the initial condition $y(0)=1$. Problem: Solve $y'=\sqrt{xy}$ with the initial condition $y(0)=1$.
Attempt: Using $\sqrt{ab}=\sqrt{a}\cdot\sqrt{b}$, I get that the DE is separable by dividing both sides by $\sqrt{y}:$ $$y'=\sqrt{x}\cdot\sqrt{y}\Leftrightarrow\frac{y'}{\sqrt{y}}=\sqrt{x}$$
which can be rearranged to $$\frac{1}{\sqrt{y}}dy=\sqrt{x}dx$$ and proceeding to integrate both sides. 
$$\int\frac{1}{\sqrt{y}} \ dy=\int\sqrt{x} \ dx \Longleftrightarrow2\sqrt{y}+C_1=\frac{2x\sqrt{x}}{3}+C_2$$
Which eventually gives $$y(x)=\left(\frac{\frac{2x\sqrt{x}}{3}+C_2-C1}{2}\right)^2=\left(\frac{x\sqrt{x}}{3}+D\right)^2=\frac{x^3}{9}+D.$$
Question: However, according to this question I posted yesterday, $\sqrt{xy}=\sqrt{x}\cdot\sqrt{y}$ only holds for $x,y\geq 0$, but nowhere in this question is this restriction given given. Why is it ok for me to use it then?
Sidenote/question: Is my way of solving the DE correct? Any room for improvement?
 A: A solution of this Cauchy problem can not be defined in an interval $(-r,0)$ with $r>0$ because $y(0)=1$ and, by continuity, $y(x)$ is positive in a neighborhood of $0$ whereas $x<0$ so $xy<0$ and the square root on the RHS is not defined.
Moreover, for $x>0$, $y'(x)=\sqrt{xy(x)}\geq 0$ implies that $y$ is increasing. Therefore $y(x)\geq y(0)=1>0$.
Hence, with the initial condition $y(0)=1$, you may assume that $x\geq 0$ and $y(x)\geq 0$. 
It follows that your solution
$$y(x) = \left(1 + \frac{x^{3/2}}{3} \right)^2$$
holds in the maximal interval $[0,+\infty)$.
P.S. Note that with the initial condition $y(0)=0$, the problem has not a unique solution. Two of them are $y(x)=0$ and $y(x)=x^3/9$ and their maximal interval is $\mathbb{R}$.
A: As $y(0)>0$, $xy$ is negative for $x=0^-$ and $y$ can not be defined in the negatives. On another hand, you certainly have $y(x)>0$ in some neighborhood of $x=0^+$.
As the initial condition is given, you can use definite integrals,
$$\int_1^y\frac{dy}{\sqrt y}=\int_0^x\sqrt xdx,$$
giving
$$2(\sqrt y-1)=\frac{2x\sqrt x}3$$ and
$$y=\left(\frac{x\sqrt x}3+1\right)^2.$$
As a last check, we must verify that the LHS of the second identity is positive (as the RHS certainly is). This holds for $y\ge1$, which is guaranteed by the given solution.
A: Yes, you can make that restriction based on the initial point.
You could avoid using two integration constants, using one integration constant $D$ (or $C$) when integrating both sides of an equation is standard.
A: Since $y(0) = 1 > 0$, your solution will be positive near $x=0$ (where it is defined).
Hence, the inequality $x y(x) \geq 0$ can be satisfied (near $x=0$) only for $x\geq 0$.
At this point you can look for a solution $y\colon [0,a)\to\mathbb{R}$ such that $y(x) > 0$ for every $x\in [0,a)$.
If we define
$$
F(y) := \int_1^y \frac{1}{\sqrt{s}}\, ds = 2\sqrt{y} - 2,
\qquad y > 0,
$$
your solution is implicitly defined by
$$
F(y(x)) = \frac{2}{3} x^{3/2}, \qquad x\in [0,a),
$$
i.e.
$$
\sqrt{y(t)} = 1 + \frac{1}{3} x^{3/2}, \qquad x\in [0,a).
$$
Since the r.h.s. is positive for every $x\geq 0$, you can choose $a=+\infty$ and your solution is given by
$$
y(t) = \left(1 + \frac{1}{3} x^{3/2}\right)^2, \qquad x\geq 0.
$$
