Solving Models With Off-The-Shelf Software. Example Of Potential Pitfalls Associated With The Use And Abuse Of Default Parameter Settings

Size: px
Start display at page:

Download "Solving Models With Off-The-Shelf Software. Example Of Potential Pitfalls Associated With The Use And Abuse Of Default Parameter Settings"

Transcription

1 An Example Of Potential Pitfalls Associated With The Use And Abuse Of Default Parameter Settings Ric D. Herbert 1 Peter J. Stemp 2 1 Faculty of Science and Information Technology, The University of Newcastle, Ourimbah, NSW, Australia 2 Department of Economics, Monash University, Clayton East, Vic, Australia 15th International Conference on Computing in Economics and Finance, Sydney Australia, July 2009

2 Table of contents

3 This paper is part of a project we have been working on about the computational appropriateness of solution methods for dynamic macroeconomic models. There can be a temptation to rely on default settings in proprietary software to derive solutions to the model. In this paper we show that, for the solution of non-linear dynamic models, this approach can be inappropriate.

4 Method We consider versions of a simple model with stable and unstable eigenvalues, so that any dynamic solution requires the calculation of appropriate jumps in endogenous variables. One version of the model, expressed in levels, is highly non-linear. A second version of the model, expressed in logarithms, is linear. We start by showing the results that can be derived using the default settings of a typical solver. We show that this gives unsatisfactory results for the non-linear model; and then, show how the default settings and choice of solver can be adjusted to give acceptable results.

5 The linear model (expressed in logarithms) is given by the following set of equations: m p = α 1 y α 2 ṗ (1) y = β + (1 γ)n (2) ṅ = θ(δ γ)n (3) ẇ = η(n n) (4) The Greek symbols denote parameters with a positive value with 0 < γ < 1.

6 Model variables y = output; n = employment; n = full employment, assumed to be constant; p = price level; m = nominal money stock, assumed to be constant; and w = wage rate. is shocked by a change to the money stock.

7 Steady state Since this model is linear, it has a unique equilibrium which satisfies the following equations: m p = α 1 y (5) y = β + (1 γ)n (6) δ γn = w p (7) n = n (8)

8 Calibrating the model and eigenvalues α 1 = 1 α 2 = 0.5 β = 0 γ = 0.5 δ = log(0.5) θ = 1 η {0.2, 0.5, 10, 100} n = 1, m = 0.1, m 0 = 0 Eigenvalues η λ 1 λ 2 λ i i i i i i λ 1 indicates unstable pole as η increases eigenvalues become complex and have larger imaginary parts shock to m results in p jumping so economy moves on to the stable trajectory to new steady-state

9 Linear Model Eigenvalues for η [ 100, 100]. Eigenvalues as η varies Eigenvalues as η varies λ 1 λ 2 λ 3 8 λ 1 λ 2 λ Real part of eigenvalue 0 5 Imaginary part of eigenvalue η η Real part on LHS, imaginary part on RHS has a dominant real eigenvalue greater than zero for all the values of η. As η increases above 0.2 the model becomes more oscillatory.

10 p n w Analytic solution 0.39 Prices with varying η 1.1 Employment with varying η 1.5 Wages with varying η Time 0.98 Time 1.7 Time The closed-form solution solved using standard matrix techniques Dynamic solution becomes more oscillatory as η increases

11 The non-linear model (expressed in levels) An equivalent model specification can be rewritten in levels as follows: ( ) PN (1 γ)α 1 1 α 2 Ṗ = P log (9) M ( ) P(1 γ)n γ θ Ṅ = N log (10) W ( ) η Ẇ = W log (11) N N The variables are as for the model above except that upper case letters denote levels.

12 Steady-states Some solutions to the non-linear model can be derived by using the following transformation P = exp(p) (12) N = exp(n) (13) W = exp(w) (14) There are multiple steady-states with the non-linear model and some are not economically meaningful. These include the steady-state: P = 0 (15) N = N (16) W = 0 (17)

13 Two Point Boundary Value Problem The computational solution to this model can be formulated as a a two point boundary value problem written as: ẋ = f(t, x) 0 < t < t f (18) g(x(0), x(t f )) = 0 (19) Where f(.) is either the linear model, or non-linear model and g(.) is obtained from the steady-state equation. For each initial conditions vector c, the model has a solution x(t) = x(t; c) which satisfies x(0; c) = c. Substituting into equation 19 gives: g(c, x(t f ; c)) = 0 (20) and the problem is to solve this set of non-linear equations.

14 Solving 2PBVP The common approaches to solving the problem are by shooting, finite differences or projection methods. Here we will focus on on a shooting method Shooting methods for this model require An ODE solver to generate x(t) = x(t; c) A searcher to solve g(c, x(t f ; c)) = 0 The focus of this paper is on the model solver and default parameters of the solver.

15 Previous Work The nonlinear model can only be solved by computational means. We focus on shooting algorithms and particularly forward (in time) and reverse shooting. In Stemp and Herbert (2006) we focussed on the oscillatory linear model (η = 100) as it may have similar dynamics to nonlinear models. We showed that with η = 100 the choice of the ODE solver has significant impact on the likely success of shooting algorithms. In Herbert and Stemp (2009) we focussed on the nonlinear model and showed that forward-shooting is likely to solve to the wrong solution for the nonlinear model but the right solution for the linear model.

16 Approach We use the reverse shooting algorithm and compare the solution to the closed-form solution (expressed in levels). We use Matlab as the software environment. We consider 3 candidate ODE solvers which could typically be used for this model. We focus of η = 0.2 so that all eigenvalues are real.

17 ODE Solvers Runge-Kutta (Fehlberg method, Dormand-Prince 4/5 formula) A good robust single-step solver Solver of first choice for problem like this. (default!) Matlab ode45() function Adams-Bashforth-Moulton A multi-step solver Not normally used for a model like this as model is not computationally expensive to evaluate. Matlab ode113() function Stiff This model is not obviously stiff. (Largest eigenvalue about 4 times smallest) But stiffness could be the cause of the problems. Matlab ode115s() function

18 Default RK solver linear model solution Prices [!=0.2] Employment [!=0.2] Time Time Wages [!=0.2] Phase [!=0.2] Time Employment Wages Prices

19 Default RK solver nonlinear model solution Prices [!=0.2] Employment [!=0.2] Time Time Wages [!=0.2] Phase [!=0.2] Time Employment Wages Prices

20 Norm results for all methods: non-linear model when η = 0.2. (Root Mean Square Error) Method RMSE All RMSE P RMSE N RMSE W RK Solver RK Solver E-06 ABM Solver E-06 ABM Solver E-05 ABM Solver E-05 ABM Solver * E-06 Stiff Solver Stiff Solver E-05 tolerances half the defaults on solver (i.e ) tolerances half the defaults on solver and refine (dense output) * max solver step size of 0.01

21 Linear model with ABM limited step-size solver Prices [!=0.2] Employment [!=0.2] Time Time Wages [!=0.2] Phase [!=0.2] Time Employment Wages Prices

22 Non-linear model with ABM limited step-size solver Prices [!=0.2] Employment [!=0.2] Time Time Wages [!=0.2] Phase [!=0.2] Time Employment Wages Prices

23 Comments The standard (default) software solver did not perform well. (Runge-Kutta-Fehlberg). Stiffness does not seem to be the issue. None of the solvers with default parameter settings performed well. Usual practices of reducing tolerances and using dense output also did not perform well. The technique which worked best is the least preferred practice of reducing step-size.

24 Take Home Message Comment We are a team that has extensive software development and model solving experience. We have used best-practice software and best-practice algorithms. We have shown that these can have problems solving a basically trivial model. What about the model solutions we see out there for complex models using simple software? Garbage in garbage out is the old software developers saying.

25 References Herbert, Ric D. and Peter J. Stemp, Solving a non-linear model: the importance of model specification for deriving a suitable solution, Mathematics and Computers in Simulation, 2009, vol. 79, no. 9, pp Stemp, Peter J. and Ric D. Herbert, Solving non-linear models with saddle-path instabilities,computational Economics, 2006, vol. 28, no. 2, pp

Department of Economics. Issn Discussion paper 30/09

Department of Economics. Issn Discussion paper 30/09 Department of Economics Issn 1441-5429 Discussion paper 30/09 Solving Macroeconomic Models with "Off-the-Shelf" Software: An Example of Potential Pitfalls Ric D. Herbert a and Peter J. Stemp b,* Abstract:

More information

Solving a Non-Linear Model: The Importance of Model Specification for Deriving a Suitable Solution

Solving a Non-Linear Model: The Importance of Model Specification for Deriving a Suitable Solution Solving a Non-Linear Model: The Importance of Model Specification for Deriving a Suitable Solution Ric D. Herbert a and Peter J. Stemp b a School of Design, Communication and Information Technology, The

More information

Lecture 3: A dynamic IS-LM model

Lecture 3: A dynamic IS-LM model Lecture 3: A dynamic IS-LM model José L. Torres Universidad de Málaga Advanced Macroeconomics José L. Torres (Universidad de Málaga) Lecture 3: A dynamic IS-LM model Advanced Macroeconomics 1 / 26 Model

More information

Bindel, Fall 2011 Intro to Scientific Computing (CS 3220) Week 12: Monday, Apr 18. HW 7 is posted, and will be due in class on 4/25.

Bindel, Fall 2011 Intro to Scientific Computing (CS 3220) Week 12: Monday, Apr 18. HW 7 is posted, and will be due in class on 4/25. Logistics Week 12: Monday, Apr 18 HW 6 is due at 11:59 tonight. HW 7 is posted, and will be due in class on 4/25. The prelim is graded. An analysis and rubric are on CMS. Problem du jour For implicit methods

More information

Remark on the Sensitivity of Simulated Solutions of the Nonlinear Dynamical System to the Used Numerical Method

Remark on the Sensitivity of Simulated Solutions of the Nonlinear Dynamical System to the Used Numerical Method International Journal of Mathematical Analysis Vol. 9, 2015, no. 55, 2749-2754 HIKARI Ltd, www.m-hikari.com http://dx.doi.org/10.12988/ijma.2015.59236 Remark on the Sensitivity of Simulated Solutions of

More information

CS520: numerical ODEs (Ch.2)

CS520: numerical ODEs (Ch.2) .. CS520: numerical ODEs (Ch.2) Uri Ascher Department of Computer Science University of British Columbia ascher@cs.ubc.ca people.cs.ubc.ca/ ascher/520.html Uri Ascher (UBC) CPSC 520: ODEs (Ch. 2) Fall

More information

Solving a Dynamic (Stochastic) General Equilibrium Model under the Discrete Time Framework

Solving a Dynamic (Stochastic) General Equilibrium Model under the Discrete Time Framework Solving a Dynamic (Stochastic) General Equilibrium Model under the Discrete Time Framework Dongpeng Liu Nanjing University Sept 2016 D. Liu (NJU) Solving D(S)GE 09/16 1 / 63 Introduction Targets of the

More information

Scientific Computing: An Introductory Survey

Scientific Computing: An Introductory Survey Scientific Computing: An Introductory Survey Chapter 9 Initial Value Problems for Ordinary Differential Equations Prof. Michael T. Heath Department of Computer Science University of Illinois at Urbana-Champaign

More information

Math 660 Lecture 4: FDM for evolutionary equations: ODE solvers

Math 660 Lecture 4: FDM for evolutionary equations: ODE solvers Math 660 Lecture 4: FDM for evolutionary equations: ODE solvers Consider the ODE u (t) = f(t, u(t)), u(0) = u 0, where u could be a vector valued function. Any ODE can be reduced to a first order system,

More information

MTH 452/552 Homework 3

MTH 452/552 Homework 3 MTH 452/552 Homework 3 Do either 1 or 2. 1. (40 points) [Use of ode113 and ode45] This problem can be solved by a modifying the m-files odesample.m and odesampletest.m available from the author s webpage.

More information

Lecture Notes to Accompany. Scientific Computing An Introductory Survey. by Michael T. Heath. Chapter 9

Lecture Notes to Accompany. Scientific Computing An Introductory Survey. by Michael T. Heath. Chapter 9 Lecture Notes to Accompany Scientific Computing An Introductory Survey Second Edition by Michael T. Heath Chapter 9 Initial Value Problems for Ordinary Differential Equations Copyright c 2001. Reproduction

More information

Relationships between phases of business cycles in two large open economies

Relationships between phases of business cycles in two large open economies Journal of Regional Development Studies2010 131 Relationships between phases of business cycles in two large open economies Ken-ichi ISHIYAMA 1. Introduction We have observed large increases in trade and

More information

Initial value problems for ordinary differential equations

Initial value problems for ordinary differential equations AMSC/CMSC 660 Scientific Computing I Fall 2008 UNIT 5: Numerical Solution of Ordinary Differential Equations Part 1 Dianne P. O Leary c 2008 The Plan Initial value problems (ivps) for ordinary differential

More information

CS 450 Numerical Analysis. Chapter 9: Initial Value Problems for Ordinary Differential Equations

CS 450 Numerical Analysis. Chapter 9: Initial Value Problems for Ordinary Differential Equations Lecture slides based on the textbook Scientific Computing: An Introductory Survey by Michael T. Heath, copyright c 2018 by the Society for Industrial and Applied Mathematics. http://www.siam.org/books/cl80

More information

NUMERICAL SOLUTION OF ODE IVPs. Overview

NUMERICAL SOLUTION OF ODE IVPs. Overview NUMERICAL SOLUTION OF ODE IVPs 1 Quick review of direction fields Overview 2 A reminder about and 3 Important test: Is the ODE initial value problem? 4 Fundamental concepts: Euler s Method 5 Fundamental

More information

Differential Equations

Differential Equations Differential Equations Overview of differential equation! Initial value problem! Explicit numeric methods! Implicit numeric methods! Modular implementation Physics-based simulation An algorithm that

More information

Scientific Computing with Case Studies SIAM Press, Lecture Notes for Unit V Solution of

Scientific Computing with Case Studies SIAM Press, Lecture Notes for Unit V Solution of Scientific Computing with Case Studies SIAM Press, 2009 http://www.cs.umd.edu/users/oleary/sccswebpage Lecture Notes for Unit V Solution of Differential Equations Part 1 Dianne P. O Leary c 2008 1 The

More information

Astrodynamics (AERO0024)

Astrodynamics (AERO0024) Astrodynamics (AERO0024) 5. Numerical Methods Gaëtan Kerschen Space Structures & Systems Lab (S3L) Why Different Propagators? Analytic propagation: Better understanding of the perturbing forces. Useful

More information

Dynamics of Adaptive Time-Stepping ODE solvers

Dynamics of Adaptive Time-Stepping ODE solvers Dynamics of Adaptive Time-Stepping ODE solvers A.R. Humphries Tony.Humphries@mcgill.ca Joint work with: NICK CHRISTODOULOU PAUL FENTON RATNAM VIGNESWARAN ARH acknowledges support of the Engineering and

More information

EC744 Lecture Notes: Economic Dynamics. Prof. Jianjun Miao

EC744 Lecture Notes: Economic Dynamics. Prof. Jianjun Miao EC744 Lecture Notes: Economic Dynamics Prof. Jianjun Miao 1 Deterministic Dynamic System State vector x t 2 R n State transition function x t = g x 0 ; t; ; x 0 = x 0 ; parameter 2 R p A parametrized dynamic

More information

4 Stability analysis of finite-difference methods for ODEs

4 Stability analysis of finite-difference methods for ODEs MATH 337, by T. Lakoba, University of Vermont 36 4 Stability analysis of finite-difference methods for ODEs 4.1 Consistency, stability, and convergence of a numerical method; Main Theorem In this Lecture

More information

CDS 101 Precourse Phase Plane Analysis and Stability

CDS 101 Precourse Phase Plane Analysis and Stability CDS 101 Precourse Phase Plane Analysis and Stability Melvin Leok Control and Dynamical Systems California Institute of Technology Pasadena, CA, 26 September, 2002. mleok@cds.caltech.edu http://www.cds.caltech.edu/

More information

International Macro Finance

International Macro Finance International Macro Finance Economies as Dynamic Systems Francesco Franco Nova SBE February 21, 2013 Francesco Franco International Macro Finance 1/39 Flashback Mundell-Fleming MF on the whiteboard Francesco

More information

Initial-Value Problems for ODEs. Introduction to Linear Multistep Methods

Initial-Value Problems for ODEs. Introduction to Linear Multistep Methods Initial-Value Problems for ODEs Introduction to Linear Multistep Methods Numerical Analysis (9th Edition) R L Burden & J D Faires Beamer Presentation Slides prepared by John Carroll Dublin City University

More information

Numerical Methods for Differential Equations

Numerical Methods for Differential Equations Numerical Methods for Differential Equations Chapter 2: Runge Kutta and Multistep Methods Gustaf Söderlind Numerical Analysis, Lund University Contents V4.16 1. Runge Kutta methods 2. Embedded RK methods

More information

S#ff ODEs and Systems of ODEs

S#ff ODEs and Systems of ODEs S#ff ODEs and Systems of ODEs Popula#on Growth Modeling Let the number of individuals in a given area at time t be. At time the number is so that is the number of individuals that have arrived in the area

More information

Variable Step Size Differential Equation Solvers

Variable Step Size Differential Equation Solvers Math55: Differential Equations 1/30 Variable Step Size Differential Equation Solvers Jason Brewer and George Little Introduction The purpose of developing numerical methods is to approximate the solution

More information

Deterministic Global Optimization Algorithm and Nonlinear Dynamics

Deterministic Global Optimization Algorithm and Nonlinear Dynamics Deterministic Global Optimization Algorithm and Nonlinear Dynamics C. S. Adjiman and I. Papamichail Centre for Process Systems Engineering Department of Chemical Engineering and Chemical Technology Imperial

More information

Ordinary differential equations - Initial value problems

Ordinary differential equations - Initial value problems Education has produced a vast population able to read but unable to distinguish what is worth reading. G.M. TREVELYAN Chapter 6 Ordinary differential equations - Initial value problems In this chapter

More information

Theoretical premises of the Keynesian approach

Theoretical premises of the Keynesian approach origin of Keynesian approach to Growth can be traced back to an article written after the General Theory (1936) Roy Harrod, An Essay in Dynamic Theory, Economic Journal, 1939 Theoretical premises of the

More information

Math 411 Preliminaries

Math 411 Preliminaries Math 411 Preliminaries Provide a list of preliminary vocabulary and concepts Preliminary Basic Netwon's method, Taylor series expansion (for single and multiple variables), Eigenvalue, Eigenvector, Vector

More information

The Chemical Kinetics Time Step a detailed lecture. Andrew Conley ACOM Division

The Chemical Kinetics Time Step a detailed lecture. Andrew Conley ACOM Division The Chemical Kinetics Time Step a detailed lecture Andrew Conley ACOM Division Simulation Time Step Deep convection Shallow convection Stratiform tend (sedimentation, detrain, cloud fraction, microphysics)

More information

Southern Methodist University.

Southern Methodist University. Title: Continuous extensions Name: Lawrence F. Shampine 1, Laurent O. Jay 2 Affil./Addr. 1: Department of Mathematics Southern Methodist University Dallas, TX 75275 USA Phone: +1 (972) 690-8439 E-mail:

More information

New Keynesian Model Walsh Chapter 8

New Keynesian Model Walsh Chapter 8 New Keynesian Model Walsh Chapter 8 1 General Assumptions Ignore variations in the capital stock There are differentiated goods with Calvo price stickiness Wages are not sticky Monetary policy is a choice

More information

Modeling Basics: 4. Numerical ODE Solving In Excel 5. Solving ODEs in Mathematica

Modeling Basics: 4. Numerical ODE Solving In Excel 5. Solving ODEs in Mathematica Modeling Basics: 4. Numerical ODE Solving In Excel 5. Solving ODEs in Mathematica By Peter Woolf University of Michigan Michigan Chemical Process Dynamics and Controls Open Textbook version 1.0 Creative

More information

Numerical Methods - Initial Value Problems for ODEs

Numerical Methods - Initial Value Problems for ODEs Numerical Methods - Initial Value Problems for ODEs Y. K. Goh Universiti Tunku Abdul Rahman 2013 Y. K. Goh (UTAR) Numerical Methods - Initial Value Problems for ODEs 2013 1 / 43 Outline 1 Initial Value

More information

Solving Ordinary Differential Equations

Solving Ordinary Differential Equations Solving Ordinary Differential Equations Sanzheng Qiao Department of Computing and Software McMaster University March, 2014 Outline 1 Initial Value Problem Euler s Method Runge-Kutta Methods Multistep Methods

More information

Efficient solution of stationary Euler flows with critical points and shocks

Efficient solution of stationary Euler flows with critical points and shocks Efficient solution of stationary Euler flows with critical points and shocks Hans De Sterck Department of Applied Mathematics University of Waterloo 1. Introduction consider stationary solutions of hyperbolic

More information

4.4 Computing π, ln 2 and e

4.4 Computing π, ln 2 and e 252 4.4 Computing π, ln 2 and e The approximations π 3.1415927, ln 2 0.69314718, e 2.7182818 can be obtained by numerical methods applied to the following initial value problems: (1) y = 4, 1 + x2 y(0)

More information

MULTIPOINT BOUNDARY VALUE PROBLEMS FOR ORDINARY DIFFERENTIAL EQUATIONS. Katalin Károlyi Department of Applied Analysis, Eötvös Loránd University

MULTIPOINT BOUNDARY VALUE PROBLEMS FOR ORDINARY DIFFERENTIAL EQUATIONS. Katalin Károlyi Department of Applied Analysis, Eötvös Loránd University MULTIPOINT BOUNDARY VALUE PROBLEMS FOR ORDINARY DIFFERENTIAL EQUATIONS Katalin Károlyi Department of Applied Analysis, Eötvös Loránd University HU-1117 Budapest, Pázmány Péter sétány 1/c. karolyik@cs.elte.hu

More information

Time-varying Consumption Tax, Productive Government Spending, and Aggregate Instability.

Time-varying Consumption Tax, Productive Government Spending, and Aggregate Instability. Time-varying Consumption Tax, Productive Government Spending, and Aggregate Instability. Literature Schmitt-Grohe and Uribe (JPE 1997): Ramsey model with endogenous labor income tax + balanced budget (fiscal)

More information

A modification of Kaldor-Kalecki model and its analysis

A modification of Kaldor-Kalecki model and its analysis A modification of Kaldor-Kalecki model and its analysis 1 Introduction Jan Kodera 1, Jarmila Radová 2, Tran Van Quang 1 Abstract. This paper studies the investment cycle as an endogenous phenomenon using

More information

24, B = 59 24, A = 55

24, B = 59 24, A = 55 Math 128a - Homework 8 - Due May 2 1) Problem 8.4.4 (Page 555) Solution: As discussed in the text, the fourth-order Adams-Bashforth formula is a formula of the type x n+1 = x n + h[af n + Bf n 1 + Cf n

More information

Numerical Algorithms for ODEs/DAEs (Transient Analysis)

Numerical Algorithms for ODEs/DAEs (Transient Analysis) Numerical Algorithms for ODEs/DAEs (Transient Analysis) Slide 1 Solving Differential Equation Systems d q ( x(t)) + f (x(t)) + b(t) = 0 dt DAEs: many types of solutions useful DC steady state: state no

More information

Numerical Methods for the Solution of Differential Equations

Numerical Methods for the Solution of Differential Equations Numerical Methods for the Solution of Differential Equations Markus Grasmair Vienna, winter term 2011 2012 Analytical Solutions of Ordinary Differential Equations 1. Find the general solution of the differential

More information

Physics 115/242 Comparison of methods for integrating the simple harmonic oscillator.

Physics 115/242 Comparison of methods for integrating the simple harmonic oscillator. Physics 115/4 Comparison of methods for integrating the simple harmonic oscillator. Peter Young I. THE SIMPLE HARMONIC OSCILLATOR The energy (sometimes called the Hamiltonian ) of the simple harmonic oscillator

More information

Modeling & Simulation 2018 Lecture 12. Simulations

Modeling & Simulation 2018 Lecture 12. Simulations Modeling & Simulation 2018 Lecture 12. Simulations Claudio Altafini Automatic Control, ISY Linköping University, Sweden Summary of lecture 7-11 1 / 32 Models of complex systems physical interconnections,

More information

News-Shock Subroutine for Prof. Uhlig s Toolkit

News-Shock Subroutine for Prof. Uhlig s Toolkit News-Shock Subroutine for Prof. Uhlig s Toolkit KENGO NUTAHARA Graduate School of Economics, University of Tokyo, and the JSPS Research Fellow ee67003@mail.ecc.u-tokyo.ac.jp Revised: October 23, 2007 (Fisrt

More information

Learning, Expectations, and Endogenous Business Cycles

Learning, Expectations, and Endogenous Business Cycles Learning, Expectations, and Endogenous Business Cycles I.S.E.O. Summer School June 19, 2013 Introduction A simple model Simulations Stability Monetary Policy What s next Who we are Two students writing

More information

CHAPTER 10: Numerical Methods for DAEs

CHAPTER 10: Numerical Methods for DAEs CHAPTER 10: Numerical Methods for DAEs Numerical approaches for the solution of DAEs divide roughly into two classes: 1. direct discretization 2. reformulation (index reduction) plus discretization Direct

More information

MATH 350: Introduction to Computational Mathematics

MATH 350: Introduction to Computational Mathematics MATH 350: Introduction to Computational Mathematics Chapter VII: Numerical Differentiation and Solution of Ordinary Differential Equations Greg Fasshauer Department of Applied Mathematics Illinois Institute

More information

Lecture 4 The Centralized Economy: Extensions

Lecture 4 The Centralized Economy: Extensions Lecture 4 The Centralized Economy: Extensions Leopold von Thadden University of Mainz and ECB (on leave) Advanced Macroeconomics, Winter Term 2013 1 / 36 I Motivation This Lecture considers some applications

More information

Fourth Order RK-Method

Fourth Order RK-Method Fourth Order RK-Method The most commonly used method is Runge-Kutta fourth order method. The fourth order RK-method is y i+1 = y i + 1 6 (k 1 + 2k 2 + 2k 3 + k 4 ), Ordinary Differential Equations (ODE)

More information

Applied Math for Engineers

Applied Math for Engineers Applied Math for Engineers Ming Zhong Lecture 15 March 28, 2018 Ming Zhong (JHU) AMS Spring 2018 1 / 28 Recap Table of Contents 1 Recap 2 Numerical ODEs: Single Step Methods 3 Multistep Methods 4 Method

More information

Using Simulink to analyze 2 degrees of freedom system

Using Simulink to analyze 2 degrees of freedom system Using Simulink to analyze 2 degrees of freedom system Nasser M. Abbasi Spring 29 page compiled on June 29, 25 at 4:2pm Abstract A two degrees of freedom system consisting of two masses connected by springs

More information

MATH2071: LAB 1(b): Using Matlab ODE solvers. This version of the first lab is intended only for students who have already taken Math 2070.

MATH2071: LAB 1(b): Using Matlab ODE solvers. This version of the first lab is intended only for students who have already taken Math 2070. MATH2071: LAB 1(b): Using Matlab ODE solvers 1 Introduction Introduction Exercise 1 Matlab ODE solvers Exercise 2 ODE systems Exercise 3 Goodwin s economic model Exercise 4 Higher Order ODE s Exercise

More information

AM205: Assignment 3 (due 5 PM, October 20)

AM205: Assignment 3 (due 5 PM, October 20) AM25: Assignment 3 (due 5 PM, October 2) For this assignment, first complete problems 1, 2, 3, and 4, and then complete either problem 5 (on theory) or problem 6 (on an application). If you submit answers

More information

Applied Numerical Analysis

Applied Numerical Analysis Applied Numerical Analysis Using MATLAB Second Edition Laurene V. Fausett Texas A&M University-Commerce PEARSON Prentice Hall Upper Saddle River, NJ 07458 Contents Preface xi 1 Foundations 1 1.1 Introductory

More information

Lagrangian Analysis of 2D and 3D Ocean Flows from Eulerian Velocity Data

Lagrangian Analysis of 2D and 3D Ocean Flows from Eulerian Velocity Data Flows from Second-year Ph.D. student, Applied Math and Scientific Computing Project Advisor: Kayo Ide Department of Atmospheric and Oceanic Science Center for Scientific Computation and Mathematical Modeling

More information

2.29 Numerical Fluid Mechanics Fall 2011 Lecture 20

2.29 Numerical Fluid Mechanics Fall 2011 Lecture 20 2.29 Numerical Fluid Mechanics Fall 2011 Lecture 20 REVIEW Lecture 19: Finite Volume Methods Review: Basic elements of a FV scheme and steps to step-up a FV scheme One Dimensional examples d x j x j 1/2

More information

Solving Ordinary Differential equations

Solving Ordinary Differential equations Solving Ordinary Differential equations Taylor methods can be used to build explicit methods with higher order of convergence than Euler s method. The main difficult of these methods is the computation

More information

Graded Project #1. Part 1. Explicit Runge Kutta methods. Goals Differential Equations FMN130 Gustaf Söderlind and Carmen Arévalo

Graded Project #1. Part 1. Explicit Runge Kutta methods. Goals Differential Equations FMN130 Gustaf Söderlind and Carmen Arévalo 2008-11-07 Graded Project #1 Differential Equations FMN130 Gustaf Söderlind and Carmen Arévalo This homework is due to be handed in on Wednesday 12 November 2008 before 13:00 in the post box of the numerical

More information

Solving Linear Rational Expectation Models

Solving Linear Rational Expectation Models Solving Linear Rational Expectation Models Dr. Tai-kuang Ho Associate Professor. Department of Quantitative Finance, National Tsing Hua University, No. 101, Section 2, Kuang-Fu Road, Hsinchu, Taiwan 30013,

More information

Macroeconomics II. Dynamic AD-AS model

Macroeconomics II. Dynamic AD-AS model Macroeconomics II Dynamic AD-AS model Vahagn Jerbashian Ch. 14 from Mankiw (2010) Spring 2018 Where we are heading to We will incorporate dynamics into the standard AD-AS model This will offer another

More information

Dynamic AD-AS model vs. AD-AS model Notes. Dynamic AD-AS model in a few words Notes. Notation to incorporate time-dimension Notes

Dynamic AD-AS model vs. AD-AS model Notes. Dynamic AD-AS model in a few words Notes. Notation to incorporate time-dimension Notes Macroeconomics II Dynamic AD-AS model Vahagn Jerbashian Ch. 14 from Mankiw (2010) Spring 2018 Where we are heading to We will incorporate dynamics into the standard AD-AS model This will offer another

More information

Identification Methods for Structural Systems. Prof. Dr. Eleni Chatzi Lecture March, 2016

Identification Methods for Structural Systems. Prof. Dr. Eleni Chatzi Lecture March, 2016 Prof. Dr. Eleni Chatzi Lecture 4-09. March, 2016 Fundamentals Overview Multiple DOF Systems State-space Formulation Eigenvalue Analysis The Mode Superposition Method The effect of Damping on Structural

More information

The Foley Liquidity / Profit-Rate Cycle Model Reconsidered

The Foley Liquidity / Profit-Rate Cycle Model Reconsidered MPRA Munich Personal RePEc Archive The Foley Liquidity / Profit-Rate Cycle Model Reconsidered Helmar Nunes Moreira and Ricardo Azevedo Araujo and Peter Flaschel Department of Mathematics, University of

More information

Ordinary Differential Equations

Ordinary Differential Equations Ordinary Differential Equations We call Ordinary Differential Equation (ODE) of nth order in the variable x, a relation of the kind: where L is an operator. If it is a linear operator, we call the equation

More information

PowerPoints organized by Dr. Michael R. Gustafson II, Duke University

PowerPoints organized by Dr. Michael R. Gustafson II, Duke University Part 6 Chapter 20 Initial-Value Problems PowerPoints organized by Dr. Michael R. Gustafson II, Duke University All images copyright The McGraw-Hill Companies, Inc. Permission required for reproduction

More information

Y t = log (employment t )

Y t = log (employment t ) Advanced Macroeconomics, Christiano Econ 416 Homework #7 Due: November 21 1. Consider the linearized equilibrium conditions of the New Keynesian model, on the slide, The Equilibrium Conditions in the handout,

More information

Chapter 2 Optimal Control Problem

Chapter 2 Optimal Control Problem Chapter 2 Optimal Control Problem Optimal control of any process can be achieved either in open or closed loop. In the following two chapters we concentrate mainly on the first class. The first chapter

More information

Mathematics Department, UIN Maulana Malik Ibrahim Malang, Malang, Indonesian;

Mathematics Department, UIN Maulana Malik Ibrahim Malang, Malang, Indonesian; P r o c e e d i n g I n t e r n a t i o n a l C o n f e r e n c e, 0 3, *, * * - * * The 4 th Green Technology Faculty of Science and Technology Islamic of University State Maulana Malik Ibrahim Malang

More information

New Notes on the Solow Growth Model

New Notes on the Solow Growth Model New Notes on the Solow Growth Model Roberto Chang September 2009 1 The Model The firstingredientofadynamicmodelisthedescriptionofthetimehorizon. In the original Solow model, time is continuous and the

More information

M. R. Grasselli. QMF, Sydney, December 16, Mathematics and Statistics, McMaster University Joint with Gaël Giraud (AFD, CNRS, ENPC)

M. R. Grasselli. QMF, Sydney, December 16, Mathematics and Statistics, McMaster University Joint with Gaël Giraud (AFD, CNRS, ENPC) Mathematics and Statistics, McMaster University Joint with Gaël Giraud (AFD, CNRS, ENPC) QMF, Sydney, December 16, 2016 The book Opening salvo To put it bluntly, the discipline of economics has yet to

More information

ECE257 Numerical Methods and Scientific Computing. Ordinary Differential Equations

ECE257 Numerical Methods and Scientific Computing. Ordinary Differential Equations ECE257 Numerical Methods and Scientific Computing Ordinary Differential Equations Today s s class: Stiffness Multistep Methods Stiff Equations Stiffness occurs in a problem where two or more independent

More information

Supplementary Notes on Chapter 6 of D. Romer s Advanced Macroeconomics Textbook (4th Edition)

Supplementary Notes on Chapter 6 of D. Romer s Advanced Macroeconomics Textbook (4th Edition) Supplementary Notes on Chapter 6 of D. Romer s Advanced Macroeconomics Textbook (4th Edition) Changsheng Xu & Ming Yi School of Economics, Huazhong University of Science and Technology This version: June

More information

Study guide: Generalizations of exponential decay models

Study guide: Generalizations of exponential decay models Study guide: Generalizations of exponential decay models Hans Petter Langtangen 1,2 Center for Biomedical Computing, Simula Research Laboratory 1 Department of Informatics, University of Oslo 2 Sep 13,

More information

Study guide: Generalizations of exponential decay models. Extension to a variable coecient; Crank-Nicolson

Study guide: Generalizations of exponential decay models. Extension to a variable coecient; Crank-Nicolson Extension to a variable coecient; Forward and Backward Euler Study guide: Generalizations of exponential decay models Hans Petter Langtangen 1,2 Center for Biomedical Computing, Simula Research Laboratory

More information

Key Concepts: Economic Computation, Part III

Key Concepts: Economic Computation, Part III Key Concepts: Economic Computation, Part III Brent Hickman Summer, 8 1 Using Newton s Method to Find Roots of Real- Valued Functions The intuition behind Newton s method is that finding zeros of non-linear

More information

Differential Equations FMNN10 Graded Project #1 c G Söderlind 2017

Differential Equations FMNN10 Graded Project #1 c G Söderlind 2017 Differential Equations FMNN10 Graded Project #1 c G Söderlind 2017 Published 2017-10-30. Instruction in computer lab 2017-11-02/08/09. Project report due date: Monday 2017-11-13 at 10:00. Goals. The goal

More information

The family of Runge Kutta methods with two intermediate evaluations is defined by

The family of Runge Kutta methods with two intermediate evaluations is defined by AM 205: lecture 13 Last time: Numerical solution of ordinary differential equations Today: Additional ODE methods, boundary value problems Thursday s lecture will be given by Thomas Fai Assignment 3 will

More information

Topic 2. Consumption/Saving and Productivity shocks

Topic 2. Consumption/Saving and Productivity shocks 14.452. Topic 2. Consumption/Saving and Productivity shocks Olivier Blanchard April 2006 Nr. 1 1. What starting point? Want to start with a model with at least two ingredients: Shocks, so uncertainty.

More information

A Discussion of Arouba, Cuba-Borda and Schorfheide: Macroeconomic Dynamics Near the ZLB: A Tale of Two Countries"

A Discussion of Arouba, Cuba-Borda and Schorfheide: Macroeconomic Dynamics Near the ZLB: A Tale of Two Countries A Discussion of Arouba, Cuba-Borda and Schorfheide: Macroeconomic Dynamics Near the ZLB: A Tale of Two Countries" Morten O. Ravn, University College London, Centre for Macroeconomics and CEPR M.O. Ravn

More information

AM 205 Final Project The N-Body Problem

AM 205 Final Project The N-Body Problem AM 205 Final Project The N-Body Problem Leah Birch Elizabeth Finn Karen Yu December 14, 2012 Abstract The N-Body Problem can be solved using a variety of numeric integrators. Newton s Law of Universal

More information

Control Systems I. Lecture 2: Modeling. Suggested Readings: Åström & Murray Ch. 2-3, Guzzella Ch Emilio Frazzoli

Control Systems I. Lecture 2: Modeling. Suggested Readings: Åström & Murray Ch. 2-3, Guzzella Ch Emilio Frazzoli Control Systems I Lecture 2: Modeling Suggested Readings: Åström & Murray Ch. 2-3, Guzzella Ch. 2-3 Emilio Frazzoli Institute for Dynamic Systems and Control D-MAVT ETH Zürich September 29, 2017 E. Frazzoli

More information

Appendix 3B MATLAB Functions for Modeling and Time-domain analysis

Appendix 3B MATLAB Functions for Modeling and Time-domain analysis Appendix 3B MATLAB Functions for Modeling and Time-domain analysis MATLAB control system Toolbox contain the following functions for the time-domain response step impulse initial lsim gensig damp ltiview

More information

x n+1 = x n f(x n) f (x n ), n 0.

x n+1 = x n f(x n) f (x n ), n 0. 1. Nonlinear Equations Given scalar equation, f(x) = 0, (a) Describe I) Newtons Method, II) Secant Method for approximating the solution. (b) State sufficient conditions for Newton and Secant to converge.

More information

slides chapter 3 an open economy with capital

slides chapter 3 an open economy with capital slides chapter 3 an open economy with capital Princeton University Press, 2017 Motivation In this chaper we introduce production and physical capital accumulation. Doing so will allow us to address two

More information

Graduate Macro Theory II: Notes on Solving Linearized Rational Expectations Models

Graduate Macro Theory II: Notes on Solving Linearized Rational Expectations Models Graduate Macro Theory II: Notes on Solving Linearized Rational Expectations Models Eric Sims University of Notre Dame Spring 2017 1 Introduction The solution of many discrete time dynamic economic models

More information

Economics 701 Advanced Macroeconomics I Project 1 Professor Sanjay Chugh Fall 2011

Economics 701 Advanced Macroeconomics I Project 1 Professor Sanjay Chugh Fall 2011 Department of Economics University of Maryland Economics 701 Advanced Macroeconomics I Project 1 Professor Sanjay Chugh Fall 2011 Objective As a stepping stone to learning how to work with and computationally

More information

Lecture 2 The Centralized Economy

Lecture 2 The Centralized Economy Lecture 2 The Centralized Economy Economics 5118 Macroeconomic Theory Kam Yu Winter 2013 Outline 1 Introduction 2 The Basic DGE Closed Economy 3 Golden Rule Solution 4 Optimal Solution The Euler Equation

More information

Transitional Dynamics in an Endogenous Growth Model with Physical Capital, Human Capital and R&D (with Spillovers)

Transitional Dynamics in an Endogenous Growth Model with Physical Capital, Human Capital and R&D (with Spillovers) Transitional Dynamics in an Endogenous Growth Model with Physical Capital, Human Capital and R&D (with Spillovers) Tiago Neves Sequeira Abstract The dynamics of the most prominent growth models are well

More information

Notes for Numerical Analysis Math 5466 by S. Adjerid Virginia Polytechnic Institute and State University (A Rough Draft) Contents Numerical Methods for ODEs 5. Introduction............................

More information

Numerical Methods for ODEs. Lectures for PSU Summer Programs Xiantao Li

Numerical Methods for ODEs. Lectures for PSU Summer Programs Xiantao Li Numerical Methods for ODEs Lectures for PSU Summer Programs Xiantao Li Outline Introduction Some Challenges Numerical methods for ODEs Stiff ODEs Accuracy Constrained dynamics Stability Coarse-graining

More information

Chapter 12 Ramsey Cass Koopmans model

Chapter 12 Ramsey Cass Koopmans model Chapter 12 Ramsey Cass Koopmans model O. Afonso, P. B. Vasconcelos Computational Economics: a concise introduction O. Afonso, P. B. Vasconcelos Computational Economics 1 / 33 Overview 1 Introduction 2

More information

Lyapunov Stability Theory

Lyapunov Stability Theory Lyapunov Stability Theory Peter Al Hokayem and Eduardo Gallestey March 16, 2015 1 Introduction In this lecture we consider the stability of equilibrium points of autonomous nonlinear systems, both in continuous

More information

Module 6 : Solving Ordinary Differential Equations - Initial Value Problems (ODE-IVPs) Section 3 : Analytical Solutions of Linear ODE-IVPs

Module 6 : Solving Ordinary Differential Equations - Initial Value Problems (ODE-IVPs) Section 3 : Analytical Solutions of Linear ODE-IVPs Module 6 : Solving Ordinary Differential Equations - Initial Value Problems (ODE-IVPs) Section 3 : Analytical Solutions of Linear ODE-IVPs 3 Analytical Solutions of Linear ODE-IVPs Before developing numerical

More information

Initial value problems for ordinary differential equations

Initial value problems for ordinary differential equations Initial value problems for ordinary differential equations Xiaojing Ye, Math & Stat, Georgia State University Spring 2019 Numerical Analysis II Xiaojing Ye, Math & Stat, Georgia State University 1 IVP

More information

Problem set 7 Math 207A, Fall 2011 Solutions

Problem set 7 Math 207A, Fall 2011 Solutions Problem set 7 Math 207A, Fall 2011 s 1. Classify the equilibrium (x, y) = (0, 0) of the system x t = x, y t = y + x 2. Is the equilibrium hyperbolic? Find an equation for the trajectories in (x, y)- phase

More information