solve the disjuncture of the curve. change ode45 to ode23