I’m teaching a course on multivariable calculus at Reykjavik University, in Iceland, with a slight twist. The students turn in four problem sets over the semester, each one containing four problems. Most of the problems utilize MatLab for either vizualization or for the solution. Here’s an example.
Problem. Part A. Given a function of two variables write a MatLab function that can make a rudimentary test for local maxima, minima and saddle points in the following way: The input should be a function
, a point
, a real number
, and a natural number
. What the MatLab function should do is randomly select
points
on a circle (in the
-plane) of radius
and center
; calculate the directional derivatives along the vectors
. The output should be:
- “The function has a local maximum at
.” if all the directional derivatives are negative.
- “The function has a local minimum at
.” if all the directional derivatives are positive.
- “The function has a saddle point at
.” if the directional derivatives are both positve and negative.
Part B. Give an example of a function with the property that: It accurately detects a local maximum or minimum at a point for
but fails to detect it if $\epsilon > 1$.
I haven’t assigned this problem yet but am very excited to see the results. I think this problem should give the students a good feeling for what local maxima, minima and saddle points “look like”.