Given a 1-codimensional manifold $M^n\hookrightarrow\mathbb{R}^{n+1}$ and any local normal vector field $\nu$ it's straightforward to prove that $\partial_j\nu\in TM$, simply by differentiating the relation $\nu\cdot\nu=1$. In higher codimension, say $M^n\hookrightarrow\mathbb{R}^{n+2}$, this is not always true (it's enough to consider Frenet equations for a curve in the space). I was wondering if it is always possible to construct a basis for $TM^\perp$ with this property, that is, such that $$ \partial_j\nu_k\in TM\quad\forall j=1,\dots,n \text{ and }k=1,2. $$
I made the following attempt. In a local chart for $M$ let $e_{1},\dots,e_{k}$ be a local orthonormal basis for $TM$ and $\nu_{1},\nu_{2}$ be an oriented orthonormal basis for $TM^{\perp}$. First, notice that differentiating the relations $\nu_{k}\cdot\nu_{k}=1$ we obtain $$\partial_{i}\nu_{k}\cdot\nu_{k}=0$$ so that in general we can write $$\partial_{i}\nu_{1}=\alpha_{i}^{k}e_{k}+\beta_{i}^{1}\nu_{2}$$ $$\partial_{i}\nu_{2} =\gamma_{i}^{k}e_{k}+\beta_{i}^{2}\nu_{1}$$ Moreover, differentiating $\nu_{1}\cdot\nu_{2}=0$ we find $$0=\partial_{i}\left(\nu_{1}\cdot\nu_{2}\right)=\partial_{i}\nu_{1}\cdot\nu_{2}+\nu_{1}\cdot\partial_{i}\nu_{2}=\beta_{i}^{1}+\beta_{i}^{2}$$so that $\beta_{i}^{1}=-\beta_{i}^{2}=:\beta_{i}$ and we rewrite $$\partial_{i}\nu_{1} =\alpha_{i}^{k}e_{k}+\beta_{i}\nu_{2}$$ $$\partial_{i}\nu_{2} =\gamma_{i}^{k}e_{k}-\beta_{i}\nu_{1}.$$ In general any oriented orthonormal basis for $TM^{\perp}$ can be written as a $SO(2)$-transformation of $\{\nu_{1},\nu_{2}\}$, so we set $$\mu_{1} =\cos\theta\nu_{1}-\sin\theta\nu_{2}$$ $$\mu_{2} =\sin\theta\nu_{1}+\cos\theta\nu_{2}$$ with $\theta$ being a smooth function defined locally on $M$. We compute \begin{align} \partial_{i}\mu_{1} &=-\sin\theta\partial_{i}\theta\nu_{1}+\cos\theta\partial_{i}\nu_{1}-\cos\theta\partial_{i}\theta\nu_{2}-\sin\theta\partial_{i}\nu_{2} \\&\in TM-\left(\partial_{i}\theta-\beta_{i}\right)\sin\theta\nu_{1}-\left(\partial_{i}\theta-\beta_{i}\right)\cos\theta\nu_{2} \partial_{i}\mu_{2} \\&=\cos\theta\partial_{i}\theta\nu_{1}+\sin\theta\partial_{i}\nu_{1}-\sin\theta\partial_{i}\theta\nu_{2}+\cos\theta\partial_{i}\nu_{2} \\&\in TM+\left(\partial_{i}\theta-\beta_{i}\right)\cos\theta\nu_{1}-\left(\partial_{i}\theta-\beta_{i}\right)\sin\theta\nu_{2} \end{align} So we get to the result if we find a function $\theta$ such that $d\theta=\beta$, where $\beta=\beta_{i}dx^{i}$. By Poincaré lemma, such $\theta$ exists if $\beta$ is a closed form, so the claim becomes $$\partial_{i}\beta_{j}=\partial_{j}\beta_{i}\quad\forall i,j=1,\dots,n.$$ Now, to prove this I used that $\beta_i=\partial_i\nu_1\cdot\nu_2$ and hence $$ \partial_j\beta_i=\partial_{ji}\nu_1\cdot\nu_2+\partial_i\nu_1\cdot\partial_j\nu_2 $$ Similarly $$ \partial_i\beta_j=\partial_{ij}\nu_1\cdot\nu_2+\partial_j\nu_1\cdot\partial_i\nu_2 $$ Taking the difference we find $$ \partial_{j}\beta_{i}-\partial_{i}\beta_{j}=\partial_i\nu_1\cdot\partial_j\nu_2-\partial_j\nu_1\cdot\partial_i\nu_2. $$ From here I'm stuck. I tried several times applying different orthogonality conditions but I can't show that the r.h.s. is $0$. I suspect there may be some relation between $\nu_1$ and $\nu_2$ that I'm missing. I'm interested especially in the case where $M$ is a surface in $\mathbb{R}^4$. Also, could the minimality of $M$ be of any help here?
Any hint is very appreciated.