I am trying to model a shock formation with two coupled ode's. I know the equations are right but the solver struggles with the shock and oscillates after it occurs. I have tried all of the solvers (ode45, ode23, ode23s etc.) to no avail. The best result I got was to use fixed time step 2nd order runge-kutta (downloaded from the internet ODE2) with a very small time step but this still gets oscillations. Can anybody recommend which options would help or which other solvers I can use?