- If \(f(x)=2(x-3)^2+8\), then
the vertex is \((3,8)\), the global minimizer is \(3\), the global minimum is \(8\). - If \(f(x)=x^3-3x^2+4\), then
\(f'(x)=3x^2-6x=3x(x-2)\) and the critical points are \((0,4), (2,0)\). - If \(f(x)=7x^5-35x+4\), then
\(f'(x)=35x^4-35=35(x^2+1)(x-1)(x+1)\) critical points are \((-1,0), (1,32)\). - If \(f(x)=\frac{2x}{x^2+1}\), then
\(f'(x)=\frac{2(1-x)(1+x)}{(1+x^2)^2}\) the critical points are \((-1,-1), (1,1)\). - If \(f(x)=4x^5-\frac{20}{3}x^3+4\), then
\(f'(x)=20x^4-20x^2=20(x^2)(x-1)(x+1)\) critical points are \((-1,\frac{20}{3}), (1,\frac{4}{3})\). - If \(f(x)=\frac{(x^2-1)}{(x-2)}\), then
\(f'(x)=\frac{(x^2-4x+1)}{(x-2)^2}\), critical points are \((-1,\frac{20}{3}), (1,\frac{4}{3})\). - If \(f(x)=\mathrm{e}^{\sin\left(x^2+1\right)}\), then
\(f'(x)=2x\mathrm{e}^{\sin\left(x^2+1\right)}\cos\left(x^2+1\right)\) , \(f''(x)=-2\mathrm{e}^{\sin\left(x^2+1\right)}\cdot\left(2x^2\sin\left(x^2+1\right)-2x^2\cos^2\left(x^2+1\right)-\cos\left(x^2+1\right)\right)\), critical points are \((0,e^{\sin(1)}), (\pm\sqrt{(2n-1)\frac{\pi}{2}-1} )\) where \(n=1,2,\dots\). - If \(f(x)=3x^4-4x^3+1\), then
\(f'(x)=12x^3-12x^2=12x^2(x-1)\) , \(f''(x)=36x^2-24x=12x(3x-2)\), critical points are \((0,1), (1,0)\). - If \(f''(x)\ge 0\) for all \(x \in X\), \(x^*\) is a global minimizer
- If \(f''(x)> 0\) for all \(x \in X\), \(x^*\) is a strict global minimizer
- If \(f''(x^*)> 0\), \(x^*\) is a strict local minimizer
A minimizer or a maximizer refer to a point in the domain of a function where the function achieves its minimum or maximum value. More formally, let \(f: X → \mathbb R\) be a real-valued function defined on a set \(X \subset \mathbb R\).
정의 1 \(f(x^*)\) with a point \(x^* \in X\) is called a minimum if \(f(x^*) \le f(x)\) for all \(x \in X\). \[ \min_{x\in X}{f(x)} \] , which means a minimum, \(f(x)\).
정의 2 \(f(x^*)\) with a point \(x^* \in X\) is called a maximum if \(f(x^*) \ge f(x)\) for all \(x \in X\). \[ \max_{x\in X}{f(x)} \] , which means a maximum, \(f(x)\).
정의 3 A point \(x^* \in X\) is called a minimizer of \(f\) if \(f(x^*) \le f(x)\) for all \(x \in X\). \[ \arg\min_{x\in X}{f(x)} \] , which means \(x\) that mainimizes \(f(x)\).
정의 4 A point \(x^* \in X\) is called a maximizer of \(f\) if \(f(x^*) \ge f(x)\) for all \(x \in X\). \[ \arg\max_{x\in X}{f(x)} \] , which means \(x\) that maximizes \(f(x)\).
정의 5 A point \(x^* \in X\) is called a global minimizer of \(f\) if \(f(x^*) \le f(x)\) for all \(x \in \mathbb R\). \[ \arg\min_{x\in \mathbb R}{f(x)} \] , which means \(x\) that minimizes \(f(x)\).
정의 6 A point \(x^* \in X\) is called a global maximizer of \(f\) if \(f(x^*) \ge f(x)\) for all \(x \in \mathbb R\). \[ \arg\max_{x\in \mathbb R}{f(x)} \] , which means \(x\) that maximizes \(f(x)\).
정의 7 A point \(x^* \in X\) is called a strict global maximizer of \(f\)
if \(f(x^*) > f(x)\) for all \(x \in \mathbb R\).
정의 8 A point \(x^* \in X\) is called a strict global miniimizer of \(f\)
if \(f(x^*) < f(x)\) for all \(x \in \mathbb R\).
정의 9 Let \(f: X \to \mathbb{R}\) be a real-valued function defined on a domain \(X \subseteq \mathbb{R}\), and let \(x^* \in X\) be a point in \(X\). We say that \(x^*\) is a local minimizer of \(f(x)\) if there exists a radius \(\delta>0\) of a neighborhood \(N(x^*)\) of \(x^*\) or \(|x-x^*|<\delta\) such that \(f(x^*) \leq f(x)\) for all \(x \in N(x^*) \cap X\).
정의 10 Let \(f: X \to \mathbb{R}\) be a real-valued function defined on a domain \(X \subseteq \mathbb{R}\), and let \(x^* \in X\) be a point in \(X\). We say that \(x^*\) is a local maximizer of \(f(x)\) if there exists a radius \(\delta>0\) of a neighborhood \(N(x^*)\) of \(x^*\) or \(|x-x^*|<\delta\) such that \(f(x^*) \geq f(x)\) for all \(x \in N(x^*) \cap X\).
정의 11 Let \(f: X \to \mathbb{R}\) be a real-valued function defined on a domain \(X \subseteq \mathbb{R}\), and let \(x^* \in X\) be a point in \(X\). We say that \(x^*\) is a strict local minimizer of \(f(x)\) if there exists a radius \(\delta>0\) of a neighborhood \(N(x^*)\) of \(x^*\) or \(|x-x^*|<\delta\) such that \(f(x^*) < f(x)\) for all \(x \in N(x^*) \cap X\).
정의 12 Let \(f: X \to \mathbb{R}\) be a real-valued function defined on a domain \(X \subseteq \mathbb{R}\), and let \(x^* \in X\) be a point in \(X\). We say that \(x^*\) is a strict local maximizer of \(f(x)\) if there exists a radius \(\delta>0\) of a neighborhood \(N(x^*)\) of \(x^*\) or \(|x-x^*|<\delta\) such that \(f(x^*) > f(x)\) for all \(x \in N(x^*) \cap X\).
정의 13 It is said to be a critical point if \(f'(x)\) exists and \(f'(x^*)=0\) for \(x^* \in X\).
Note that a function may have multiple minimizers, and some functions may not have a minimizer at all.
Example
import numpy as np
import matplotlib.pyplot as plt
def f(x):
return 2*(x-3)**2+8
def f2(x):
return x**3-3*x**2+4
def f3(x):
return 7*x**5-35*x+4
def f4(x):
return 2*x/(x**2+1)
def f5(x):
return 4*x**5-(20/3)*x**3+4
def f6(x):
return 3*x**4-4*x**3+1
def df(x):
return 4*(x-3)
def df2(x):
return 3*x**2-6*x
def df3(x):
return 35*x**4-35
def df4(x):
return 2*(1-x)*(1+x)/(1+x**2)**2
def df5(x):
return 20*x**4-20*x**2
def df6(x):
return 12*x**2*(x-1)
def ddf(n):
return np.repeat(4,n)
def ddf2(x):
return 6*x-6
def ddf3(x):
return 140*x**3
def ddf4(x):
return (4*x*(x**2-3))/(x**2+1)**3
def ddf5(x):
return 80*x**3-40*x
def ddf6(x):
return 12*x*(3*x-2)
# Create a range of x values
x = np.linspace(-2, 8, 1000)
# Plot the function
plt.plot(x, f(x), label=r'$f(x)=2(x-3)^2+8$')
plt.plot(x, df(x), label=r'$df(x)=4(x-3)$')
plt.plot(x, ddf(len(x)), label=r'$d^2f(x)=4$')
plt.axhline(y=0, color='gray')
plt.axvline(x=0, color='gray')
plt.legend()
plt.show()
x = np.linspace(-1, 4, 1000)
plt.plot(x, f2(x), label=r'$f(x)=x^3-3x^2+4$')
plt.plot(x, df2(x), label=r'$df(x)=3x^2-6x=3x(x-2)$')
plt.plot(x, ddf2(x), label=r'$d^2f(x)=6x-6=6(x-1)$')
plt.axhline(y=0, color='gray')
plt.axvline(x=0, color='gray')
plt.legend()
plt.show()
# Create a range of x values
x = np.linspace(-1.2, 1.2, 1000)
# Plot the function
plt.plot(x, f3(x), label=r'$f(x)=7x^5-35x+4$')
plt.plot(x, df3(x), label=r'$df(x)=35x^4-35=35(x^2+1)(x-1)(x+1)$')
plt.plot(x, ddf3(x), label=r'$d^2f(x)=120x^3$')
plt.axhline(y=0, color='gray')
plt.axvline(x=0, color='gray')
plt.legend()
plt.show()
x = np.linspace(-2, 4, 1000)
plt.plot(x, f4(x), label=r'$\frac{2x}{x^2+1}$')
plt.plot(x, df4(x), label=r'$df(x)=\frac{2(1-x)(1+x)}{(1+x^2)^2}$')
plt.plot(x, ddf4(x), label=r'$d^2f(x)=\frac{4x(x^2-3)}{(1+x^2)^3}$')
plt.axhline(y=0, color='gray')
plt.axvline(x=0, color='gray')
plt.legend()
plt.show()
x = np.linspace(-2, 2, 1000)
# Plot the function
plt.plot(x, f5(x), label=r'$f(x)=4x^5-\frac{20}{3}x^3+4$')
plt.plot(x, df5(x), label=r'$df(x)=20x^4-20x^2=20(x^2)(x-1)(x+1)$')
plt.plot(x, ddf5(x), label=r'$d^2f(x)=80x^3-40x=40x(x-1)(x+1)$')
plt.axhline(y=0, color='gray')
plt.axvline(x=0, color='gray')
plt.axis([-2, 2, -20, 20])
plt.legend()
plt.show()
I felt too annoyed to type this latex and make the function…
정리 1 For \(f:X \rightarrow \mathbb R\), let \(f(x)\), \(f'(x)\), and \(f''(x)\) be all continuous. For \(x^* \in X\), \(f'(x^*)=0\)
the reverse of the stament 1 in 정리 1 is not true.
Counter Example
If \(f(x)=3x^4-4x^3+1\), then
\(f'(x)=12x^3-12x^2=12x^2(x-1)\) , \(f''(x)=36x^2-24x=12x(3x-2)\), critical points are \((0,1), (1,0)\).
\(x^*=1\) is a global minimizer. For \(x\in \mathbb R\), \(f''(x)\ge 0\) is not true.
x = np.linspace(-1, 1.5, 1000)
# Plot the function
plt.plot(x, f6(x), label=r'$f(x)=3x^4-4x^3+1$')
plt.plot(x, df6(x), label=r'$df(x)=12x^3-12x^2=12x^2(x-1)$')
plt.plot(x, ddf6(x), label=r'$d^2f(x)=36x^2-24x=12x(3x-2)$')
plt.axhline(y=0, color='gray')
plt.axvline(x=0, color='gray')
plt.axis([-1, 1.5, -5, 5])
plt.legend()
plt.show()