Relaxation Algorithm

Description

We use the principle of relaxation to solve a differential equation numerically. Relaxation type algorithms applied to differential equations have useful properties: i) They can easily cope with boundary conditions, such as initial conditions for state variables and transversality conditions of optimal growth. ii) Additional equations (e.g. equilibrium conditions or feasibility constraints) can be easily incorporated. iii) By transformation of the time variable, one can solve infinite horizon problems, as they arise from many dynamic optimization problems in economics.

 

Suppose we want to compute a numerical solution of a differential equation in terms of a large (finite) sequence of points representing the desired path. To start with, we take an arbitrary trial solution, typically not satisfying the slope conditions implied by the differential equation nor the boundary conditions. We measure the deviation from the true path by a multidimensional error function and use the derivative of the error function to improve the trial solution in a Newton type iteration. Hence, at each point of the path the correction is related to the particular inaccuracy in slope and in solving the static equation. The crucial difference to the various shooting methods is the simultaneous adjustment along the path as a whole.


Multi-Dimensional Transitional Dynamics: A Simple Numerical Procedure

Macroeconomic Dynamics, Vol. 12 (3), 2008, pp. 301 - 319

Trimborn, Timo, Karl-Joseph Koch & Thomas Steger

 

Working Paper

The figure illustrates the adjustment by relaxation of a linear initial guess towards the saddle path in the Ramsey-Cass-Koopmans model. The initial guess starts with a fixed initial value of the state variable k and an arbitrary initial value of the control variable c. It consists of 30 mesh points lined up equidistantly between the starting point and the known steady state of the model. Evaluating the multi-dimensional error function the algorithm realizes that the fit to the differential equation can be improved by an upward shift of the curve without jeopardizing the boundary conditions. After a few steps the error is sufficiently small and the algorithm stops.

Major Advantages


The relaxation algorithm solves non-linear differential equations as resulting from continuous-time, perfect-foresight optimization problems.


*) This occurs frequently in growth models. Examples comprise the Lucas (1988) Model & the Romer (1990) Model. Generally speaking, models with two or more state variables usually exhibit a continuum of stationary equilibria (or center manifold or multiplicity of steady states). See also Trimborn (2018).

Further Content


Applications provides illustrative examples for various economic growth models. Neat Examples lists prominent papers that have employed relaxation. Extensions informs about modifications to incoroporate inequality constraints or shocks.