({{, (RefLink[MaxStepFraction, paclet:ref/MaxStepFraction]) 
is an option to functions like (RefLink[NDSolve, paclet:ref/NDSolve]) that specifies the maximum fraction of the total range to cover in a single step.}})

OpenersPrimaryExamplesSection(Spacer1)Examples  (3)

OpenersExampleSection0(Spacer1)Basic Examples  (1)

Make sure that (RefLink[NDSolve, paclet:ref/NDSolve]) uses at least 100 steps over the integration range:

NDSolve[{x''[t]+x[t]==Exp[-1000(t-π)^2],x[0]==x'[0]==0},x,{t,0,20},MaxStepFraction->1/100]

Plot[Evaluate[First[x[t]/.%]],{t,0,20}]

OpenersExampleSection2(Spacer1)Applications  (1)

Features with small relative size in the integration interval can be missed:

Table[Plot[Evaluate[y[x]/.NDSolve[{y''[x]+y[x]==Exp[-(1000 (x/L-1/3))^2],y[0]==y'[0]==0},y,{x,L}]],{x,L/4,L/2},PlotRange->All],{L,{1,10,100,1000}}]

Use (RefLink[MaxStepFraction, paclet:ref/MaxStepFraction]) to ensure features are not missed, independent of interval size:

Table[Plot[Evaluate[y[x]/.NDSolve[{y''[x]+y[x]==Exp[-(1000 (x/L-1/3))^2],y[0]==y'[0]==0},y,{x,L},MaxStepFraction->0.001]],{x,L/4,L/2},PlotRange->All],{L,{1,10,100,1000}}]

OpenersExampleSection3(Spacer1)Properties & Relations  (1)

For an interval length l, (RefLink[MaxStepFraction, paclet:ref/MaxStepFraction])->f is equivalent to (RefLink[MaxStepSize, paclet:ref/MaxStepSize])->(f l):

msf=NDSolve[{x''[t]+x[t]==Exp[-1000(t-π)^2],x[0]==x'[0]==0},x,{t,0,20},MaxStepFraction->1/100];

mss=NDSolve[{x''[t]+x[t]==Exp[-1000(t-π)^2],x[0]==x'[0]==0},x,{t,0,20},MaxStepSize->(20 1/100)];

msf===mss

({{DocumentationFooterIconsRelatedFunction.png, ({{See Also}, {(RefLink[MaxStepSize, paclet:ref/MaxStepSize])  ▪  (RefLink[PlotPoints, paclet:ref/PlotPoints])  ▪  (RefLink[NDSolve, paclet:ref/NDSolve])}})}})