I am always running into trouble when trying to use interpolating functions. I am trying to do:
ClearAll["Global`*"]
ifun = ListInterpolation[RandomReal[1, {10, 10}], {{0, 2}, {0, 2}}];
mytest = Function[#1*Derivative[1, 0][ifun][#1, #2] ];
Integrate[mytest[x, y], {x, 0, 1}, {y, 0, 1}]
But integrate doesn't evaluate. However
Integrate[ifun[x, y], {x, 0, 1}, {y, 0, 1}]
mytest[1, 1]
works just fine. I also tried
ClearAll["Global`*"]
ifun = ListInterpolation[RandomReal[1, {10, 10}], {{0, 2}, {0, 2}}];
mytest2[x_, y_] := Evaluate[x*D[ifun[x, y], {x, 1}]]
Integrate[mytest2[x, y], {x, 0, 1}, {y, 0, 1}]
But that didn't work either (integrate doesn't evaluate). I really don't understand what I am doing...
NIntegrate
works. $\endgroup$ – george2079 Apr 13 '17 at 16:49Integrate
doesnt know how to do it. You might find this useful. mathematica.stackexchange.com/q/59944/2079 $\endgroup$ – george2079 Apr 13 '17 at 17:06FunctionInterpolation
to createmytest
, then you can integrate that. $\endgroup$ – Marius Ladegård Meyer Apr 13 '17 at 18:24