i'm new in MATHEMATICA. I want to create an operator $D^{(f)}=\partial_x+f'-\partial^2_x$ and $D^{(g)}=\partial_x+g'-\partial^2_x$ and put it into a matrix element, then multiplied by a vector whose components are functions on $x$, say $u(x), v(x)$. For example $$\begin{pmatrix}D^{(f)} & D^{(g)}\\ D^{(g)} & D^{(f)} \end{pmatrix} \begin{pmatrix} u(x) \\ v(x) \end{pmatrix}$$
I saw the posts: Computing with matrix differential operators, How to do matrix operation if the first matrix is an operator?; but i'm very newbie on this.
My problem lives on the fact that I have problems with the matrices products because I have operators
Thanks!
EDIT: $f=f(x,y,z)$ and $g=g(x,y,z)$, both of them are function of a vector $(x,y,z)$, but we can neglect the components $y,z$ and consider only the $x$ part
f
andg
are some functions onx
or not? What are they? $\endgroup$df = (D[#, {x, 1}] + (-D[#, {x, 2}]) &);
,dg = (D[#, {x, 1}] + (-D[#, {x, 2}]) &);
,mat = {{df, dg}, {dg, df}}
,vec = {u[x], v[x]}
, thenCenterDot[mat, vec]
works, withCenterDot
given in the former of the linked questions. This is withoutf
andg
but adding them should be very straightforward. $\endgroup$Construct
can be used, e.g.,Inner[Construct, {{a # &, \!\( \*SubscriptBox[\(\[PartialD]\), \(x\)]#\) &}, {\!\( \*SubscriptBox[\(\[PartialD]\), \(y\)]#\) &, d # &}}, {u[x, y], v[x, y]}]
. $\endgroup$