0
$\begingroup$

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:

enter image description here

$\endgroup$
  • $\begingroup$ What kinds of assumptions can we make about the functions u and w? 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 where u and w are both functions of x and y. $\endgroup$ – march Jan 20 '16 at 17:51
  • $\begingroup$ @Jens. Hmm. Agreed. I even upvoted that question and answer and had apparently forgotten. OP! - please read that linked possible-duplicate. If you think that the linked answer doesn't answer your question, please expand on your question by editing in more details. Otherwise, this is likely to be closed as a duplicate. $\endgroup$ – march Jan 20 '16 at 19:02
  • $\begingroup$ @march I already upvoted your answer too - then looked at the question and found it lacking specifics (that would make it different from the earlier one). $\endgroup$ – Jens Jan 20 '16 at 19:11
7
$\begingroup$

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]

enter image description here

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]]

enter image description here

| improve this answer | |
$\endgroup$

Not the answer you're looking for? Browse other questions tagged or ask your own question.