Is it possible to make a workable operator representation of differential equations in Mathematica?
I think it would make solving my differential equations easier, but I have no idea how to do it. For example, I would like this:
Is it possible to make a workable operator representation of differential equations in Mathematica?
I think it would make solving my differential equations easier, but I have no idea how to do it. For example, I would like this:
Depending on your use-case, there are different possibilities. I typically think of operators as taking functions to functions, rather than functions to values, so I will define the operators as taking the functions u and w to pure functions, and you can attach variables after the fact. Here's one possibility:
ClearAll[L22, L11, u, w]
L11[u_] := D[u[##], {#1, 2}] + (1 - mu)/2 D[u[##], {#2, 2}] &
L22[w_] := mu/R D[w[##], #1] &
L11[u]
L11[u][x, y]
L22[w]
L22[w][x, y]
0 == L11[u][x, y] + L22[w][x, y]
Alternatively, you can give the functions and the variables together:
L11[u_[x_, y_]] := D[u[x, y], {x, 2}] + (1 - mu)/2 D[u[x, y], {y, 2}]
L22[w_[x_, y_]] := mu/R D[w[x, y], x]
0 == L11[u[x, y]] + L22[w[x, y]]
uandw? Depending on how general you want this, the answer might be simple or it might be complicated. I can write a simple answer in the case whereuandware both functions ofxandy. – march Jan 20 '16 at 17:51