MarketRunge–Kutta methods
Company Profile

Runge–Kutta methods

In numerical analysis, the Runge–Kutta methods are a family of implicit and explicit iterative methods, which include the Euler method, used in temporal discretization for the approximate solutions of simultaneous nonlinear equations. These methods were developed around 1900 by the German mathematicians Carl Runge and Wilhelm Kutta.

The Runge–Kutta method
The most widely known member of the Runge–Kutta family is generally referred to as "RK4", the "classic Runge–Kutta method" or simply as "the Runge–Kutta method". Let an initial value problem be specified as follows: : \frac{dy}{dt} = f(t, y), \quad y(t_0) = y_0. Here y is an unknown function (scalar or vector) of time t, which we would like to approximate; we are told that \frac{dy}{dt}, the rate at which y changes, is a function of t and of y itself. At the initial time t_0 the corresponding y value is y_0. The function f and the initial conditions t_0, y_0 are given. Now we pick a step-size h > 0 and define: :\begin{align} y_{n+1} &= y_n + \frac{h}{6}\left(k_1 + 2k_2 + 2k_3 + k_4 \right),\\ t_{n+1} &= t_n + h \\ \end{align} for n = 0, 1, 2, 3, ..., using : \begin{align} k_1 &= \ f(t_n, y_n), \\ k_2 &= \ f\!\left(t_n + \frac{h}{2}, y_n + k_1 \frac{h}{2}\right), \\ k_3 &= \ f\!\left(t_n + \frac{h}{2}, y_n + k_2 \frac{h}{2}\right), \\ k_4 &= \ f\!\left(t_n + h, y_n + h k_3\right). \end{align} (Note: the above equations have different but equivalent definitions in different texts.) Here y_{n+1} is the RK4 approximation of y(t_{n+1}), and the next value (y_{n+1}) is determined by the present value (y_n) plus the weighted average of four increments, where each increment is the product of the size of the interval, h, and an estimated slope specified by function f on the right-hand side of the differential equation. • k_1 is the slope at the beginning of the interval, using y (Euler's method); • k_2 is the slope at the midpoint of the interval, using y and k_1 ; • k_3 is again the slope at the midpoint, but now using y and k_2 ; • k_4 is the slope at the end of the interval, using y and k_3 . In averaging the four slopes, greater weight is given to the slopes at the midpoint. If f is independent of y, so that the differential equation is equivalent to a simple integral, then RK4 is Simpson's rule. The RK4 method is a fourth-order method, meaning that the local truncation error is on the order of O(h^5), while the total accumulated error is on the order of O(h^4). In many practical applications the function f is independent of t (so called autonomous system, or time-invariant system, especially in physics), and their increments are not computed at all and not passed to function f, with only the final formula for t_{n+1} used. ==Explicit Runge–Kutta methods==
Explicit Runge–Kutta methods
The family of explicit Runge–Kutta methods is a generalization of the RK4 method mentioned above. It is given by : y_{n+1} = y_n + h \sum_{i=1}^s b_i k_i, where : \begin{align} k_1 & = f(t_n, y_n), \\ k_2 & = f(t_n+c_2h, y_n+(a_{21}k_1)h), \\ k_3 & = f(t_n+c_3h, y_n+(a_{31}k_1+a_{32}k_2)h), \\ & \ \ \vdots \\ k_s & = f(t_n+c_sh, y_n+(a_{s1}k_1+a_{s2}k_2+\cdots+a_{s,s-1}k_{s-1})h). \end{align} :(Note: the above equations may have different but equivalent definitions in some texts. These data are usually arranged in a mnemonic device, known as a Butcher tableau (after John C. Butcher): : A Taylor series expansion shows that the Runge–Kutta method is consistent if and only if :\sum_{i=1}^{s} b_{i} = 1. There are also accompanying requirements if one requires the method to have a certain order p, meaning that the local truncation error is O(hp+1). These can be derived from the definition of the truncation error itself. For example, a two-stage method has order 2 if b1 + b2 = 1, b2c2 = 1/2, and b2a21 = 1/2. Note that a popular condition for determining coefficients is In general, if an explicit s-stage Runge–Kutta method has order p, then it can be proven that the number of stages must satisfy s \ge p and if p \ge 5, then s \ge p+1. However, it is not known whether these bounds are sharp in all cases. In some cases, it is proven that the bound cannot be achieved. For instance, Butcher proved that for p>6, there is no explicit method with s=p+1 stages. Butcher also proved that for p>7, there is no explicit Runge-Kutta method with p+2 stages. In general, however, it remains an open problem what the precise minimum number of stages s is for an explicit Runge–Kutta method to have order p. Some values which are known are: : \begin{array}{c|cccccccc} p & 1 & 2 & 3 & 4 & 5 & 6 & 7 & 8 \\ \hline \min s & 1 & 2 & 3 & 4 & 6 & 7 & 9 & 11 \end{array} The provable bound above then implies that we cannot find methods of orders p=1, 2, \ldots, 6 that require fewer stages than the methods we already know for these orders. The work of Butcher also proves that 7th and 8th order methods have a minimum of 9 and 11 stages, respectively. Explicit methods of order 7 with 9 stages are also known. See Refs. for a summary. Examples The RK4 method falls in this framework. Its tableau is : A slight variation of "the" Runge–Kutta method is also due to Kutta in 1901 and is called the 3/8-rule. The primary advantage this method has is that almost all of the error coefficients are smaller than in the popular method, but it requires slightly more floating-point operations per time step. Its Butcher tableau is : However, the simplest Runge–Kutta method is the (forward) Euler method, given by the formula y_{n+1} = y_n + hf(t_n, y_n) . This is the only consistent explicit Runge–Kutta method with one stage. The corresponding tableau is : Second-order methods with two stages An example of a second-order method with two stages is provided by the explicit midpoint method: : y_{n+1} = y_n + hf\left(t_n+\frac{1}{2}h, y_n+\frac{1}{2}hf(t_n,\ y_n)\right). The corresponding tableau is : The midpoint method is not the only second-order Runge–Kutta method with two stages; there is a family of such methods, parameterized by α and given by the formula : y_{n+1} = y_n + h\bigl( (1-\tfrac1{2\alpha}) f(t_n, y_n) + \tfrac1{2\alpha} f(t_n + \alpha h, y_n + \alpha h f(t_n, y_n)) \bigr). Its Butcher tableau is : In this family, \alpha=\tfrac12 gives the midpoint method, \alpha=1 is Heun's method, and \alpha=\tfrac23 is Ralston's method. ==Use==
Use
As an example, consider the two-stage second-order Runge–Kutta method with α = 2/3, also known as Ralston method. It is given by the tableau with the corresponding equations : \begin{align} k_1 &= f(t_n,\ y_n), \\ k_2 &= f(t_n + \tfrac{2}{3}h,\ y_n + \tfrac{2}{3}h k_1), \\ y_{n+1} &= y_n + h\left(\tfrac{1}{4}k_1+\tfrac{3}{4}k_2\right). \end{align} This method is used to solve the initial-value problem : \frac{dy}{dt} = \tan(y)+1,\quad y_0=1,\ t\in [1, 1.1] with step size h = 0.025, so the method needs to take four steps. The method proceeds as follows: The numerical solutions correspond to the underlined values. ==Implicit Runge–Kutta methods==
Implicit Runge–Kutta methods
Explicit Runge–Kutta methods are generally unsuitable for the solution of stiff equations because their region of absolute stability is small; in particular, it is bounded. This issue is especially important in the solution of partial differential equations. The instability of explicit Runge–Kutta methods motivates the development of implicit methods. An implicit Runge–Kutta method has the form : y_{n+1} = y_n + h \sum_{i=1}^s b_i k_i, where : k_i = f\left( t_n + c_i h,\ y_{n} + h \sum_{j=1}^s a_{ij} k_j \right), \quad i = 1, \ldots, s. The difference with an explicit method is that in an explicit method, the sum over j only goes up to i − 1. This also shows up in the Butcher tableau: the coefficient matrix a_{ij} of an explicit method is lower triangular. In an implicit method, the sum over j goes up to s and the coefficient matrix is not strictly triangular, yielding a Butcher tableau of the form Examples The simplest example of an implicit Runge–Kutta method is the backward Euler method: :y_{n + 1} = y_n + h f(t_n + h,\ y_{n + 1}). \, The Butcher tableau for this is simply: : \begin{array}{c|c} 1 & 1 \\ \hline & 1 \\ \end{array} This Butcher tableau corresponds to the formulae : k_1 = f(t_n + h,\ y_n + h k_1) \quad\text{and}\quad y_{n+1} = y_n + h k_1, which can be re-arranged to get the formula for the backward Euler method listed above. Another example for an implicit Runge–Kutta method is the trapezoidal rule. Its Butcher tableau is: : \begin{array}{c|cc} 0 & 0& 0\\ 1 & \frac{1}{2}& \frac{1}{2}\\ \hline & \frac{1}{2}&\frac{1}{2}\\ & 1 & 0 \\ \end{array} The trapezoidal rule is a collocation method (as discussed in that article). All collocation methods are implicit Runge–Kutta methods, but not all implicit Runge–Kutta methods are collocation methods. The Gauss–Legendre methods form a family of collocation methods based on Gauss quadrature. A Gauss–Legendre method with s stages has order 2s (thus, methods with arbitrarily high order can be constructed). The method with two stages (and thus order four) has Butcher tableau: : \begin{array}{c|cc} \frac12 - \frac16 \sqrt3 & \frac14 & \frac14 - \frac16 \sqrt3 \\ \frac12 + \frac16 \sqrt3 & \frac14 + \frac16 \sqrt3 & \frac14 \\ \hline & \frac12 & \frac12 \\ & \frac12+\frac12 \sqrt3 & \frac12-\frac12 \sqrt3 \end{array} where e stands for the vector of ones. The function r is called the stability function. It follows from the formula that r is the quotient of two polynomials of degree s if the method has s stages. Explicit methods have a strictly lower triangular matrix A, which implies that det(IzA) = 1 and that the stability function is a polynomial. The numerical solution to the linear test equation decays to zero if | r(z) | < 1 with z = hλ. The set of such z is called the domain of absolute stability. In particular, the method is said to be absolute stable if all z with Re(z) < 0 are in the domain of absolute stability. The stability function of an explicit Runge–Kutta method is a polynomial, so explicit Runge–Kutta methods can never be A-stable. The Gauss–Legendre method with s stages has order 2s, so its stability function is the Padé approximant with m = n = s. It follows that the method is A-stable. This shows that A-stable Runge–Kutta can have arbitrarily high order. In contrast, the order of A-stable linear multistep methods cannot exceed two. ==Adaptive Runge–Kutta methods==
Adaptive Runge–Kutta methods
Adaptive methods are designed to produce an estimate of the local truncation error of a single Runge–Kutta step. This is done by having two methods, one with order p and one with order p - 1. These methods are interwoven, i.e., they have common intermediate steps. Thanks to this, estimating the error has little or negligible computational cost compared to a step with the higher-order method. During the integration, the step size is adapted such that the estimated error stays below a user-defined threshold: If the error is too high, a step is repeated with a lower step size; if the error is much smaller, the step size is increased to save time. This results in an (almost), optimal step size, which saves computation time. Moreover, the user does not have to spend time on finding an appropriate step size. The lower-order step is given by : y^*_{n+1} = y_n + h\sum_{i=1}^s b^*_i k_i, where k_i are the same as for the higher-order method. Then the error is : e_{n+1} = y_{n+1} - y^*_{n+1} = h\sum_{i=1}^s (b_i - b^*_i) k_i, which is O(h^p). The Butcher tableau for this kind of method is extended to give the values of b^*_i: \begin{array}{c|cccc} c_1 & a_{11} & a_{12}& \dots & a_{1s}\\ c_2 & a_{21} & a_{22}& \dots & a_{2s}\\ \vdots & \vdots & \vdots& \ddots& \vdots\\ c_s & a_{s1} & a_{s2}& \dots & a_{ss} \\ \hline & b_1 & b_2 & \dots & b_s\\ & b^*_1 & b^*_2 & \dots & b^*_s\\ \end{array} The Runge–Kutta–Fehlberg method has two methods of orders 5 and 4. Its extended Butcher tableau is: However, the simplest adaptive Runge–Kutta method involves combining Heun's method, which is order 2, with the Euler method, which is order 1. Its extended Butcher tableau is: Other adaptive Runge–Kutta methods are the Bogacki–Shampine method (orders 3 and 2), the Cash–Karp method and the Dormand–Prince method (both with orders 5 and 4). ==Nonconfluent Runge–Kutta methods==
Nonconfluent Runge–Kutta methods
A Runge–Kutta method is said to be nonconfluent if all the c_i,\,i=1,2,\ldots,s are distinct. ==Runge–Kutta–Nyström methods==
Runge–Kutta–Nyström methods
Runge–Kutta–Nyström (RKN) methods are a family of methods based on the same principles as Runge–Kutta methods but for second-order initial value problems, hence problems of the form : : \frac{d^2y}{dt^2} = f(t,\frac{dy}{dt}, y), \quad y(t_0) = y_0, \quad \frac{dy}{dt} (t_0) = y'_0. There are two derivatives two approximates, a Runge-Kutta-Nyström methods hence uses two Runge-Kutta matrices a_{ij}, a'_{ij} , and two sets of weights b_i, b'_i , but still only needs one set of nodes c_i . This yields a Butcher table with the form : \begin{array}{c|cccc} c_1 & a_{11} & a_{12}& \dots & a_{1s}\\ c_2 & a_{21} & a_{22}& \dots & a_{2s}\\ \vdots & \vdots & \vdots& \ddots& \vdots\\ c_s & a_{s1} & a_{s2}& \dots & a_{ss} \\ \hline & a'_{11} & a'_{12}& \dots & a'_{1s}\\ & a'_{21} & a'_{22}& \dots & a'_{2s}\\ & \vdots & \vdots& \ddots& \vdots\\ & a'_{s1} & a'_{s2}& \dots & a'_{ss} \\ \hline & b_1 & b_2 & \dots & b_s\\ & b'_1 & b'_2 & \dots & b'_s\\ \end{array} = \begin{array}{c|c} \mathbf{c}& \mathbf{A}\\ \hline & \mathbf{A'}\\ \hline & \mathbf{b}^\top \\ & \mathbf{b'}^\top \end{array} Assume the approximations have been carried out up to t_n, with y_n the approximation of y(t_n) and y'_n the approximation of \frac{dy}{dt}(t_n). The approximations y_{n+1}, y'_{n+1} at t_{n+1} = t_n + h are the solutions of the following system : \begin{cases} g_i = y_n + c_i h y'_n + h^2 \sum_{j=1}^{s} a_{ij} f(t_n + c_j h,g'_j, g_j), & i=1,2,\ldots, s\\ g'_i = y'_n + h \sum_{j=1}^{s} a'_{ij} f(t_n + c_j h,g'_j, g_j), & i=1,2,\ldots, s\\ \\ y_{n+1} = y_n + h y'_n + h^2 \sum_{j=1}^s b_j f(t_n + c_j h,g'_j, g_j) \\ y'_{n+1} = y'_n + h \sum_{j=1}^s b'_j f(t_n + c_j h,g'_j, g_j) \end{cases} Where g_i,g'_i are the intermediate approximations of y and \frac{dy}{dt}. It is strictly equivalent to work with the values k_j = f(t_n + c_j h,g'_j, g_j) where the g_j,g'_j have been replaced with their formula, instead of working with g_i,g'_i, similarly to what we previously did with Runge-Kutta methods, but the system is easier to write this way. A Runge-Kutta-Nyström method is said to be explicit if both A,A' are strictly lower triangular, and in this case, the sums \sum_{j=1}^{s} in the expressions of g_i,g'_i, may be replaced with \sum_{j=1}^{i-1}. Additionally, a Runge-Kutta-Nyström method is said to be of order p if the local truncation error of both y_{n+1},y'_{n+1} is O (h^{p+1}). If the function f of the considered initial value problem is independent of \frac{dy}{dt}, one does not need to approximate the intermediate values g'_i to compute the approximations, the weights a'_{ij} are hence useless and instead we write a method made only for this special case using a tableau of the form : \begin{array}{c|cccc} c_1 & a_{11} & a_{12}& \dots & a_{1s}\\ c_2 & a_{21} & a_{22}& \dots & a_{2s}\\ \vdots & \vdots & \vdots& \ddots& \vdots\\ c_s & a_{s1} & a_{s2}& \dots & a_{ss} \\ \hline & b_1 & b_2 & \dots & b_s\\ & b'_1 & b'_2 & \dots & b'_s\\ \end{array} = \begin{array}{c|c} \mathbf{c}& \mathbf{A}\\ \hline & \mathbf{b}^\top \\ & \mathbf{b'}^\top \end{array} This special case is particularly interesting since it allows for greater order than what a Runge-Kutta-Nyström can achieve in general. For example, two fourth-order explicit RKN methods are given by the following Butcher tableau: \begin{array}{c|ccc} c_i & & a_{ij} & \\ \frac{3+\sqrt{3}}{6} & 0 & 0 & 0 \\ \frac{3-\sqrt{3}}{6} & \frac{2-\sqrt{3}}{12} & 0 & 0 \\ \frac{3+\sqrt{3}}{6} & 0 & \frac{\sqrt{3}}{6} & 0 \\ \hline b_i & \frac{3-2 \sqrt{3}}{12} & \frac{1}{2} & \frac{3+2 \sqrt{3}}{12} \\ \hline b'_i & \frac{5-3 \sqrt{3}}{24} & \frac{3+\sqrt{3}}{12} & \frac{1+\sqrt{3}}{24} \\ \end{array} \begin{array}{c|ccc} c_i & & a_{ij} & \\ \frac{3-\sqrt{3}}{6} & 0 & 0 & 0 \\ \frac{3+\sqrt{3}}{6} & \frac{2+\sqrt{3}}{12} & 0 & 0 \\ \frac{3-\sqrt{3}}{6} & 0 & -\frac{\sqrt{3}}{6} & 0 \\ \hline b_i & \frac{3+2 \sqrt{3}}{12} & \frac{1}{2} & \frac{3-2 \sqrt{3}}{12} \\ \hline b'_i & \frac{5+3 \sqrt{3}}{24} & \frac{3-\sqrt{3}}{12} & \frac{1-\sqrt{3}}{24} \\ \end{array} These two schemes also have the symplectic-preserving properties when the original equation is derived from a conservative classical mechanical system, i.e. when f_i(x_1, \ldots, x_n ) = \frac{\partial V}{\partial x_i} (x_1, \ldots, x_n ) for some scalar function V . ==B-stability==
B-stability
The A-stability concept for the solution of differential equations is related to the linear autonomous equation y'=\lambda y. proposed the investigation of stability of numerical schemes when applied to nonlinear systems that satisfy a monotonicity condition. The corresponding concepts were defined as G-stability for multistep methods (and the related one-leg methods) and B-stability (Butcher, 1975) for Runge–Kutta methods. A Runge–Kutta method applied to the non-linear system y'=f(y), which verifies \langle f(y)-f(z),\ y-z \rangle\leq 0, is called B-stable, if this condition implies \|y_{n+1}-z_{n+1}\|\leq\|y_{n}-z_{n}\| for two numerical solutions. Let B, M and Q be three s\times s matrices defined by \begin{align} B & =\operatorname{diag}(b_1,b_2,\ldots,b_s), \\[4pt] M & =BA+A^TB-bb^T, \\[4pt] Q & =BA^{-1}+A^{-T}B-A^{-T}bb^TA^{-1}. \end{align} A Runge–Kutta method is said to be algebraically stable if the matrices B and M are both non-negative definite. A sufficient condition for B-stability is: B and Q are non-negative definite. ==Derivation of the Runge–Kutta fourth-order method==
Derivation of the Runge–Kutta fourth-order method
In general a Runge–Kutta method of order s can be written as: :y_{t + h} = y_t + h \cdot \sum_{i=1}^s a_i k_i +\mathcal{O}(h^{s+1}), where: :k_i =\sum_{j = 1}^s \beta_{ij} f(k_j,\ t_n + \alpha_i h) are increments obtained evaluating the derivatives of y_t at the i-th order. We develop the derivation for the Runge–Kutta fourth-order method using the general formula with s=4 evaluated, as explained above, at the starting point, the midpoint and the end point of any interval (t,\ t +h); thus, we choose: : \begin{align} &\alpha_i & &\beta_{ij} \\ \alpha_1 &= 0 & \beta_{21} &= \frac{1}{2} \\ \alpha_2 &= \frac{1}{2} & \beta_{32} &= \frac{1}{2} \\ \alpha_3 &= \frac{1}{2} & \beta_{43} &= 1 \\ \alpha_4 &= 1 & &\\ \end{align} and \beta_{ij} = 0 otherwise. We begin by defining the following quantities: :\begin{align} y^1_{t+h} &= y_t + hf\left(y_t,\ t\right) \\ y^2_{t+h} &= y_t + hf\left(y^1_{t+h/2},\ t+\frac{h}{2}\right) \\ y^3_{t+h} &= y_t + hf\left(y^2_{t+h/2},\ t+\frac{h}{2}\right) \end{align} where y^1_{t+h/2} = \dfrac{y_t + y^1_{t+h}}{2} and y^2_{t+h/2} = \dfrac{y_t + y^2_{t+h}}{2}. If we define: :\begin{align} k_1 &= f(y_t,\ t) \\ k_2 &= f\left(y^1_{t+h/2},\ t + \frac{h}{2}\right) = f\left(y_t + \frac{h}{2} k_1,\ t + \frac{h}{2}\right) \\ k_3 &= f\left(y^2_{t+h/2},\ t + \frac{h}{2}\right) = f\left(y_t + \frac{h}{2} k_2,\ t + \frac{h}{2}\right) \\ k_4 &= f\left(y^3_{t+h},\ t + h\right) = f\left(y_t + h k_3,\ t + h\right) \end{align} and for the previous relations we can show that the following equalities hold up to \mathcal{O}(h^2):\begin{align} k_2 &= f\left(y^1_{t+h/2},\ t + \frac{h}{2}\right) = f\left(y_t + \frac{h}{2} k_1,\ t + \frac{h}{2}\right) \\ &= f\left(y_t,\ t\right) + \frac{h}{2} \frac{d}{dt}f\left(y_t,\ t\right) \\ k_3 &= f\left(y^2_{t+h/2},\ t + \frac{h}{2}\right) = f\left(y_t + \frac{h}{2} f\left(y_t + \frac{h}{2} k_1,\ t + \frac{h}{2}\right),\ t + \frac{h}{2}\right) \\ &= f\left(y_t,\ t\right) + \frac{h}{2} \frac{d}{dt} \left[ f\left(y_t,\ t\right) + \frac{h}{2} \frac{d}{dt}f\left(y_t,\ t\right) \right] \\ k_4 &= f\left(y^3_{t+h},\ t + h\right) = f\left(y_t + h f\left(y_t + \frac{h}{2} k_2,\ t + \frac{h}{2}\right),\ t + h\right) \\ &= f\left(y_t + h f\left(y_t + \frac{h}{2} f\left(y_t + \frac{h}{2} f\left(y_t,\ t\right),\ t + \frac{h}{2}\right),\ t + \frac{h}{2}\right),\ t + h\right) \\ &= f\left(y_t,\ t\right) + h \frac{d}{dt} \left[ f\left(y_t,\ t\right) + \frac{h}{2} \frac{d}{dt}\left[ f\left(y_t,\ t\right) + \frac{h}{2} \frac{d}{dt}f\left(y_t,\ t\right) \right]\right] \end{align} where:\frac{d}{dt} f(y_t,\ t) = \frac{\partial}{\partial y} f(y_t,\ t) \dot y_t + \frac{\partial}{\partial t} f(y_t,\ t) = f_y(y_t,\ t) \dot y_t + f_t(y_t,\ t) := \ddot y_t is the total derivative of f with respect to time. If we now express the general formula using what we just derived we obtain:\begin{align} y_{t+h} = {} & y_t + h \left\lbrace a \cdot f(y_t,\ t) + b \cdot \left[ f(y_t,\ t) + \frac{h}{2} \frac{d}{dt}f(y_t,\ t) \right] \right.+ \\ & {}+ c \cdot \left[ f(y_t,\ t) + \frac{h}{2} \frac{d}{dt} \left[ f\left(y_t,\ t\right) + \frac{h}{2} \frac{d}{dt}f(y_t,\ t) \right] \right] + \\ &{}+ d \cdot \left[f(y_t,\ t) + h \frac{d}{dt} \left[ f(y_t,\ t) + \frac{h}{2} \frac{d}{dt}\left[ f(y_t,\ t) + \left. \frac{h}{2} \frac{d}{dt}f(y_t,\ t) \right]\right]\right]\right\rbrace + \mathcal{O}(h^5) \\ = {} & y_t + a \cdot h f_t + b \cdot h f_t + b \cdot \frac{h^2}{2} \frac{df_t}{dt} + c \cdot h f_t+ c \cdot \frac{h^2}{2} \frac{df_t}{dt} + \\ &{}+ c \cdot \frac{h^3}{4} \frac{d^2f_t}{dt^2} + d \cdot h f_t + d \cdot h^2 \frac{df_t}{dt} + d \cdot \frac{h^3}{2} \frac{d^2f_t}{dt^2} + d \cdot \frac{h^4}{4} \frac{d^3f_t}{dt^3} + \mathcal{O}(h^5) \end{align} and comparing this with the Taylor series of y_{t+h} around t:\begin{align} y_{t+h} &= y_t + h \dot y_t + \frac{h^2}{2} \ddot y_t + \frac{h^3}{6} y^{(3)}_t + \frac{h^4}{24} y^{(4)}_t + \mathcal{O}(h^5) = \\ &= y_t + h f(y_t,\ t) + \frac{h^2}{2} \frac{d}{dt}f(y_t,\ t) + \frac{h^3}{6} \frac{d^2}{dt^2}f(y_t,\ t) + \frac{h^4}{24} \frac{d^3}{dt^3}f(y_t,\ t) \end{align} we obtain a system of constraints on the coefficients: : \begin{cases} & a + b + c + d = 1 \\[6pt] & \frac{1}{2} b + \frac{1}{2} c + d = \frac{1}{2} \\[6pt] & \frac{1}{4} c + \frac{1}{2} d = \frac{1}{6} \\[6pt] & \frac{1}{4} d = \frac{1}{24} \end{cases} which when solved gives a = \frac{1}{6}, b = \frac{1}{3}, c = \frac{1}{3}, d = \frac{1}{6} as stated above. ==See also==
tickerdossier.comtickerdossier.substack.com