Felix Salfner
2004-Feb-16 14:42 UTC
[R] how to solve a linear equation system with polynomial factors?
I'm looking for a way to solve a linear equation system where the factors are polynomials: Here is a simplified example (To solve my problem, I have to deal with dimensions larger than 2): ( s + 2) x1 + (s - 3) x2 = 2 ( s^2 + 2s - 1) x1 - 2 x2 = 1 Theoretically the solution is easy: By performing polynomial multiplications, divisions and sums. I found out, that R is able to perform the operations +, - , *, / on polynomials but I don't know how to create a matrix of polynomials. matrix( c( polynomial( c(1,2,3)), polynomial( c(3,2,1)), ...)) does not work. Even if I would manage to create such a matrix, will solve(A,r) work? Can anyone help? Thanks in advance Felix