Maybe I am asking a triviality. If that is the case, please let me know and I will close the question. I have searched a lot but I didn't find an adequate and forceful response.


For $i=1,\ldots, r$, let $Z\_i$ be $r$ linearly independent vector fields defined on an open subset $U$ of $\mathbb{R}^n$, $r<n$. And let $\lambda\_i$ be $r$ smooth functions defined on $U$. We can consider the inhomogeneous system of first-order linear PDEs
$$
Z\_i(f)=\lambda\_i, \quad i=1,\ldots,r.
$$


**Question:** What hypothesis do we need to assure the local existence of a solution $f$?


I don't think I can apply the [Cauchy–Kovalevskaya theorem](https://en.wikipedia.org/wiki/Cauchy%E2%80%93Kowalevski_theorem) in this case, because we have here several vector fields...


On the other hand, at the end of [Wikipedia page of Cauchy–Kovalevskaya theorem](https://en.wikipedia.org/wiki/Cauchy%E2%80%93Kowalevski_theorem) it is named the Cauchy–Kovalevskaya–Kashiwara theorem, which seems very technical to me, but I feel it has something to do...


Finally, I think that involutivity of the distribution $\{Z\_1,\ldots,Z\_r\}$ plays an important role here. For example, in case $\lambda\_i=0$ Frobenius theorem would tell us that there exist $n-r$ functionally independent solutions.



Existence of solution to linear inhomogeneous first order PDEs systems
You are correct that Cauchy-Kovalevskaya does not apply directly to this problem, but there are other theorems that give sufficient conditions, provided that you make certain basic regularity assumptions.


For example, in the smooth involutive case, i.e., when the $Z\_i$ (as well as the $\lambda\_i$) are also sufficiently differentiable and satisfy the involutivity condition that $[Z\_i,Z\_j] = c^k\_{ij}\,Z\_k$ (summation convention assumed) for some smooth functions $c^k\_{ij}=-c^k\_{ji}$, then an obvious necessary condition on the $\lambda\_i$ for local solvability of the system $Z\_if = \lambda\_i$ is
$$
Z\_i(\lambda\_j)-Z\_j(\lambda\_i) = c^k\_{ij}\lambda\_k\,\qquad \forall i,j
\quad\,1\le i,j\le r,\tag1
$$
since both sides would equal $[Z\_i,Z\_j]f$ for any (local) solution $f$. It's a consequence of the Pfaff-Darboux Theorem (appropriately interpreted) that, if condition (1) is satisfied, then, every $p\in U$ has an open neighborhood $V\subset U$ on which there exists an $f$ satisfying the given system $Z\_if = \lambda\_i$. *However, because the system is linear inhomogeneous, there is a simpler proof of this result that only uses the Frobenius Theorem. I give that proof in a remark at the end of this answer.*


This can be extended to more general situations: Suppose that the distribution $D$ spanned by the $Z\_i$ is not involutive, but that we can choose new $Z\_a$ for $r<a\le r'$ such that $Z\_1,\ldots, Z\_{r'}$ are linearly independent and give a basis for the sections of the distribution $D'$ of constant rank $r'$ spanned by the $Z\_i$ and $[Z\_i,Z\_j]$ for $1\le i,j\le r$. Then writing $[Z\_i,Z\_j] = c^a\_{ij} Z\_a$ (where now, the index $a$ runs from $1$ to $r'$), we see that a necessary condition for solvability is that there exist functions $\lambda\_a$ for $r<a\le r'$ (necessarily unique) that satisfy
$$
Z\_i(\lambda\_j)-Z\_j(\lambda\_i) = c^a\_{ij}\lambda\_a\,\qquad \forall i,j\qquad\,1\le i,j\le r,\tag2
$$
(where the implied summation on $a$ runs from $a=1$ to $a=r'$)
and that we would have to have $Z\_af = \lambda\_a$ for $1\le a\le r'$.


This is now a bigger system (the 'prolongation' of the original system), and we can check whether $D'$ is involutive. If not, we expand (aka,
'prolong') the system again. If we can repeat this prolongation process until we reach a system $D''$ for some $r''>r$ that is involutive, then we can apply the first criterion to determine local solvability of the original system.


Along the way, we might run into situations where the new $\lambda\_a$ one needs to find don't exist on some open set, in which case, there won't be a solution to the original system. More complicated things can happen if the 'prolonged' distributions don't have constant rank, but, for most practical purposes, the above process will give an effective test as to whether and where in $U$ (local) solutions $f$ exist.


**Remark:** I can sketch the proof of the basic existence theorem mentioned above, based on the Frobenius theorem.


First, suppose that $[Z\_i,Z\_j] = 0$ for $1\le i,j,\le r$. Then, by the Simultaneous Flow Box Theorem, for each $p\in U$ there exists an open $p$-neighborhood $V\subset U$ on which there exists a $p$-centered coordinate chart $z = (z^1,\ldots,z^n)$ such that $Z\_i = \partial/\partial z^i$ on $V$ for $1\le i\le r$. On $V$, the given system becomes $\partial f/\partial z^i = \lambda\_i$, and the condition (1) becomes $\partial\lambda\_i/\partial z^j = \partial\lambda\_j/\partial z^i$, and, by the usual integration formula, it is clear that, when this holds, there will be a smaller $p$-neighborhood $V'\subset V$, on which there exists a function $f$ satisfying $\partial f/\partial z^i = \lambda\_i$ for $1\le i\le r$.


Now consider the more general case in which $[Z\_i,Z\_j] = c^k\_{ij}\,Z\_k$. By the Frobenius Theorem, every point $p\in U$ will have a $p$-neighborhood $V$ with a $p$-centered coordinate system $z = (z^1,\ldots,z^n)$ such that $Z\_i = a\_i^k\,\partial/\partial z^k$ on $V$ for some smooth functions $a\_i^k$ on $V$. Moreover, the $r$-by-$r$ matrix $a = (a\_i^k)$ is invertible because the $Z\_i$ for $1\le i\le r$ are linearly indepdendent on $U$. Consequently, we can write $\lambda\_i = a\_i^k\mu\_k$ for some functions $\mu\_k$ ($1\le k\le r$) on $V$.
Now, we can expand $[Z\_i,Z\_j] = c^k\_{ij}\,Z\_k$ to get a formula for $c^k\_{ij}$ in terms of the $a\_i^k$ and their partials with respect to the $\partial/\partial z^j$. Using this formula and some index juggling, we see that
$$
Z\_i(\lambda\_j)-Z\_j(\lambda\_i) - c^k\_{ij}\lambda\_k
= a\_i^ka\_j^l\left(\frac{\partial \mu\_k }{\partial z^l}-\frac{\partial \mu\_l}{\partial z^k}\right).
$$
Since the given system $Z\_if=\lambda\_i$ is equivalent to $\partial f/\partial z^k = \mu\_k$, we see that we are reduced to the case $c^k\_{ij} = 0$, which has already been treated.


