# Error analysis for Runge Kutta, how to take Big O of 2 variables?

For the standard 4th order Runge Kutta:

where the system is assumed to be smooth (so that the RHS has no discontinuous points)

$\mathbf{y'} = \mathbf{F}(t,\mathbf{y})$

$\mathbf{y(t_0)} = \mathbf{y_0}$

$\mathbf{y_{i+1} = y_n + 1/6(k_1 + 2k_2 + 2k_3 + k_4}$

where

$$\mathbf{k_1 = F(t_n,y_n)}$$ $$\mathbf{k_2 = F(t_n + h/2, y_n + hk_1/2)}$$ $$\mathbf{k_3 = F(t_n + h/2, y_n + hk_2/2)}$$ $$\mathbf{k_4 = F(t_n + h, y_n + hk_3)}$$

Each step has an error of $O(|h|^5)$ and the final step has a total error of $O(h^4)$. You can confirm in Wikipedia

Now assuming that we do not have $y'(t_0) = F(t,y_0)$ defined (so that the system be not be continuous/differentiable at the initial point) and we modify the initial point to be $\hat{y}(t_0 + \delta) = y_0 + \epsilon$.

This is done by a series approximation expanded at $t_0$ and approximated at $t_0 + \delta$. So $$\hat{y}(t_0 + \delta) := a_0 + a_1(t_0 + \delta)+a_2(t_0 + \delta)^2 + \dots + O((t_0+\delta)^n)$$ where the $a_i$ are coefficients of the series determined by $y(t_0) = y_0$ (if $t_0 = 0$, then $a_0 = y_0$ for instance, and $a_i$ are determined recursively for $i = 1\dots n$. For simplicity, we will assume $t_0 = 0$ but I will still treat it as a variable for the rest of this discussion).

It is known that the error for the polynomial approximation has an order of $O(|t|^{n+1})$ if the polynomial expansion is $\hat{y} = \sum_i^n a_i t^i$.

Now this is going to sound like a simple question, but given the error in $\hat{y}$, what is the associated change error in the Runge Kutta? Keep in mind the error is of different variables.

The Runge Kutta has error in terms of its step size $h$ and the polynomial error has error in terms of its variable $t$. How do I take a Big Oh of that? I only know if they are the same variable by the maximum property

Expansion Question (EDIT): The process assumes both sides of $\mathbf{y'} = \mathbf{F}(t,\mathbf{y})$ take a polynomial form $y = \sum a_{ij} t^i$ and there will be recursions to solve the corresponding coefficients. I am using $a_{ij}$ so we do not forget the system $\mathbf{y'} = \mathbf{F}(t,\mathbf{y})$ could contain $n > 2$ equations. Normally most Numerical books assumes $2$ or $3$ equations. Also, this recursion process has no calculus in it. This is similar to a power series approximation.

If this isn't the right place to post, can someone move it? Thanks

• How can you do a series expansion at $t_0$ if you only know $y(t_0)$? – David Jan 28 '16 at 23:44
• @David, I should edit, but you assume both sides of $y' = F(t,y)$ take a polynomial form, say $y = \sum a_i t^i$ and $y' = \sum ia_i t^{i-1}$. You get a recursion from the coefficients. When I say expansion at $t_0$, I just mean we take $t_0 + \delta$ to be our new $t_0$. – Hawk Jan 28 '16 at 23:47
• But you don't know $y'$ otherwise you wouldn't have a problem in the first place? I must be misunderstanding something. – David Jan 29 '16 at 0:49
• @David, No you do, but you know that it is not defined at $t_0$. Example (1 equation): $y' = 1/y$, with $y(0) = 0$ but $y'(0) = 1/y(0)$ is not defined, so the idea is to approximate the solution near $0$ via series recursion. Here we modify it, say, by $y(0 + 0.1) = y(0.1) = \text{something nonzero}$, now it is okay to use the Runge Kutta Alg start at $t=0.1$ because $y'(0.1) = 1/y(0.1)$ has no problems. – Hawk Jan 29 '16 at 0:54