top of page

Continuous Time Dynamic Math for Economists

This page started with my own notes and developed into a version I can eventually offer as a Master's level course or a specialty PhD course.  Since I'm at an undergraduate teaching-oriented university, during the school year I often do less theoretical work. Then whenever I return to certain research topics, I have to refresh my memory on integrals, differential equations and some key elements in optimization.  So I started collecting that material.  I realized that there is an intuitive path through this material that I think would be the best way for people to learn it anyway, at least its the logical path through my thinking.  Essentially it runs like this: you need to know basic integration, then treat differential equations as an application. Once you get that far, you can focus on the intuition behind differential equations, but you need some key details. For example, if you understand quadratic equations and "finding the roots" of an equation, it's very obvious why you might want to find roots of differential equations. Then it's clear why you might focus on roots in systems of differential equations.  Once you understand solving systems, you realize that it all turns on the coefficient matrix (the "A" matrix) and you can take whatever collection of equations you are working on and use the same basic techniques over and over. Having that consistent process helps you keep clear in your head where you are in the problem and where you need to go.  Finally, you're ready to solve optimization problems.  I always have Grad Students in mind. I wish I'd found a page like this when I was in Grad School.

Notes and disclaimers:

  • Currently these notes are handwritten. I plan to slowly put them into LaTex and PDF with a bit more explanation.

  • My aim everywhere is "getting to solving" things.  I too plan to use this page as a resource when I forget stuff. I want to quickly look it up, see an example or walkthrough, then get back to work using that material.

  • The math required is: multivariate calculus, integration, and some basic linear algebra.

  • I draw heavily on a few sources and I encourage any PhD economics student to buy these.

    • Feguson and Lim - ""  This is a great and simple resource. They do an amazing job explaining this material.  And they go all the way to continuous time stochastic models.  This is accessible to Masters students and early-stage PhDs.

    • Turnovsky - This is a PhD level book and pretty dense.  I found that with the material I show here (Integration then basic Diff Eqs) you can access all the material.

    • Schaum's Outline - This is accessible to undergrads. I taught myself a lot of the math I know from this book between my undergraduate and graduate studies.  It's not enough, but I find it an amazing, quick reference.

Integration

  • Every time I work in this area I personally have to refresh my basic integration techniques.  So I collected here some key rules we use in economics and then some applications for practice.

  • 01 Integration Review (handwritten download)

    • Basic Rules

    • L'Hopital's Rule

    • Leibnitz's Rule

    • Partial Integration

      • Exact Differential Equations​

      • Integrating Factors​

  • 02 Integration Application: Probabilities (download)​

 

Differential Equations Part I: Solving the Equations

  • I try to show these as an application from Integration.  My focus is on solving differential equations.  I ignore the complex cases and focus on getting you to solving them.  Then I hope to provide some better understanding and intuition.

  • 03 Differential Equation Basics (download)

    • Jumping in with direct solutions and steps to solving

    • General Solutions and Exact Differential Equations (nearly identical to the material covered under integrals but I wanted diff eqns all in one place so I added it here too).

    • Brute Force (just apply the general solution and work through it)

    • Separation of Variables: Proportional Growth example (probably most common basic Econ application of diff equations)

    • Steps to Solving First Order Diff Equations: 1) rewrite, 2) integrating factor, 3) multiply through and integrate, 4) rearrange and solve

    • Bernoulli Equations (shows up in Solow growth models already)

  • 04 Differential Equations Application: Term Structure of Interest Rates (download)
    • Diff Eqn Application: Government Budget Constraints and Sustainability (download)​
    • Diff Eqn Application: Rep Individual Constraint (download)​

Differential Equations Part II: Intuition and Building up to Systems

  • When I first learned to solve for the characteristic roots (also called "eigenvalues") and such, I just did it and didn't care why.  But later (actually when working through Ferguson and Lim), I understood why I cared.  But math isn't all compartmentalized like we teach it.  So I start with why and when we use the quadratic equation to solve for the roots of a quadratic equation and build the intuition from there. I can't wait to teach this material and see if that insight helps students advance to eigenvalues and eigenvectors for systems.  I hope so.

  • 05 Characteristic Equations, Roots and Solving Systems (download)

    • Refresh on roots and quadratic equations​

    • Roots and basic differential equations

    • Example: Dynamic Supply and Demand Model

    • Stability

    • The Discriminant

 

Solving Systems of Differential Equations

  • I try to emphasize that you just need to understand the "A" matrix and why.  What you slowly realize over time is that people aren't usually re-solving everything every time they solve a new problem.  Most people force their problems into a specific form or arrangement that matches a problem they know how to solve.  So, if you learn what to do with a generic A matrix, then you learned 100% of what you need.  Now when you hit a problem, rewrite your problem to fit this structure and you know what to do.

  • 06 Solving Differential Equations Systems with Matrices (download)

    • Overview

    • The A Matrix, Eigenvalues and Eigenvectors

    • Making Eigenvectors unique with normalizations

    • Solving for constants with initial values

      • solving a small system by hand"​

      • solving the same system with Cramer's Rule which helps if the system is larger

  • 07 Solving Differential Equation Systems with Matrices more Generally (download)

Saddlepaths and Stable Branches and Solving Everything for Phase Diagrams

  • This is the key to solving dynamic macroeconomic models in continuous time. Period. Whether you draw a phase diagram in the end or simulate your model (which I don't do here), this section shows you how to understand and solve for everything.  It shows how to do announced/anticipated cases in perfect foresight models and solve for every piece of the model.  I follow Turnovsky (2000) really closely here. He just has a nice approach he uses over and over that convinced me it's a great way to think of things.

  • 08 Saddlepaths and Stable Branches (download)

    • Restructuring your system to get the "A" matrix you want

    • Deviations from steady state
    • Anticipated future shocks: initial jumps, time paths and final convergence.
    • Review and connecting the math to phase diagrams
  • 09 Saddlepaths Application: Cagan Money Model with Sluggish Wage Adjustment (download)
  • 10 Saddlepaths and Stable Branches Deeper Dive: photocopy from Turnovsky textbook for now (download)​

Appendices to Differential Equation Section (not finished)

  • Linear Homogeneity and Normality Conditions that often help sign things: (download)

  • Example with a Ramsey Model (from Carlos Vegh's textbook)

  • Complex roots, repeating roots
  • Fourier Transforms to solve differential equations

Dynamic Optimization

  • Optimal Control Lagrangians, Hamiltonians and All That (download)

 

Stochastic Calculus

  • Basics and Introduction (download)

  • John Cochrane's page for Asset Pricing.  He covers Stochastic Calculus at the beginning of his course and you can find both videos and PDF notes.  I highly recommend the videos and the notes.  They really are the best Stochastic Calculus notes I've found. It's from these that I finally understood the stochastic integral only in 2020!! and it's super simple!

 

Continuous Time Stochastic Optimization

  • Stochastic Optimal Control Basics (download)

  • Stochastic Optimal Control Solutions (download)

  • Stochastic Optimal Control with Poisson and General Ito (download)

  • More complicated material (currently copies from Turnovsky, 2000)

    • Stochastic Calculus and Optimization (download)​

    • Stoch Calc Application: Model Part 1 (download)

    • Stoch Calc Application: Model Part 2 (download)

 

Simulation Methods (not finished)

  • Excel and Euler Approximations (based heavily on Shone)

  • Solving and approximating differential equations in R and Matlab (anyone who wants to convert my code to python is invited!)

  • Discretize your model and use Dynare.

Gilbert Strang and Dr. Cleve Moler (MATLAB) "Learn Differential Equations: Up Close"  (click here), MIT OpenCourseware, 2015

There are a lot here, but each are relatively short, about 15 minutes each.

  • INTRODUCTION

  • FIRST ORDER EQUATIONS

    • Response to Exponential Input​

    • Response to Oscillating Input

    • Solution for Any Input

    • Step Function and Delta Function

    • Response to Complex Exponential

    • Integrating Factor for Constant Rate

    • Integrating Factor for a Varying Rate

    • The Logistic Equation

    • The Stability and Instability of Steady States

    • Separable Equations

  • SECOND ORDER EQUATIONS

    • Second Order Equations​

    • Forced Harmonic Motion

    • Unforced Damped Motion

    • Impulse Response and Step Response

    • Exponential Response – Possible Resonance

    • Second Order Equations with Damping

    • Electrical Networks: Voltages and Currents

    • Method of Undetermined Coefficients

    • An Example of Undetermined Coefficients

    • Variation of Parameters

    • Laplace Transform: First Order Equation

    • Laplace Transform: Second Order Equation

    • Laplace Transforms and Convolution

  • GRAPHICAL AND NUMERICAL METHODS​

    • Pictures of Solutions​

    • Phase Plane Pictures: Source, Sink, Saddle

    • Phase Plane Pictures: Spirals and Centers

    • Two First Order Equations: Stability

    • Linearization at Critical Points

    • Linearization of two nonlinear equations

    • Eigenvalues and Stability: 2 by 2 Matrix, A

    • The Tumbling Box in 3-D

  • VECTOR SPACES AND SUBSPACES​

    • The Column Space of a Matrix​

    • Independence, Basis, and Dimension

    • The Big Picture of Linear Algebra

    • Graphs

    • Incidence Matrices of Graphs

  • EIGENVALUES AND EIGENVECTORS​

    • Eigenvalues and Eigenvectors​

    • Diagonalizing a Matrix

    • Powers of Matrices and Markov Matrices

    • Solving Linear Systems

    • The Matrix Exponential

    • Similar Matrices

    • Symmetric Matrices, Real Eigenvalues, Orthogonal Eigenvectors

    • Second Order Systems

  • APPLIED MATHEMATICS AND ATA​

    • Positive Definite Matrices​

    • Singular Value Decomposition (the SVD)

    • Boundary Conditions Replace Initial Conditions

    • Laplace Equation

  • FOURIER AND LAPLACE TRANSFORMS​

    • Fourier Series​

    • Examples of Fourier Series

    • Fourier Series Solution of Laplace's Equation

    • Heat Equation

    • Wave Equation

Prof Gilbert Strang's 2008 MIT Courseware Course MIT 18.085 Computational Science and Engineering: click here

bottom of page