सभी नोट्स

Optimisation: maxima, minima and gradient methods

गेट DA160 मिनट में पढ़ें

मुफ़्त प्रीव्यू: नोट का 27%

Critical points and how to classify them

Definitions.

  • ff has a local maximum at cc if f(c)≥f(x)f(c) \ge f(x) for all xx near cc. A global maximum if this holds for all xx in the domain. Minima are defined the same way.
  • A critical point is a cc where f′(c)=0f'(c) = 0 or f′(c)f'(c) does not exist.

Fermat's theorem. At an interior local extremum where ff is differentiable, f′(c)=0f'(c) = 0. The converse is false: x3x^3 has f′(0)=0f'(0) = 0 but no extremum there.

First-derivative test. If f′f' changes sign from ++ to −- at cc, there is a local maximum. From −- to ++, a local minimum. If there is no sign change, there is no extremum.

Second-derivative test. At f′(c)=0f'(c) = 0:

  • f′′(c)>0f''(c) > 0 means a minimum;
  • f′′(c)<0f''(c) < 0 means a maximum;
  • f′′(c)=0f''(c) = 0 means the test says nothing.

Higher-order test. Let the first non-zero derivative at cc be f(n)(c)f^{(n)}(c).

  • If nn is even, there is an extremum: a minimum if f(n)(c)>0f^{(n)}(c) > 0, a maximum if it is negative.
  • If nn is odd, there is no extremum. The point is a point of inflection.

Example 1.

  • x4x^4 at 0: the first non-zero derivative is the fourth, equal to 24>024 > 0. Minimum.
  • x3x^3 at 0: the first non-zero derivative is the third. No extremum.
  • x5−5xx^5 - 5x: f′=5x4−5=0f' = 5x^4 - 5 = 0 at x=±1x = \pm 1, and f′′=20x3f'' = 20x^3. So x=1x = 1 is a minimum, with f=−4f = -4, and x=−1x = -1 is a maximum, with f=4f = 4.

Points where f′f' does not exist can also be extrema. ∣x∣\lvert x\rvert has its minimum at the corner x=0x = 0.

Global extrema on a closed interval

By the extreme value theorem, a continuous function on [a,b][a, b] has a global maximum and minimum. Method: evaluate ff at every critical point inside (a,b)(a, b) and at both endpoints, then compare.

Example 2. f(x)=x3−3x2f(x) = x^3 - 3x^2 on [−1,4][-1, 4].

  1. f′=3x2−6x=3x(x−2)f' = 3x^2 - 6x = 3x(x - 2), so the critical points are 0 and 2.
  2. The values are f(−1)=−4f(-1) = -4, f(0)=0f(0) = 0, f(2)=8−12=−4f(2) = 8 - 12 = -4 and f(4)=64−48=16f(4) = 64 - 48 = 16.
  3. The global maximum is 16, at x=4x = 4 (an endpoint). The global minimum is −4-4, reached at both x=−1x = -1 and x=2x = 2.

Note that the local maximum at 0 is not the global maximum.

Example 3. f(x)=x+1xf(x) = x + \frac1x on [12,3][\frac12, 3].

  1. f′=1−1x2=0f' = 1 - \frac1{x^2} = 0 at x=1x = 1.
  2. The values are f(12)=2.5f(\frac12) = 2.5, f(1)=2f(1) = 2 and f(3)=3.3‾f(3) = 3.\overline{3}.
  3. The minimum is 2 and the maximum is 103\frac{10}{3}.

Convexity

Definition. ff is convex on an interval if the chord between any two points of its graph lies above the graph:

f(λx+(1−λ)y)≤λf(x)+(1−λ)f(y)for 0≤λ≤1.f(\lambda x + (1 - \lambda)y) \le \lambda f(x) + (1 - \lambda)f(y) \quad \text{for } 0 \le \lambda \le 1.

For twice-differentiable ff, this is the same as f′′≥0f'' \ge 0. ff is concave if −f-f is convex.

Why convexity matters. For a convex function, every local minimum is a global minimum. If f′′>0f'' > 0, the minimum is unique. Least squares, ridge regression and logistic regression all have convex losses. Neural network losses do not.

आपने इस नोट का मुफ़्त 27% हिस्सा पढ़ लिया

आगे पढ़ने के लिए Google से साइन इन करें। यह मुफ़्त है, एक टैप में होता है, और साथ में मिलता है:

  • इस नोट से 7 अभ्यास सवाल
  • हर नोट पूरा, साथ में PDF लाइब्रेरी
  • आधिकारिक पिछले पेपर समय-सीमा वाले टेस्ट की तरह, व्याख्या के साथ
  • डाउट के लिए AI ट्यूटर, हिंदी या अंग्रेज़ी में
  • आपकी प्रगति, गलतियाँ और स्टडी प्लान हर डिवाइस पर सेव
आगे पढ़ें, मुफ़्त