Maximum interval of existence for the ODE $\space y'=\frac{y}{x}$. ODE: $\space y'=\frac{y}{x}$
Its solution is $\space y=Cx$
Here, I think Maximum interval of existence of solution is $(-\infty,+\infty)$
Or it is $\space \mathbb{R} \setminus \{0\} \space$ (because, ODE is not defined for $\space x=0$)
Please, help me in finding right solution. (I'm confused!)
 A: It is not $(-\infty, \infty)$ becasue of the reason you mentioned. It cannot be $\mathbb R \setminus \{0\}$ because this set is not an interval!. The correct answer is $(0,\infty)$ or $(-\infty,0)$.
A: The initial value problem
$$\dot{y}=\frac{dy}{dx}=f(x),\quad y(0)=y_0,\tag{1}$$
has a unique solution $y(x)$ defined on a maximal interval of existence $(\alpha, \beta)$. Furthermore, if $\beta < \infty$ $(\alpha > -\infty)$ and if
$$\lim_{x\to \beta^-}y(x)=L\quad\left(\lim_{x\to \alpha^+}y(x)=L\right)$$
exists, then $L\in\dot{E}$, the boundary of $E$. On the other hand, if the above limit exists and $L \in E$, then $\beta = \infty, f(L) = 0$.
Theorem: Let $E$ be an open subset of $\mathbb R^n$ and assume that $f \in C^1(E)$. Then for each point $y_0 \in E$, there is a maximal interval $J$ on which the initial value problem $(1)$ has a unique solution, $y(x)$; i.e., if the initial value problem has a solution $h(x)$ on an interval $I$ then $I \subseteq J$ and $h(x) = y(x)$ for all
$x \in I$. Furthermore, the maximal interval $J$ is open; i.e., $J = (\alpha, \beta)$.
Definition (Maximal interval of existence).
The interval $(\alpha, \beta)$ in the above theorem is called the maximal interval of existence of the solution $y(x)$ of the initial value problem $(1)$ or simply the maximal interval of existence of the initial value problem $(1)$.
Corollary.
Let $E$ be an open subset of $\mathbb R^n$ and assume that $f \in C^1(E)$ and let $(\alpha, \beta)$ be the maximal interval of existence of the solution $y(x)$ of the initial value problem $(1)$. If $\beta < \infty$ $(\alpha > −\infty)$ and if
$$\lim_{x\to \beta^-}y(x)=L\quad\left(\lim_{x\to \alpha^+}y(x)=L\right),$$
then $L \in \dot{E}$.
Example. Consider
$$\dot{y}=\frac{-1}{2y},\quad y(0)=1.$$
The solution is given by
$$y(x)=\sqrt{1-x}.$$
The solution is defined on its maximal interval of existence $(\alpha, \beta) = (−\infty, 1)$. The function $f(x)=-1/(2x)\in C^{1}(E)$ where $E=(0,\infty)$ and $\dot{E}=\{0\}$. Note that
$$\lim_{x\to 1^-}y(x)=0\in\dot{E}.$$
Original Problem.
$$\dot{y}=\frac{y}{x},\quad y(0)=y_0\tag{2}.$$
Solving $(2)$ we find that $y(x)=Cx$. Using the initial condition $y(0)=y_0$ implies that $y(0)=0$ or $y_0=0$. Therefore, we have
$$\dot{y}=\frac{y}{x},\quad y(0)=0\tag{3}.$$
Thus, the maximum interval of existence is $(\alpha, \beta) \in \{(−\infty, 0),(0, \infty)\}$. The above IVP is equivalent to the autonomous system
$$\dot{y_1}=1,\quad \dot{y_2}=\frac{y_2}{y_1},$$
$$y_1(0)=0,\quad y_2(0)=0.$$
Thus $f(y_1, y_2) = (1, y_2/y_1)$ is not continuous when $y_1 = 0$. Since the initial value is $y_1(0)=0$, $f$ satisfies the condition of the theorem on $E=\{(y_1,y_2):y_1\neq 0\}$.
The solution of the given IVP is $y_1(x) = x,~ y_2(x) = Cx$, which is defined for every $x$. As $x\to 0^-$ or $x\to 0^+$, $(y_1(x),y_2(x))\to(0,0)$ which is on the boundary of $E$, $\dot{E}=\{(y_1,y_2):y_1=0\}$.
