Let's start by understanding what is a local maxima or minima of a function.
\r\n\r\n Let's say you are given a function \\(y = f(x)\\). Then, a local maxima of this\r\n function is a point, say \\(x=x_{max}\\), at which this function attains a maximum value in its immediate locality.\r\n This means you cannot find any other point in the near vicinity of point \\(x=x_{max}\\)\r\n at which the function's value is greater than that at \\(x=x_{max}\\).\r\n
x\r\n\r\n A local minima of a function is a point, say \\(x = x_{min}\\), at which the function attains\r\n a minimum value in its immediate locality. This means you cannot find any other point in the near vicinity of point \\(x=x_{min}\\)\r\n at which the function's value is smaller than that at \\(x=x_{min}\\).\n
\r\n \r\n \r\n\n At a local maxima, the first derivative of the function is zero. Thus, if \\(x = x_{max}\\) is a local maxima, Then\r\n $$f'(x=x_{max}) =0$$\r\n
\r\n\n At a local maxima, the first derivative of the function is zero. Thus, if \\(x = x_{max}\\) is a local maxima, Then\r\n $$f'(x=x_{min}) =0$$\r\n
\r\n\n The MagicGraph below offers a visually interactive module to explain local maxima and local minima\r\n of a function.\r\n
\r\n\r\n This MagicGraph shows the curves representing function \\(f(x)\\) and its derivative \\(f'(x)\\).\r\n The bright RED point is a draggable point that can glide on the curve representing function \\(f(x)\\).\r\n Dragging the RED point will make the bright BLUE point glide along the curve representing \\(f'(x)\\).\r\n
\r\n