4

I am trying to numerically solve a partial differential equation, where the inhomogeneous term is an integral of another function. Something like this:

NDSolve[{D[f[x, y], x] == NIntegrate[h[x,y+y2],{y2, x, y}],f[0,y] == 0}, f, {x, 0, 1}, {y,0,1}]

where h[x,y] is a well known function previously defined. But it seems that Mathematica does not know how to evaluate the integral.

I do not use Mathematica too often, so I am sure there is a simple solution to this. Could someone tell me what I am doing wrong?

Thanks.

user1477337
  • 385
  • 2
  • 9

1 Answers1

0

It is not really clear from the question, but I had a similar problem and the solution in my case was to follow the advice from the wolfram forums to put the integral in an extra function and force real input.

So in your case this would be

integral[x_Real,y_Real] := NIntegrate[h[x,y+y2],{y2, x, y}];
NDSolve[{D[f[x, y], x] == integral[x,y], f[0,y] == 0}, f, {x, 0, 1}, {y,0,1}]
fifaltra
  • 305
  • 1
  • 3
  • 14