How to Find Maximum and Minimum Values of a Function?
Last Updated :
17 Jan, 2025
To find the maximum and minimum values of a function we find the derivatives of the given function. If the function f(x) ≤ f(a) for all x ∈ D then f(a) is the maximum value of the function and if f(x) ≥ f(a) for all x ∈ D then f(a) is the minimum value of the function.
Steps to Find Maximum and Minimum Values of Function
Steps to find the maximum and minimum value of the function are added below:
- Step 1: Find the first derivative of the function.
- Step 2: Equate the first derivative of a function to 0.
- Step 3: Find the critical points from the above expression.
- Step 4: Find the second derivative of the function.
- Step 5: If by putting the critical point in the second derivative if the resultant value is negative then, it is the the point of maxima and if the resultant value is positive then, it is point of minima.
- Step 6: By substituting the values of maxima and minima points we get the maximum value and minimum value of the function.
This is further explained with the help of an example added below:
Example: Find the maximum and minimum of function y = x3 - 3x + 11
Solution:
y = x3 - 3x + 11
Find first order derivative. Differentiating y
y’ = (d / dx) [x3 - 3x + 11]
⇒ y’ = (d / dx) x3 - (d / dx) (3x) + (d / dx) 11
⇒ y’ = 3x2 - 3 + 0
⇒ y’ = 3x2 - 3
Now equate y’ = 0, to find the critical points
y’ = 0
⇒ 3x2 - 3 = 0
⇒ 3x2 = 3
⇒ x2 = 1
⇒ x = 1 or x = -1
Critical points are x = 1 and x = -1
Now we will find second derivative to check the critical point is maxima or minima.
y” = (d / dx) [3x2 - 3]
⇒ y” = (d / dx) [3x2] - (d /dx) [3]
⇒ y” = 6x – 0
⇒ y” = 6x
Now we will put the values of x and find whether y” is greater than 0 or less than 0.
At x = 1
y” = 6(1) = 6
Since, y” > 0 x = 1 is the minima of y
At x = -1
y” = 6(-1) = -6
Since, y” < 0 x = -1 is the maxima of y
- Maximum of y at x = -1 is, (-1)3 -3(-1) + 11 = -1 + 3 + 11 = 13
- Minimum of y at x = 1 is, (1)3 -3(1) + 11 = 1 - 3 + 11 = 9
Examples of Finding Maximum and Minimum Value of a Function
Example 1: Find the maximum and minimum value of a function f(x) = x3 + 8x2 + 16x + 2.
Solution:
f(x) = x3 + 8x2 + 16x + 2
⇒ f'(x) = 3x2 + 16x + 16
Then, equate f'(x) = 0, to find critical points.
3x2 + 16x + 16 = 0
⇒ 3x2 + 12x + 4x + 16 = 0
⇒ 3x (x + 4) + 4 (x + 4) = 0
⇒ (x + 4) (3x + 4) = 0
⇒ x = -4, -4/3
Then, find f''(x) of given function
f''(x) = 6x + 16
Put critical points in f''(x) to find the point of maximum and minimum.
x = -4, f''(x) = -8 and x = -4/3, f''(x) = 8
Since, the value is negative for x = -4 so, it is point of maximum and the value is positive for x = -4/3 so it is point of minimum.
Then, put these values in the f(x) to find the maximum and minimum value of the function.
- Maximum value = f(-4) = - 94
- Minimum value = f(-4/3) = -202 /27 = -7.48
Example 2: Find the maximum and minimum value of a function g(x) = (x3 )/3 - (x2 )/2 - 6x +2
Solution:
f(x) = (x3)/3 - (x2)/2 - 6x +2
⇒ f'(x) = x2 - x - 6
Then, equate f'(x) = 0, to find critical points.
x2 - x - 6 = 0
⇒ x2 - 3x + 2x - 6 = 0
⇒ x (x - 3) + 2 (x - 3) = 0
⇒ (x + 2) (x - 3) = 0
⇒ x = -2, 3
Then, find f''(x) of given function
f''(x) = 2x - 1
Put critical points in f''(x) to find the point of maximum and minimum.
x = -2, f''(x) = -5 and x = 3, f''(x) = 5
Since, the value is negative for x = -2 so, it is point of maximum and the value is positive for x = 3 so it is point of minimum.
Then, put these values in the f(x) to find the maximum and minimum value of the function.
- Maximum value = f(-2) = 28/3
- Minimum value = f(3) = -23/2
Read More,
Similar Reads
How to Find Maximum Value of Trig Function?
To find the maximum value of a trigonometric function, first identify its standard range. For sine and cosine, the maximum value is 1, since these functions oscillate between -1 and 1. For functions like asin(x) or acos(kx), multiply the amplitude by the maximum of the base function (1). For tangent
3 min read
Find the minimum value of a UniModal function
Given a Unimodal Function f(x) = A(x * x) + Bx + C and a range for the value of x in the form of [L, R], the task and is to find the minimum value of f(x) where the value of x can lie in the range [L, R] both inclusive. The minimum value should be accurate up to 6 decimal places. Note: It is guarant
7 min read
Find Indices of Maximum and Minimum Value of Matrix in MATLAB
Matrices in MATLAB are 2-dimensional arrays that store mostly numeric data at different indices. Now, to find the indices of maximum and minimum values of a given matrix, MATLAB does not provide any direct functionality however, we can do the same by using two other functionalities. Firstly, we will
3 min read
How to Find Global Maxima and Minima
Do you ever wonder how to find the highest or lowest points of something? Maybe you're trying to figure out the best temperature for baking cookies or the shortest route to school. In the world of mathematics, we call these high points "global maximums" and low points "global minimums." They're like
8 min read
How to Find Critical Numbers of a Function
To find the critical value of a function we simply take its derivative, set it to zero, and solve for x. The values of x for which the derivative is zero are critical numbers. In this article, we will cover critical numbers and how to find critical numbers of function. We will also solve some proble
7 min read
How to find min/max values without Math functions in JavaScript ?
In this article, we will learn how to find the minimum and maximum values in an array without using Math functions. We know that Math.max() returns the maximum number passed in an array whereas Math.min() returns the minimum number passed. Approach: The same functionality of the Math functions can b
3 min read
How to Find Extrema of Multivariable Functions
Finding the extrema of multivariable functions is a crucial aspect of multivariable calculus. These extrema can be either maximum or minimum values, and they provide essential insights into the behavior of functions involving several variables. To determine these extrema, we first identify critical
11 min read
How to Find Vertex of a Quadratic Function?
A quadratic function can be represented in the form f(x) = ax2 + bx + c, where x is variable, a, b, and c are constants, and a â 0. It is also a type of polynomial function whose greatest degree is 2. The graph of a quadratic function is parabolic in shape, which can open either upwards or downwards
10 min read
Select row with maximum and minimum value in Pandas dataframe
Let's see how can we select rows with maximum and minimum values in Pandas Dataframe with help of different examples using Python. Creating a Dataframe to select rows with max and min values in Dataframe C/C++ Code # importing pandas and numpy import pandas as pd import numpy as np # data of 2018 dr
2 min read
How to Use colMax Function in R
As we know in R, while base functions like colMeans and colSums exist to calculate column-wise means and sum in a data frame, there isn't a built-in colMax function for finding the maximum value in each column. So the question arises of how to use the colMax function in R Programming Language. How t
3 min read