When we solve differential equation numerically using NDSolve
then sometimes we get error like NDSolve::mxst: Maximum steps reached
According to Mathematica docs the solution is to increase MaxSteps
. For example if you used MaxSteps -> 100
and limit of x 0 to 100 but Mathematica calculated up to the x=50
then increasing steps MaxSteps -> 200
will solve your problem.
My problem is what i got from mathematica is -
During evaluation of In[212]:= NDSolve::mxst:
Maximum number of 10000 steps reached
at the point x == 2.1685790754404513`*^-14.
So even if i want to got from limit 0 to 2 for x
then my steps should be 10^14 times larger. It will take a huge huge computing time. How much it may take for core i3 processor? Is there any other way to compute quickly or solve this problem of maxsteps in any other way?
My ODE:
v[x_] := {v1[x], v2[x]} ;
ini = v[0] == {1, 0};
soln = NDSolve[LogicalExpand[I v'[x] == H.v[x] && ini], {v1, v2}, {x, x1, x2}]
where H is matrix
H
is about7.4*10^16
which would mean that you'll get a highly oscillatory solution with a wavelength of about10^-16
so I guess you would need a step size< 10^-18
or so (and you would need to worry aboutPrecisionGoal
andWorkingPrecision
). $\endgroup$