Find all real solutions of \[ \frac{dy}{dx}=\sqrt y, \qquad y(0)=0. \]
Solution
For \(c\in[0,\infty)\), define \[ y_c(x) \coloneqq \begin{cases} 0,&x\le c,\\ \dfrac{(x-c)^2}{4},&x\ge c. \end{cases} \] Also write \(y_\infty\equiv0\).
1. Every real solution \(y:\RR\to\RR\) satisfies\[ y(x)\ge0 \]for all \(x\), is nondecreasing, and vanishes for every \(x\le0\).
The expression \(\sqrt{y(x)}\) is real only when \(y(x)\ge0\). Hence the differential equation gives \[ y'(x)=\sqrt{y(x)}\ge0, \] so \(y\) is nondecreasing. If \(x\le0\), then monotonicity and the initial condition give \[ 0\le y(x)\le y(0)=0. \] Thus \(y(x)=0\) for every \(x\le0\).
2. If \(y\) is not identically zero, there is a unique number\[ c\in[0,\infty) \]such that\[ y(x)=0\quad(x\le c), \qquad y(x)>0\quad(x>c). \]
Let \[ P\coloneqq\{x\in\RR:y(x)>0\}. \] By step 1, \(P\subseteq(0,\infty)\). Since \(y\) is nondecreasing, \(P\) is upward closed: if \(x\in P\) and \(t>x\), then \[ y(t)\ge y(x)>0, \] so \(t\in P\).
Assume \(P\ne\varnothing\) and put \[ c\coloneqq\inf P. \] Then \(c\ge0\). If \(x<c\), then \(x\notin P\), and since \(y(x)\ge0\) we have \(y(x)=0\). Continuity of \(y\) gives \(y(c)=0\). If \(x>c\), the definition of the infimum gives some \(p\in P\) with \(c\le p<x\), and monotonicity then gives \[ y(x)\ge y(p)>0. \] This proves the assertion, and the transition point is unique because it is the boundary between the zero and positive sets.
3. For the number \(c\) from step 2,\[ y(x)=\frac{(x-c)^2}{4} \]for every \(x>c\).
On \((c,\infty)\), step 2 gives \(y>0\). Hence \[ u(x)\coloneqq\sqrt{y(x)} \] is differentiable there, and the chain rule together with the differential equation gives \[ u'(x) = \frac{y'(x)}{2\sqrt{y(x)}} = \frac12. \] Therefore \[ u(x)=\frac{x}{2}+K \] on \((c,\infty)\) for some constant \(K\). By continuity of \(y\) and \(y(c)=0\) from step 2, \[ \lim_{x\downarrow c}u(x)=0. \] Thus \(K=-c/2\), so \[ \sqrt{y(x)}=\frac{x-c}{2} \] for \(x>c\), and squaring gives the claimed formula.
4. Every solution is one of the functions \(y_c\) with\[ c\in[0,\infty], \]where \(c=\infty\) denotes the identically-zero solution.
If \(y\equiv0\), then \(y=y_\infty\). Otherwise step 2 gives a finite \(c\ge0\). On \(x\le c\), that step gives \(y=0\), while step 3 gives \[ y(x)=\frac{(x-c)^2}{4} \] for \(x>c\). Hence \(y=y_c\).
5. Conversely, every \(y_c\) with \(c\in[0,\infty]\) is a solution.
For finite \(c\), the two defining pieces agree at \(x=c\). Their derivatives are respectively \[ 0 \qquad\text{and}\qquad \frac{x-c}{2}, \] so the one-sided derivatives also agree at \(c\) and equal \(0\). Thus \(y_c\) is differentiable on \(\RR\). For \(x<c\), \[ y_c'(x)=0=\sqrt{y_c(x)}, \] and for \(x>c\), \[ y_c'(x)=\frac{x-c}{2} = \sqrt{\frac{(x-c)^2}{4}} = \sqrt{y_c(x)}, \] because \(x-c>0\). At \(x=c\), both sides are \(0\). Since \(c\ge0\), also \(y_c(0)=0\).
The function \(y_\infty\equiv0\) satisfies \(y_\infty'=0=\sqrt{y_\infty}\) and \(y_\infty(0)=0\).
6. Therefore the complete set of real solutions on \(\RR\) is\[ \boxed{ y_c(x)= \begin{cases} 0,&x\le c,\\ \dfrac{(x-c)^2}{4},&x\ge c, \end{cases} \quad c\in[0,\infty), \qquad y_\infty\equiv0. } \]
Step 4 proves that no other solution exists, and step 5 verifies every displayed function. If a solution is understood to have an arbitrary interval domain containing \(0\), the same argument on that interval shows that it is the restriction of one of these global solutions.
7. Q.E.D.
Step 6 gives all solutions of the differential equation satisfying \(y(0)=0\).