This is from Arnold's ODE:
$\mathbf{Problem.}$ Can every smooth direction field in a domain of the plane be extended to a smooth vector field?
$\mathbf{Answer.}$ No, if the domain is not simply connected.
I cannot see why simply connected is required.
Here is the definition of vector field given in the book:
$\mathbf{Definition}$. A smooth vector field $\mathbf{v}$ is defined in a domain $M$ if to each point $x$ there is assigned a vector $\mathbf{v}(x)\in T_{x}M$ (tangent space) attached at that point and depending smoothly on the point
From this definition, I have no clue why we cannot just assign direction field a smooth scalar function(the length of vector) then we obtain a smooth vector field.
Please help. Thank you!
Let's consider our domain to be $D = \mathbb{R}^2\setminus\{(0,0)\}$, which is not simply connected. We will define a direction field on $D$ which cannot be extended to a continuous vectorfield, much less a smooth one.
We will use polar coordinates with $\theta$ restricted to $[0,2\pi)$.
At the point $(r,\theta)$, we associate the direction with slope $\tan(\theta/2)$. Thus, starting along the positive $x$-axis, all of our slopes are $0$. As $\theta$ gets to $\pi/2$, all of the slopes are $1$. Along the negative $x$ axis, all the slopes are $\infty$ (so vertical). Once $\theta$ gets to $3\pi/2$, the slopes are all $-1$, and they return to $0$ as $\theta$ increases to $2\pi$.
I claim there is no vector field whose corresponding direction field is this one. First, because there is a direction associated to every point in $D$, any hypothetical vector field which corresponds to this must be non-zero everywhere. Dividing by the length of the vector, we may assume the corresponding vector field (if one exists) consists of unit vectors.
Now, let's focus on the vector at the point $(r,\theta) = (1,0)$ (which corresponds to the usual $(x,y) = (1,0)$). The direction field there is a line of $0$ slope, so the vector at this point is either $\langle 1,0\rangle$ or $\langle -1,0\rangle$.
I will assume it is $\langle 1,0\rangle$ (the other choice works analogously). By continuity, our vector field along the $x$-axis is just $\langle 1,0\rangle$.
Now, let's allow $\theta$ to vary. For any $\theta$, we need a unit vector $\langle a,b\rangle$ with $\frac{b}{a} = \tan(\theta/2)$. Further, by continuity, we must take $a > 0$ if $\theta$ is small. The point is that this information completely determines $\langle a,b\rangle$: $ b = a\tan(\theta/2)$ so $b^2 = a^2\tan^2(\theta/2)$, so from the equation $a^2 + b^2 = 1$, together with the fact that $a>0$ when $\theta$ is small, we see $a = \sqrt{\frac{1}{1+\tan^2(\theta/2)}} = \cos(\theta/2)$ and $b = a\tan(\theta/2) = \sin(\theta/2)$.
(If we started the whole process with $\langle -1,0\rangle$ instead, then $a$ and $b$ would flip sign.)
In summary, if any vector field works, it must either be given by $$\langle \cos(\theta/2), \sin(\theta/2)\rangle \text{ or }-\langle \cos(\theta/2), \sin(\theta/2)\rangle.$$
But now consider what happens when $\theta < 2\pi$ gets close to $2\pi$. If we originally picked $\langle 1,0\rangle$, then we see that for $\theta<2\pi$ but close to $2\pi$, the vector field points to the left. Thus, our vector field is discontinuous along the positive $x$-axis! The same issue rules out the choice of $\langle -1,0\rangle$ at the beginning. Hence, this smooth direction field cannot come from a continuous vector field, must less a smooth one.