stetter_ode_test, an Octave code which calls stetter_ode(), which defines an ordinary differential equation (ODE) for which a specific time step sequence causes the implicit trapezoidal rule to be unstable, while the implicit midpoint rule will be stable. Note that the right hand side function f(t,y) is periodic, discontinuous, and piecewise linear.
The computer code and data files described and made available on this web page are distributed under the MIT license
stetter_ode, an Octave code which defines an ordinary differential equation (ODE) for which a specific time step sequence causes the implicit trapezoidal rule to be unstable, while the implicit midpoint rule will be stable. Note that the right hand side function f(t,y) is periodic, discontinuous, and piecewise linear.