Question: extract coefficients from general (non-polynomial) expression



I have an expression that involves an unknown function, say g:


where a, b and c are the coefficients I'm actually interested in. These coefficients are not constants but usually expressions in some constant parameters. The function g is an expression involving derivatives of some more fundamental function (in my problem).


expr:=(q/r-sqrt(2))*x[1] + x[2] - (w*r+4)*x[3] + D(G)(x[1]) - D(G)(x[3]);

Because g is not a polynomial, it's impossible to use coeff directly. Anyone any ideas how to get the coefficients? Thanks a lot!


- Fred.

Please Wait...