Finding minima of functions - Your turn

Finding minima of functions - Your turn#

Consider the following function of two variables: \(f(x,y) = (x - 3)^2 + (y + 1)^2\)

Part (a)#

Analytically find the minimum of this function.

TODO: Write your answer below#

Part (b)#

Plot the function on a suitably chosen domain to clearly see the minimum. Add a colorbar and labels.

# TODO: Write your solution below

Part (c)#

Using fmin(), locate the minimum numerically.

# TODO: Write your solution below

Exporting your work#

When you’re ready, the easiest way to export the notebook is to File > Print it and save it as a PDF. Remove any excessively long, unrelated outputs first by clicking the arrow → next to the output box and then Show/hide output. Obviously don’t obscure any necessary output or graphs!