# Change of coordinates in Frobenius Theorem

In proving a lemma about Frobenius Theorem:

Lemma: Let $X_l$ $l=1,2,...,p$ be independent vector fields on a $n$-dimensional manifold $M$ with $[X_i,X_j] = 0$, then there exist local coordinates $(x_1,x_2,...x_n)$ s.t. $X_i= \frac{\partial}{\partial x_i}$.

Assume after some works, we get coordinate functions $(y_1, y_2, ... , y_n)$ and get $Y_1 = X_1$, $Y_i= X_i - (X_i(y_1))X_1$ for $i=2, 3, ...p$ with $Y_i = \frac{\partial}{\partial y_i}$ for $i= 1,2,...p$.

How can we then construct a function $u= u(y_1, y_2,..., y_p)$ s.t. $\frac{\partial u}{\partial y_i} = -X_i(y_1)$ for $i= 2,3,...,p$ and $\frac{\partial u}{\partial y_1} = 1$?

(If above $u$ is done, then $(u, y_2,...y_n)$ is a coordinate system s.t. $X_1=\frac{\partial}{\partial u}$ and $X_i = \frac{\partial}{\partial y_i}$ for $i=2,3,...p$)