Question: How to multiply matrix A to vector B if A contains a differential operator ?

Hi my friends                                                                                                                                                                     Let A be a 2x2 matrix, B and C be 2X1 vectors. The entries of A can be functions and differential operator D=d/dx. For example                                                                                                                                                                              A=matrix(2,2, [ u*D+v, a, b, v*D-u]), B=matrix(2,1, [f,g])                                                                                                                                                                                   Then the product of C=AB should give us         C=matrix(2,1,[u*diff(f,x)+v*f +  a*g, b*f+v*diff(g,x)-u*g])                                                                                         How can I write a procedure to do that? The difficult part is that the differential operator can appear in any entries of the matrix A, thus  the procedure has to detect where the differential operator D is located in entries. Moreover, f and g are arbitrary functions instead of known functions such as sin(x), so I hope to get the expression u*diff(f,x) instead of the resulting explicit expression such as u*cox(x)=u*d(sin(x))/dx.Thank you very much!Frank
Please Wait...