0
$\begingroup$

I defined the matrix integral operator

\[ScriptCapitalD]11[w_] := (1/2)*D[w[x], x] - 
r[x]*Integrate[q[x]*w[x], x]
\[ScriptCapitalD]12[w_] := r[x]*Integrate[r[x]*w[x], x]
\[ScriptCapitalD]21[w_] := (-q[x])*Integrate[q[x]*w[x], x]
\[ScriptCapitalD]22[w_] := (-2^(-1))*D[w[x], x] + 
q[x]*Integrate[r[x]*w[x], x]
m = {{\[ScriptCapitalD]11, \[ScriptCapitalD]12}, {\[ScriptCapitalD]21, \[ScriptCapitalD]22}}; 

and defined how it acts in a column vector

operate[matrix_, column_] := 
Table[Inner[#1[#2] & , \[Mu], column, Plus], 
{\[Mu], matrix}]

Code result is

result = operate[m, {r[x], q[x]}]; 
MatrixForm[FullSimplify[result]]

How can I further simplify the vanishing integrals? (see image below). What I am doing wrong that I obtain the correct result up to a factor of $2$?

enter image description here

$\endgroup$
3
  • 1
    $\begingroup$ Note how you get nonsense things like q[x][x] in your integrals. Try operate[m, {r, q}] instead. $\endgroup$ Commented Oct 13, 2020 at 17:44
  • $\begingroup$ That solution worked, but don't know why. Sorry the trivial question, but what if, instead of your suggestion, I put an explicit function to operate? $\endgroup$
    – hyriusen
    Commented Oct 13, 2020 at 17:50
  • $\begingroup$ I'm not sure I understand your question. r is a function. r[x] is not a function, but a function called with an argument. If you want to be super explicit about calling operate with functions, you could use operate[m, {Function[x, r[x]], Function[x, q[x]]}]. $\endgroup$ Commented Oct 13, 2020 at 18:03

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.