# Solving (numerically) integro-differential equation

I am absolutely new to Mathematica, and I installed it to solve a specific equation describing dopamine diffusion in cerebral tissue. I get a number of mistakes (boundaries for a start), but I was wondering if the program is capable at all to solve such kind of integro-differential equations.

ClearAll["Global*"];
eqn =
U[x, y] - 1/x +
Integrate[z^2 (D[U[x, y], x] + U[x, y]/(1 + U[x, y])), {z, 1, x}]/x +
Integrate[z (D[U[x, y], x] + U[x, y]/(1 + U[x, y])), {z, x, 300}] == 0;
init1 = U[300, 300] == 0;
init2 = U[1, 1] == 1;
Usol = NDSolveValue[{eqn, init2, init1}, U[x, y], {x, 1, 300}, {y, 1, 300}]
Plot3D[Usol, {x, 1, 300}, {y, 1, 300}]

• Do you really have the differentiation just in x-coordinate and z is independent of x and y? – Rom38 Jan 23 '18 at 11:53
• Actually, the initial conditions have to be in form U[x,y0] and U[x0,y] where x0 and y0 are yours boundaries of corresponding ranges. – Rom38 Jan 23 '18 at 12:07
• The integrals can be evaluated.This gives one first order differential equation with derivatives D[U,x]. What about parameter y? You need at least one condition in y , something like U[0,y]==f[y]`(or a second ode) – Ulrich Neumann Jan 23 '18 at 12:23
• Thanks very much for your help! After a lot of trying, I made it work by eliminating the integrals and implementing an expression with second order derivative: eqn = D[U[t, R], t] == D[U[t, R], R, R] + 2 D[U[t, R], R]/R - 1.94 10^-6 U[t, R]/(2.1 10^-5 + U[t, R]); init1 = (D[U[t, R], R ] /. R -> 1) == -Erfc[t - 700]/2; init2 = U[t, R] == 0 /. R -> 200; init3 = U[t, R] == 0 /. t -> 1; Usol = NDSolveValue[{eqn, init1, init2, init3}, U[t, R], {t, 1, 4400}, {R, 1, 125}, Method -> {"MethodOfLines", "DifferentiateBoundaryConditions" -> {True, "ScaleFactor" -> 1}}] – Silvia D Jan 26 '18 at 11:57
• It works now, but it seems like in some points the curve is not smooth as it should be: is there a way to change the parameters to perhaps increase accuracy of the numerical calculation? Thanks very much in advance! – Silvia D Jan 26 '18 at 12:01