Week 5
Week 5 – Solving Nonlinear Equations in Economics
Learning Outcomes By the end of this week, students will be able to:
- Understand the difference between analytical and numerical solutions.
- Implement root-finding algorithms (bisection, Newton–Raphson) in MATLAB.
- Apply numerical methods to economic equilibrium problems.
- Check for convergence and interpret stopping criteria.
- Compare performance of different root-finding approaches.
Suggested Readings
- Greenwood & Marto, Numerical Methods for Macroeconomists, Ch. 2 (Nonlinear equations).
In-Class Activities
- Implement the bisection method.
- Implement Newton–Raphson method, including derivative calculation.
- Compare number of iterations required for each method.
- Apply root-finding to a labor–leisure choice problem:
- Solve for optimal labor supply given parameters.
Homework / Practice
- Solve a non-linear IS–LM equilibrium problem.
- Study the labor–leisure choice problem with varying preferences.
- Write a function that implements both bisection and Newton–Raphson methods.
- Run both methods:
- Record number of iterations.
- Compare solutions and discuss convergence differences.
- Study the comparative statics of the labor–leisure choice problem.
Files
- Slides Week 5 – Slides from lecture.
- week5.m – Example script from lecture.
- codes_week5 on Matlab online
- week5_newton_frames.m – Figure showing the convergence of the Newton–Raphson method.
- week5_bisection_plot.m – Figure showing the convergence of the bisection method.
- week5_newton_damping_comparison.m – Figure showing the comparison of the Newton–Raphson method with different damping factors.
- week5_challenge_starter.m – Starter file for the challenge.
Homework submission
- Submit your homework here
- Please upload your homework as a single zip file. Access it’s now open with any email address! But remember to name your file with your full name and or student ID.
- The submission should include the .m file used to produce the results.
- You can modify you submission until the beginning of week 6.