I am trying a system of two differential equations that looks pretty simple, but with a potential varying a lot on a short period centered on 0. The definition of the potential followed by the attempt at solving the differential equation is
a0[y_] := 10^(-22) y^2/k^2 + Sqrt[1 + y^2/k^2];
a2[y_] := D[D[a0[y], y], y];
f[y_] := 10^(-18)* a2[y]/a0[y]^3;
g[y_] := 1 + f[y];
pot[y_] := D[D [g[y], y], y]/g[y]; (* Potential *)
yi = -300;
yf = 100;
k = 10^(-20);
sol = NDSolve[{x1'[y] == (pot[y] - 1) - x1[y]^2 + x2[y]^2,
x2'[y] == -2*x1[y]*x2[y], x1[yi] == 0, x2[yi] == -1} , {x1,x2}, {y, yi, yf}, WorkingPrecision -> 30, MaxSteps -> Infinity][[1]]
Plot[Evaluate[x1[y] /. sol], {y, yi, yf}, PlotRange -> All, PlotPoints -> 500, AxesLabel -> {y, "x1(y)"}]
Plot[Evaluate[x2[y] /. sol], {y, yi, yf}, PlotRange -> All, PlotPoints -> 500, AxesLabel -> {y, "x2(y)"}]
And it appears that the solutions $x1$ and $x2$ are just equal to the initial conditions. I was expecting something growing after 0, since the potential there is about $10^{40}$, but I can't even see a little deviation from the initial values. Any comment, any clue on what I am doing wrong is greatly appreciated!
a2[y]:=...
toa2[y_] := Derivative[2][a0][y];
andpot[y]:=...
topot[y_] := Derivative[2][g][y]/g[y]
the potential can be evaluated and evaluates toÒ[10^-68]
. That might explain the behavior. $\endgroup$pot[y]
is so singular aty=0
that you could simplify your differential equation dramatically by approximatingpot[y_] = q*DiracDelta[y]
(for some amplitudeq
) and trying to find an analytic solution of the differential equation. This analytic solution could then be used as a base to find the exact solution by appropriate transformations. $\endgroup$NDSolve
. Are you familiar with the techniques for doing this in the presence of $\delta$-potentials? Essentially you solve the differential equation for $pot=0$ and then connect two different regions ($y<0$ and $y>0$) by a kink given by the $\delta$-function amplitude. $\endgroup$