0
$\begingroup$

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}]
$\endgroup$
  • $\begingroup$ Do you really have the differentiation just in x-coordinate and z is independent of x and y? $\endgroup$ – Rom38 Jan 23 '18 at 11:53
  • $\begingroup$ 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. $\endgroup$ – Rom38 Jan 23 '18 at 12:07
  • $\begingroup$ 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) $\endgroup$ – Ulrich Neumann Jan 23 '18 at 12:23
  • $\begingroup$ 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}}] $\endgroup$ – Silvia D Jan 26 '18 at 11:57
  • $\begingroup$ 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! $\endgroup$ – Silvia D Jan 26 '18 at 12:01

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.