2 edited tags
1

# Why is NDSolve's StartingStepSize with ExplicitEuler not working? How do I set the step size?

Why do I get a smooth curve (that is obviously wrong) when I run this?

Plot[
Evaluate[
NDSolveValue[{x'[t] == -x[t], x[0] == 1}, {x[t]}, {t, 0, 1},
StartingStepSize -> 1, Method -> {"FixedStep", Method -> "ExplicitEuler"}]],
{t, 0, 1},
PlotRange -> All]


Shouldn't I just get back a straight line connecting (0, 1) to (1, 0)?!

How do I make Mathematica just do a plain classic Forward Euler?! I don't want fancy smoothing...