Euler's Method in Microsoft Excel

Euler's method is a numerical technique for solving ordinary differential equations. Below is an example problem in Excel that demonstrates how to solve a dynamic equation and fit unknown parameters.

Homework Help

Additional Material

This same example problem is also demonstrated with MATLAB and in the Python programming language. Another example problem demonstrates how to calculate the concentration of CO gas buildup in a room.


Generative AI Learning

Use these prompts to test your understanding after completing the tutorial. Direct the AI - build the Euler table yourself; use it to probe step size and stability.

"Quiz me with 5 questions, one at a time, on Euler's method in a spreadsheet: what the update row y_new = y_old + dt*dydt computes and why it is only approximate, what happens to the error when the step size dt is cut in half, how to check a numerical solution against an exact analytic solution when one exists, what instability looks like in the spreadsheet when dt is too large (for dy/dt = -a*y, oscillation and blow-up when dt > 2/a), and why fitting model parameters to data requires re-running the whole Euler table each time a parameter changes. Grade my answers and list my misconceptions."
"I solved dy/dt = -a*y with Euler's method in a spreadsheet. Before I experiment: ask me to predict what the columns will look like for dt well below 1/a, near 2/a, and above 2/a, and to predict how the error at a fixed time changes when I halve dt. After I commit, tell me what the analysis says (first-order accuracy, stability limit) and give me a 3-line derivation of the dt > 2/a blow-up to check by hand."

Modern example: The CO-buildup case study is a room air balance; the identical equation runs a data-center cooling calculation: m*cp*dT/dt = Q_servers - U*A*(T - T_cool). A server hall that loses cooling is a first-order rise toward a dangerous steady state - Euler's method in a worksheet answers "how many minutes until 40 degC?" with nothing but the update row you learned here.

What to Turn In

Submit a short report (PDF, 1-2 pages) with your homework that curates your results into a demonstration of what you learned. You may use Generative AI to help write the report, but you must guide it to the correct visualizations, justifications, and assumptions. Answer these questions:

  1. Include your Euler solution plot together with the exact solution for a problem where one exists (for example dy/dt = -a*y, exact y = y0*exp(-a*t)). Report the error at one chosen time for two step sizes, and show the error roughly halves when dt halves.
  2. Show what happens for a step size beyond the stability limit (screenshot of the oscillating/growing column). Where did the blow-up begin and why?
  3. For the parameter-fitting exercise: report the fitted parameter values, the objective (sum of squared error) before and after fitting, and the plot of model vs data.
  4. From the prediction prompt: which of your three predictions was wrong, and what is the corrected understanding?

Course Information

Excel and VBA

Python

MATLAB

MathCAD

Related Courses

Admin