Let there be some matrix exponential function for matrices of the form $$M=\sum_{i=1}^p c_i A_i$$ where $M,A_i\in\mathbb{R}^{n\times n}$ are given, real square matrices and $c_i \in \mathbb{R}$. In other words, we are interested in the matrix exponential of the following form: $$ f(M)=e^M=e^{\sum c_i A_i}. $$ The matrix exponent is thus expressible in some finite real basis for the subspace we are interested in, as $M \in \mbox{Span}(A_i)$. Does an approximation (or even identity) exist for the case in which this basis of matrices $A_i$ and their commutators is known?
Concretely, I currently have a basis of less than 10 matrices (i.e., $p<10$), if this makes the problem easier. This problem arises as part of an optimization problem in which the $A_i$ are fixed (some chosen basis) and the $c_i$ are variable.
In your comment, you seem to consider that a generalization for $n > 2$ indeterminates of the Baker-Campbell-Hausdorff formula would answer your question. Such a generalization is indeed known. You can for example read it in Section 2 of the following paper.
The formula is the following: for noncommuting indeterminates $x_1, \dotsc, x_n$, one has $$e^{x_1} \dotsb e^{x_n} = e^z,$$ where $$ z = \sum_{m=1}^{+\infty} \sum_{p_{j,k}} \frac{(-1)^{m-1}}{m} \frac{(\mathrm{ad}~{x_n})^{p_{m,n}} \dotsb (\mathrm{ad}~{x_1})^{p_{m,1}} \dotsb (\mathrm{ad}~{x_n})^{p_{1,n}} \dotsb (\mathrm{ad}~{x_1})^{p_{1,1}}}{ \left(\sum_{j=1}^m \sum_{k=1}^n p_{j,k}\right) \Pi_{j=1}^m \Pi_{k=1}^n (p_{j,k}!)} , $$ where the $p_{j,k}$ range over all nonnegative integers such that, for each $j = 1, \dotsc, m$, one has $\sum_{k=1}^n p_{j,k} > 0$. Strichartz uses the notation $(\mathrm{ad}~x) y$ to denote the commutator $[x,y]$. Similarly $(\mathrm{ad}~x)^2 y = [x,[x,y]]$ and so on, with the convention that, when it is not followed by an argument $(\mathrm{ad}~x) = x$.
In particular, with these notations, the formula for $n = 2$ is $e^{x} e^y = e^z$ where $$ z = \sum_{m=1}^{+\infty} \sum_{p_j,q_j} \frac{(-1)^{m-1}}{m} \frac{(\mathrm{ad}~{y})^{q_m} (\mathrm{ad}~x)^{p_m} \dotsb (\mathrm{ad}~{y})^{q_1} (\mathrm{ad}~{x})^{p_1}}{ \left(\sum_{j=1}^m p_j + q_j \right) \Pi_{j=1}^m (p_j! q_j!)}, $$ where the sum ranges over nonnegative integers $p_j, q_j$ such that, for each $j = 1, \dotsc, m$, one has $p_j+q_j > 0$.