I am trying to find coefficients of variables of specific powers, or of 2+ variables multiplied together, however I am running into issues.
The equation y does not include a x^1 term, however the returned matrix from coeffs is (3 1) which could be the same for the equation y = x + 3. I need something like (3 0 1) to show zero coefficients of intermediate powers of the variable.
Trying to find coefficients of multiple variables. For instance z = x^2*y + 3y + 5x^2 +4y^2 + 3xyr + 5
If I try to find the coefficients of xy I want it to return 3r and ignore the x^2y term. Is there an easy way to do this or is it a nested (or 2-line) coeffs? If so this also runs into problem #1 should the equation not include the powers of that variable.