Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

15
  • 1
    $\begingroup$ In general, a differential equation cannot be solved numerically over an infinite domain, so you will need to truncate the problem in x and provide boundary conditions. Even then, `NDSolve cannot solve this problem without help. Please see my solution to a related problem here. $\endgroup$ Commented Sep 18, 2020 at 20:26
  • $\begingroup$ @bbgodfrey thank you, I'm trying to understand this numerical method of lines. Before I'd like to ask if it's possible to avoid boundary conditions. Actually in my problem I have the constraint $\int_0^\infty\rho(t,x)dx=1$ for all $t\geq0$. I could impose $\rho(t,\bar x)=0$ where $\bar x=100$ (or any suitably large number), but I have no condition to impose for $\rho(t,0)$. Furthermore from other results I expect $\rho(t,0)$ to change a lot during time passing from $0$ to a Dirac delta $\endgroup$ Commented Sep 20, 2020 at 14:57
  • $\begingroup$ It is not possible, even in principle, to avoid boundary conditions. However, you could try integrating the entire integral-differential equation over x to obtain an expression for ρ(t,0). Note, though, that you will encounter resolution problems as your solution collapses to a delta-function. Perhaps, representing rho as the sum of a numerical function to be calculated plus a one-parameter function peaking at x = 0, with that parameter also to be calculated. Adding the definitions of f[x] and g[x] might be helpful to readers. $\endgroup$ Commented Sep 20, 2020 at 16:32
  • 1
    $\begingroup$ So much for that idea of mine. Adding the definitions of f[x] and g[x] to the question would be helpful. $\endgroup$ Commented Sep 20, 2020 at 18:21
  • 1
    $\begingroup$ In your 1st block of code, when making tables, you scale various functions by $MachinePrecision. I've find that a strange choice. Can you tell why you chose that scale factor? $\endgroup$ Commented Sep 24, 2020 at 23:39