In Exercises 1521, prove that the program segment is correct by finding and proving the appropriate loop invariant Q and evaluating Q at loop termination.

Minimum and maximum values Let c be a number in the domain of f. f(c) is a local max if f(c) ≥ f(x) when x is near c. f(c) is a local min if f(c) ≤ f(x) when x is near c Fermat’s Theorem: If f has a local max or min at c, and if f’(c) exists, then f’(c)’=0 Be careful: The converse of this theorem is not always true. Consider f(x) = x^3 f’(x) = 3x^2 f’(0) = 3*0^2 =0 However...