Re: NDSolve with NIntegrate for a PDE where the unknown function is integrated wrt its variables
- To: mathgroup at smc.vnet.net
- Subject: [mg119091] Re: NDSolve with NIntegrate for a PDE where the unknown function is integrated wrt its variables
- From: Oliver Ruebenkoenig <ruebenko at wolfram.com>
- Date: Sat, 21 May 2011 06:50:16 -0400 (EDT)
On Fri, 20 May 2011, ValeX wrote: > Hello, i know that this issue has been raised many times, but i cannot > find an answer in the previous posts. > > I tried to reformulate my problem in a simple way: > > NDSolve[{Derivative[0, 1][Yg][r, t]==NIntegrate[A[r1] Yg[r1, t] , {r1, > 1, r}] + B[r]/Yg[r, t], Yg[r, 0] == r}, {Yg}, {r, 1, 10}, {t, 0, 0.3}] > > where A and B are some functions, for example: > > A[r_] = r^-1; B[r_] = r + 10; > > Please help! > > Perhaps like this A[r_] = r^-1; B[r_] = r + 10; ClearAll[f] f[t_, y_, r_?NumberQ] := NIntegrate[A[r1] *y, {r1, 1, r}] NDSolve[{ Derivative[0, 1][Yg][r, t] == B[r]/Yg[r, t] + f[t, Yg[r, t], r], Yg[r, 0] == r, Yg[1, t] == 1, Yg[10, t] == 10 }, Yg, {r, 1, 10}, {t, 0, 0.3}, SolveDelayed -> True] You'd need to add the right boundary conditions. Oliver