ASKSAGE: Sage Q&A Forum - RSS feedhttps://ask.sagemath.org/questions/Q&A Forum for SageenCopyright Sage, 2010. Some rights reserved under creative commons license.Mon, 22 Mar 2021 13:29:51 +0100A matrix containing differential operators acting on a matrix containing functionshttps://ask.sagemath.org/question/56311/a-matrix-containing-differential-operators-acting-on-a-matrix-containing-functions/Suppose I have a 2x2 operator matrix, D. Some of its elements are of the form (d/dx), and (d2/dx2).
Now when this matrix is multiplied with another matrix, f, whose elements are functions of x, I will get the final matrix whose corresponding elements are differentiated.
for example: **D = matrix([[d/dx, d3/dx3], [d2/dx2, d2/dx2]])** is an operator matrix which operates on a function matrix, **f(x) = matrix([[x, x^2], [x^3, x]])** as D(f(x)) = D*f(x), (simple matrix multiplication).
Writing D = matrix([[diff( , x), diff( , x, 3)], [diff( , x, 2), diff( , x, 2)]]) does not work as diff() function needs an input function.
So how can I write the D() operator matrix?
PS: I could use f.apply_map(lambda e: diff(e, x)), but then it applies d/dx to all elements in f(x). Whereas, I have 'diff()' operators of different orders in the D matrix.ApoorvMon, 22 Mar 2021 13:29:51 +0100https://ask.sagemath.org/question/56311/