Exercise 1 — implement the forward-difference
approximation to a derivative at a single point.
Exercise 2 — implement the centred-difference
approximation at the same point.
Exercise 3 — repeat both formulas over an array of
shrinking step sizes \(h\), producing
the error-vs-\(h\) log-log plot.
Written answer — a required Markdown cell (marked
“Double-click this cell and write…”) asking you to read the slopes off
the log-log plot and explain what they mean for convergence order.
There’s also an Extension: push \(h\) down to \(10^{-14}\) and explain, in a sentence or
two, why the error stops shrinking and eventually grows again.
Run every code cell and fill in every required Markdown cell, then
submit this notebook as a .ipynb file on
Moodle — the notebook itself, with your code, output, and written
answers, is the whole submission.