Construct chart from vector fields Suppose $M$ is a smooth manifold and $U$ is an open neighborhood of $p\in M$, let $\{X_1,\ldots,X_n\}$ be vector fields defined in $U$ such that for every $q\in U$ the set $\{(X_1)_q,\ldots, (X_n)_q \}$ is a basis for $T_qM$. I want to find out under what conditions is it possible to find a chart $(V,\phi)$ around $p$ such that $V\subset U$ and $$(*)\quad (X_i)_q=\frac{\partial}{\partial\phi^i}\Bigr|_q\quad \text{ for } i=1,\ldots,n\quad \text{ and every }q\in V$$
Here is my attempt of the situation. Let $(W,\psi)$ be some chart around $p$, now we can write $X_i$ in componentsas $$X_i=\sum_j X_i^j\frac{\partial}{\partial\psi^j}$$
We want a map $\phi:W\to \mathbb{R}^n$ that satisfies $(*)$ in its coordinates, the coordinates $(X_i'^j)$ are given by the chain rule as $$(X_i'^j)=\sum_k\frac{\partial \phi^j}{\partial \psi^k}X_i^k $$ We thus would need that $$\frac{\partial \phi^j}{\partial \psi^k}=\frac{1}{(X_i^j)}\delta_k^j$$
Hence, the obvious problem is that $X_i^j$ may be zero, how could one circumvent this? Is what I am trying to do even possible?
 A: You do not need your last equation. Ther is another alternative, first note that (in your notation)
$$X_i=\sum_j \sum_k X_i^k\frac{\partial \phi^j}{\partial \psi^k}\frac{\partial }{\partial\phi^j}$$ You want the matrix $M$ with  $M_{i}^j=(\partial\phi^j/\partial\psi^i)$ to be the inverse of the matrix $N$ with $N_{i}^j=(X_i^j)$ so that $NM=Id$, which translates to $$(NM)_i^j=\delta_i^j $$
$$\sum_kN_i^kM_k^j=\sum X_i^k \frac{\partial \phi^j}{\partial \psi^k}=\delta_i^j $$
This is the condition needed to do what you want. Now recall that $$\frac{\partial\phi^j}{\partial \psi^i}\Bigr|_p\equiv D_i(\phi^j\circ \psi^{-1})(\psi(p)) $$
So the matrix $M$ is the jacobian of $\phi\circ \psi^{-1}$, which is $C^\infty$. Now, since the rows of $N$ form a basis, then $N$ is invertible. Let us define $f:=\phi \circ \psi^{-1}$. What we want is to find the suitable $f$ such that $$Df(\psi(p))=N^{-1} $$
This is systen of $n^2$ ODE's with initial value condition $f(\psi(p))=0$ (To say something) which certainly satisfies the conditions for existence and uniqueness of a solution. Thus there is in fact a chart $(V,\phi)$ around $p$ and contained in $U$ such that at p we have $$(X_i)_p=\frac{\partial}{\partial\phi^i}\Bigr|_p $$
To extend this a neighborhood of $p$ one need some stronger conditions (Namely $[X_i,X_j]=0$). See Fobenius Theorem here or in any decent Differential Geometry textbook.
