# Solving a non-linear Schrödinger equation

I am trying to use NDSolve to solve numerically the well-known Schrödinger-Newton equation for a certain initial value of the wave function.

ClearAll[r, t, ψ, ϕ]

σ = 1

sol = NDSolve[{I*D[ψ[r, t], t] == -1/(2)*D[ψ[r, t], {r, 2}] + ψ[r, t]*ϕ[r, t], D[ϕ[r, t], {r, 2}] == σ*ψ[x,t]*ψ[x, t]\[Conjugate], ψ[r, 0] == (2/Pi)^(3/4)*Exp[-r^2], ψ[-100,t] == (2/Pi)^(3/4)*Exp[-100^2], ψ[100, t] == (2/Pi)^(3/4)*Exp[-100^2], ϕ[-100, t] == 0, ϕ[100, t] == 0, ϕ[r, 0] == 0}, ψ, {r, -100, 100}, {t, 0, 1}, Method -> Automatic]


Mathematica says 'NDSolve::delpde: Delay partial differential equations are not currently supported by NDSolve'. Do any of you know how to re-express the problem in order to get the solution?

• The code is missing a differential equation for ϕ[r, t], which is why Mathematica provides the warning, "Some of the functions have zero differential order, so the equations will be solved as a system of differential-algebraic equations." Please provide the equation to NDSolve to see if this gives you an answer. Jun 23, 2021 at 11:54
• Welcome to Mathematica.SE! I hope you will become a regular contributor. To get started, 1) take the introductory tour now, 2) when you see good questions and answers, vote them up by clicking the gray triangles, because the credibility of the system is based on the reputation gained by users sharing their knowledge, 3) remember to accept the answer, if any, that solves your problem, by clicking the checkmark sign, and 4) give help too, by answering questions in your areas of expertise. Jun 23, 2021 at 11:55

D[ϕ[r, t], {r, 2}] == σ*ψ[x,t]*ψ[x, t]\[Conjugate]

x should be r in the above snippet from your code. It is interpreting the equation as a delayed equation because it thinks you are meaning to call ψ at the (undetermined) value x. Although, my machine still is not powerful enough to produce the solution. Maybe yours is.