Let $f : \mathbb{R}^n \to \mathbb{R}$. How to solve the following differential equation
$$ (A- \operatorname{diag}(x) ) \nabla_x f(x) - c f(x)=0, \qquad f(0)=1. $$
where $\operatorname{diag}(x)$ is a diagonal matrix with vector $x$ on the main diagonal, $A$ is some $n \times n$ matrix and $ c \in \mathbb{R}^n$?
In the scalar case, this is easy to solve since it is a first-order linear ordinary differential equation (ODE) whose solution is given by
$$f(x) = a^{c} (a - x)^{-c}.$$
I don't have have much experience solving matrix differential equations and would appreciate some references on this topic.
Edit: Using the approach of NN2 the above PDE can be reformulated as: \begin{align} (A- \operatorname{diag}(x) ) \nabla_x g(x)=c, \qquad g(0)=0. \end{align}
My first answer isn't good. I edit the answer by taking account the comment of @loupblanc. I haven't had yet the solution. I think we can simplify the problem by using this transformation.
From the equation, we have $$ (A- \operatorname{diag}(x) ) \frac{\nabla_x f(x)}{f(x)} - c=0 $$ $$ \iff (A- \operatorname{diag}(x) ) \nabla_x \ln{f(x)} - c=0 $$ Put $g(x) = \ln{f(x)}$ $$ \iff (A- \operatorname{diag}(x) ) \nabla_x g(x) - c=0 $$