I try to extract coefficient from equations (system of equations) into list (matrix). I have tried CoefficientList[poly, {var1, var2, ...}] but without success.
This simple example should explain my problem:
Eq1 = a D[U[x1, x2], {x1, 2}] + b D[V[x1, x2], {x2, 2}]

Any advice?
Edit:
Daniel’s Lichtblau solution is very clear (thanks you), but what if the equation that looks like this?
Eq1 = a D[U[x1, x2], {x1, 2}] + b D[V[x1, x2], {x2, 2}] + c W[x1, x2]
A simple example can be resolved as follows:

Is there any more elegant solution? (particularly for more complex expressions)
Ps I can’t understand why, but this solution gives me the correct result.

Firstly the partial derivatives are represented with
Derivative, so the pattern needs to match that. Also, I don’t think you want to useCoefficientListas that would accept terms where both your expressions appear. All in all, the following should work:Here
(Coefficient[Eq1, #] &)is an anonymous function that finds the coefficient of the argument, and/@maps it to the list on the right.HTH