I have a problem with obtaining the domain of resulting Interpolating Function in my calculations. I want to solve the following differential equation
V[u_, v_] =ProductLog[E^(1/2 (-2 - u + v))]/(1 + ProductLog[E^(1/2 (-2 - u + v))])^4;
sol = First[NDSolve[{-4*D[S[u, v], u, v] == V[u, v]* S[u, v],
S[u, 0] == Exp[-(100/18)], S[0, v] == Exp[-((v - 10)^2/18)]},S, {u,100,200}, {v,100,200},
Method -> {"MethodOfLines","SpatialDiscretization" -> { "TensorProductGrid",
"MaxStepSize" -> 1}}, AccuracyGoal -> 1]]
As you can see, I determined the range of u
and v
from 100
to 200
, but if you run the code, you will find that the resulting Interpolating Function range will be from 0
to 200
for v
. How can I fix this problem? Thanks all.
S[u, 0] == Exp[-(100/18)]
in yourNDSolve
command that places the lower bound onv
. If you change that toS[u, 10] == ...
, then the interpolating function changes accordingly. I can't speak to whether this is the intended behavior - it seems to treat the bounds onu
andv
differently. $\endgroup$S[u, v] == Exp[-(v - 10)^2/18]
is the boundary condition of the problem which I usedS[u, 0]
andS[0, v]
in calculations. Can I useS[u,100] == Exp[-(90)^2/18]
as a new boundary condition to obtain the result that I am looking for? $\endgroup$v
domain is that in the method of lines, the spatial variable's derivatives are approximated on a spatial grid between the boundaries.S[u, 0]
specifies one boundary to bev == 0
. Now why can'tNDSolve
discard all the points outside the specified interval? I don't know. I suppose one cannot have an arbitrary boundary coincide with a grid point. Maybe that's why.) $\endgroup$u == 0
andv == 0
,NDSolve
must integrate to those surfaces, whether or not it includes them in theInterpolatingFunction
. That being the case, simply ignore the unwanted part of theInterpolatingFunction
. By the way,"TemporalVariable" -> v
yields a domain of{{0., 200.}, {100., 200.}}
, and"TemporalVariable" -> u
yields a domain of{{100., 200.}, {0., 200.}}
. But, why worry about this idiosyncrasy? It does not seem to cause any harm. Moreover, it is easy enough to trim the domain by postprocessing, if desired. $\endgroup$AccuracyGoal -> 1
does not yield a very accurate answer. Just omit this option. $\endgroup$