Plot the entire stated interval:
import matplotlib.pyplot as plt

x_grid = np.linspace(-4, 4, 1500)
plt.plot(x_grid, f(x_grid))
plt.xlabel("x")
plt.ylabel("f(x)")
plt.show()
The oscillating objective has several wells. A local search starting at need not reach the deepest one, which is near . For the literal maximization in part (a), no minimum was being sought at all. Under the intended minimization interpretation, the result near belongs to a different attraction region from the global minimum.
Figure 1.
Local extrema, the global minimum and the constrained minimum of the oscillatory objective
. Details.

Articles by others on the same topic (0)

There are currently no matching articles.