Extension of Sections of Restricted Vector Bundles

Edit: Changing Question:
There are two questions related questions:

extending a smooth vector field

extending a vector field defined on a closed submanifold

I’m trying to answer a question which is a generalization of this, namely:

Suppose $M$ is a smooth manifold, $E\to M$ is a smooth vector bundle, and $S\subset M$ is an embedded submanifold with or without boundary. For any smooth section $\sigma$ of the restricted bundle $E|_S\to S$,
show that there exists a neighborhood $U$ of $S$ in $M$ and a smooth section $\tilde{\sigma}$ of $E|_U$ such that $\sigma=\tilde{\sigma}|_S$.

I’m not sure where to go. In the case where the bundle is the tangent bundle, this is doable by going to slice charts and extending the functions in a particular basis. However, in this case the same idea doesn’t work.

Any ideas?

Solutions Collecting From Web of "Extension of Sections of Restricted Vector Bundles"

Right, so I figured it out thanks to Philip Andreae’s comments. For each $p\in S$, pick a chart $(U_p,\phi_p)$ in $M$ such that $U_p\cap S\subset U_p$ is a $k$-slice. Let $\sigma:S\to E|_S$ be the section. Then $\sigma$ restricts to a section on $U_p\cap S$. If $W_p$ is the associated smooth local trivialization on $M$ (i.e. $\Phi:\pi^{-1}(W_p)\to W_p\times\mathbb{R}^n$) around $p$, after replacing $U_p$ with $U_p\cap W_p$, we can assume that the smooth local trivialization exists around $U_p$. Then there is a local frame $\tau_1,\dots,\tau_n$ associated with $U_p$. Thus $\sigma=(\sigma^1\tau_1,\dots,\sigma^n\tau_n)$ for $\sigma^i:U_p\cap S\to \mathbb{R}$ smooth. Since $U_p\cap S\subset U_p$ is closed and $U_p\subset M$ is a submanifold, we can extend $\sigma^i$ to $\tilde{\sigma}^i:U_p\to \mathbb{R}$ in the canonical way. Thus we have extended $\sigma$ on $U_p\cap S$ to $\sigma_p:U_p\to E|_{U_p}$ expanded in local coordinates. Now we do the usual business using partitions of unity to create some $\tilde{\sigma}:\bigcup_{p\in S} U_p=U\to E|_U$, which, by a standard calculation, extends $\sigma$ and is a smooth section.

If $S\subset M$ is properly embedded, then we can expand the partition of unity argument to have $\tilde{\sigma}:M\to E$ a global smooth section.