Would Runge_Kutta methods (especially Dormand-Prince) pair be affected by step-like nature of the derivative function $\dot{y} = f(t,y)$.
I mean if we take it $\dot{y}=f(u(t),y)$ and $u(t)$ is step-wise inputs (discrete + Zero order hold).
Thanks
Would Runge_Kutta methods (especially Dormand-Prince) pair be affected by step-like nature of the derivative function $\dot{y} = f(t,y)$.
I mean if we take it $\dot{y}=f(u(t),y)$ and $u(t)$ is step-wise inputs (discrete + Zero order hold).
Thanks
Taking the question text from your other question at SO on this topic (that you deleted as suggested, but did not transfer to enhance this question).
A: In $$y'(t)=f(t,y(t),u(t)),$$ each constant segment $u(t)=u_k$ on $t\in[t_k,t_{k+1})$ can be considered to generate an independent ODE system $$y'(t)=f_k(t,y(t))~\text{ where }~f_k(t,y)=f(t,y,u_k).$$ Each of these systems on their own is smooth, thus perfectly solvable with reasonable step sizes, as long as it does not diverge to infinity.
Then you can construct a composite function that is the solution of the original equation, $$y(t)=y_k(t) ~\text{ for }~ t\in[t_k,t_{k+1}]$$ where $y_k$ is a solution to $$ y_k'(t)=f_k(t,y_k(t)),~~y_k(t_k)=y_{k-1}(t_k). $$
A: That is not really a problem if you compute the solutions separately. On the segment $[t_k,t_{k+1}]$, the solution is equal to the solution of the $k$th equation. That the solver uses points outside this interval does not change its exactness inside the interval, to the contrary, it allows the solver to keep using relatively large step sizes.
Changing the equation exactly at $t_{k+1}$ would introduce a discontinuity in the equation or one of its derivatives which throws off the step size controller, leading to excessively small step sizes and the corresponding large number of function evaluations to pass over that point.