Let $M$ be a smooth manifold and $X\in\mathfrak{X}(M)$. The straightening theorem says:
If $X_p\neq 0$, there is a chart $(U,y_1,...,y_n)$ around $p$ for which $X=\frac{\partial}{\partial y_1}$.
The link above gives a proof using a differential equation argument, but I've tried an alternative proof:
Take a chart $(U,\phi)$ around $p$ with $U$ small enough so that $X|_U$ is never zero. In that neighbourhood, we can take a smooth local frame $\{X_1,...,X_n\}$, with $X_1=X$. Then: $$X_j=\sum_{i=1}^na_{ij}\frac{\partial}{\partial \phi_i}$$ for some $a_{ij}\in C^\infty(U)$. Since $X_1,...,X_n$ are linearly independent, the matrix $(a_{ij})_{i,j}$ is invertible in $U$. In the domain $U$, define: $$\psi:=(a_{ij})_{i,j}^{-1}\circ\phi$$ This function belongs to the maximal atlas, because for every $(V,\xi)$ with $U\cap V\neq \emptyset$, we have: $$\psi\circ\xi^{-1}=(a_{ij})_{i,j}^{-1}\circ(\phi\circ\xi^{-1})\in C^{\infty}$$ $$\xi\circ\psi^{-1}=(\xi\circ\phi^{-1})\circ(a_{ij})_{i,j}\in C^{\infty}$$ Therefore $(U,\psi)$ is a chart which in particular satisfies $X=\frac{\partial}{\partial \psi_1}$.$_\blacksquare$
I can't see any mistake in this proof, but I've discovered some problems as a consequence of what I did. Using the same idea, if we have fields $X,Y$ which are not zero and linearly independent in some neighbourhood, then we could extend them to a local frame $\{X_1=X,X_2=Y,...,X_n\}$ and construct a similar $\psi$ for which $X=\frac{\partial}{\partial \psi_1},Y=\frac{\partial}{\partial \psi_2}$, but I've read that this is not possible, at least not for arbitrary $X,Y$.
What am I missing?
Everything is fine up until the last sentence: "which in particular satisfies $X=\frac{\partial}{\partial \psi_i}$." This would be true if the matrix $a$ were constant over $U\cap V$; generally it's not, and so you are missing chain rule terms that appear when you try to relate the vector fields $\left\{\frac{\partial}{\partial \phi_i}\right\}$ to $\left\{\frac{\partial}{\partial \psi_i}\right\}$.