# Consistency (numerics)

In numerical mathematics , the consistency or the order of consistency is a property of a numerical method, which means that the algorithm actually solves the given problem in a certain fundamental way and not another.

The three critical error assessment mechanisms in numerics are condition , stability and consistency. All three variables analyze the origin of errors, but differ in the type of error sources. The condition evaluation assumes that the algorithm works exactly, but the input data is disturbed. The stability compares the result of the numerical procedure with that of the exact procedure under disturbed input data.

Consistency now deals with the question of what happens when the exact solution is processed in the numerical method. The examples given are numerical differentiation or the solution of an initial value problem. Here the resulting error is considered as a function of a selected grid or a selected step size.

## definition

Given a continuous problem and the exact solution as well as the numerical solution to a step size . The procedure is called consistent, if there is a function with , so that applies to the local error (the procedure starts with exact initial data): ${\ displaystyle u (t)}$ ${\ displaystyle u_ {h} (t)}$ ${\ displaystyle h> 0}$ ${\ displaystyle \ sigma (h)}$ ${\ displaystyle \ lim _ {h \ to 0} \ sigma (h) = 0}$ ${\ displaystyle \ | u (t_ {n}) - u_ {h} (t_ {n}) \ | \ leq \ sigma (h) \ \ forall t_ {n} = nh.}$ It has the order of consistency , if . ${\ displaystyle p \ in \ mathbb {N}}$ ${\ displaystyle \ sigma (h) \ in {\ mathcal {O}} \ left (h ^ {p} \ right)}$ This means that you have an error limit at any point in time (or place) depending on the selected step size. It is clear that in practice methods only show this behavior if one chooses a sufficiently small step size (see stability ).

Many such consistency estimates are proven with the help of Taylor's theorem, for the simple reason that many methods develop the first terms of the Taylor series (which is dependent on a step size ) in order to represent the solution for the next point in time based on the solution at the current point in time : ${\ displaystyle h}$ ${\ displaystyle f (x + h) = f (x) + hf '(x) + h ^ {2} {\ frac {f' '(\ xi)} {2}}}$ .

The constant is then the remainder or a supremum norm estimate. ${\ displaystyle c}$ ${\ displaystyle f '' (\ xi)}$ ## Definition in the case of the one-step procedure

We start from the initial value problem

${\ displaystyle y '(x) = f (x, y (x)), \ quad y (x_ {i}) = y_ {i}}$ where is the solution of the initial value problem and was generated by applying the method to with step size . In addition, let it be infinitely often differentiable and locally Lipschitz continuous . ${\ displaystyle y}$ ${\ displaystyle y_ {i + 1}}$ ${\ displaystyle y_ {i}}$ ${\ displaystyle h> 0}$ ${\ displaystyle f}$ A one-step procedure is called consistent if that holds for every right-hand side${\ displaystyle f}$ ${\ displaystyle {\ underset {h \ rightarrow 0} {\ limsup}} {\ underset {x_ {i} \ in [a, b], y_ {i} \ in \ mathbb {R} ^ {d}} { \ sup}} {\ frac {| y_ {i + 1} -y (x_ {i} + h) |} {h ^ {p + 1}}} <\ infty}$ ie constants exist such that ${\ displaystyle C> 0, h_ {0}> 0}$ ${\ displaystyle {\ underset {x_ {i} \ in [a, b], y_ {i} \ in \ mathbb {R} ^ {d}} {\ sup}} | y_ {i + 1} -y ( x_ {i} + h) | \ leq Ch ^ {p + 1}}$ for everyone . ${\ displaystyle 0 One method of consistency ordering makes a local error of ordering in every interval . ${\ displaystyle p}$ ${\ displaystyle [x_ {i}, x_ {i + 1}]}$ ${\ displaystyle h ^ {p + 1}}$ ## Examples

### Differentiation

One possibility to calculate the derivative of a function at a point is to use difference quotients, provided that it can be differentiated sufficiently often. We consider two methods: ${\ displaystyle f}$ ${\ displaystyle x}$ ${\ displaystyle f}$ The simple difference quotient
${\ displaystyle f '(x) \ approx {{f (x + h) -f (x)} \ over {h}}}$ and
the central difference quotient
${\ displaystyle f '(x) \ approx {{f (x + h) -f (xh)} \ over {2h}}.}$ The Taylor developments

${\ displaystyle f (x + h) = f (x) + f '(x) h + {{f' '(\ xi) h ^ {2}} \ over {2}} {\ text {or}} f (x \ pm h) = f (x) \ pm f '(x) h + {{f' '(x) h ^ {2}} \ over {2}} \ pm {{f' '' (\ xi) h ^ {3}} \ over {6}}}$ then provide for the simple difference quotient

${\ displaystyle {{f (x + h) -f (x)} \ over {h}} = f '(x) + {{f' '(\ xi)} \ over {2}} h}$ .

or for the central difference quotient

${\ displaystyle {{f (x + h) -f (xh)} \ over {2h}} = f '(x) + {{f' '' (\ xi _ {1}) + f '' '( \ xi _ {2})} \ over {12}} h ^ {2}.}$ By rearranging and applying the norm in the image area of , we then get ${\ displaystyle f}$ ${\ displaystyle \ left \ | f '(x) - {{f (x + h) -f (x)} \ over {h}} \ right \ | = \ left \ | {{f' '(\ xi )} \ over {2}} h \ right \ | \ leq {\ frac {1} {2}} \ left \ | f '' \ right \ | _ {\ infty} h}$ or.

${\ displaystyle \ left \ | f '(x) - {{f (x + h) -f (xh)} \ over {2h}} \ right \ | = \ left \ | {{f' '' (\ xi _ {1}) + f '' '(\ xi _ {2})} \ over {12}} h ^ {2} \ right \ | \ leq {\ frac {2} {12}} \ left \ | f '' '\ right \ | _ {\ infty} h ^ {2} = {\ frac {1} {6}} \ left \ | f' '' \ right \ | _ {\ infty} h ^ { 2}}$ ,

So consistency order one, or two, . It can be seen that with a similar computational effort (two function evaluations each and essentially one division), a higher order of consistency is achieved using the central difference quotient. ${\ displaystyle O (h)}$ ${\ displaystyle O (h ^ {2})}$ ### Ordinary differential equations

For the discrete solution of an initial value problem , one can use one-step methods , e.g. B. Runge-Kutta method use. Such a system has the consistency order p if it has the local error order p + 1 .

The simplest one-step method is the explicit Euler method (Euler's polygon method ).

This is the exact solution of a differential equation ${\ displaystyle u (t) \ in C ^ {1} ([t_ {0}, f_ {f}])}$ ${\ displaystyle u '(t) = f (t, u (t)) \!}$ and ${\ displaystyle u (t_ {0}) = u_ {0} \!}$ numerically approximated by the piecewise linear function

${\ displaystyle u_ {h} (t_ {n} + \ tau) = u_ {h} (t_ {n}) + \ tau \, f (t_ {n}, u_ {h} (t_ {n})) \!}$ with and${\ displaystyle t_ {n} = t_ {0} + nh}$ ${\ displaystyle \ tau \ in [0, h]}$ with and${\ displaystyle u_ {h} (t_ {0}) = u_ {0} \!}$ ${\ displaystyle u_ {h} (t_ {n + 1}) = u_ {h} (t_ {n} + h)}$ One can also use the Taylor expansion here

${\ displaystyle u (t + h) = u (t) + h \, u '(t) + {\ frac {h ^ {2}} {2}} u' '(t) + \ dots = u ( t) + h \, f (t, u (t)) + O (h ^ {2})}$ the local error order 2 and thus the consistency of , d. i.e., consistency order 1 . ${\ displaystyle O (h)}$ ## Individual evidence

1. von Harrach, Bastian: Numerics of differential equations. July 25, 2017, p. 23 , accessed January 30, 2018 .