Hello. In this video, we learn about analytically computing the absolute maximum of a function. In circuit analysis, often times we need to compute the value of a particular element—for example, a resistor—to maximize the power transfer to a load circuit. And we can write down the power as an equation of this parameter. So if we have this equation, the question comes: Can we analytically solve for the value of this parameter that maximizes this equation? The answer is yes, and this is the main topic for today's video. We would like to learn the basics of finding the maximum of a continuous function, knowing that this function is twice differentiable over a domain D. So let's reflect on this figure here. The general definition of the absolute maximum value is that it is the value that no other value in the function is larger than. So for this function, we have the input X, the output Y, which is equal to f(x). Here, we have the function computed at point E is larger than any other point in our function. So here, we say that f(E) is the absolute maximum of this function over the range over which this function is defined. So now we have the question: If I graphically have the function, I can look and say, "Okay, hey, this is the absolute maximum." But what if I couldn't plot this function? Is there a way to analytically solve for the maximum? The answer is yes. Let's reflect on this figure here, and one thing that characterizes this maximum is that the slope at this maximum point is zero. So at the maximum, we have a slope of zero. But wait a minute—the slope here is also zero. So what is the difference between these two points? This point here is our global or absolute maximum, and this point here we call it a local maximum. So both local and global maxima will have a slope of zero. If we note more, this point two has a slope of zero, but this point here is a local minimum. So what we can conclude here is that at the extrema of our function—i.e., maximum or minimum—we are going to have a slope of zero. So is there any way to differentiate between what makes a maximum and what makes a minimum? The answer is yes. So far, we have looked at the points that give us a slope of zero, but this gives me candidate points that can be either global maxima, local maximum, or global and local minimum. Okay, so those are the local extrema points—it can be either maximum or minimum. Out of these points, we can use the second derivative. If the second derivative is less than zero, this means that we have a maximum—either global or local. So far, to get our candidates for the extrema points, we're going to compute the slope (which is the first derivative) and find those points at which we have a slope of zero. This gives me the local extremal points. From those local extremal points, we're going to compute the second derivative and only keep those points that give us a negative second derivative, and those correspond to local maxima. Finally, to know which one is the absolute maximum, we are going to compute the function at every location that is a candidate for local maximum. Also, we are going to compute the function value at the end values of the domain, which is the lower and upper end for the input. Now, we have all those values—we look for the highest value and say, "Okay, this is our maximum, our global maximum." So in summary, we can summarize the process of finding the absolute maximum in five steps: Step number one: We are going to find all candidates for local extrema (which is local maxima and minima) by computing the first derivative and finding those points X at which the slope is zero. So those candidates are maxima and minima. Step number two: To pick the maxima, we are going to compute the second derivative and only keep those points that give us a negative second derivative. Okay, so now I have all the locations of local maxima. Step number three: I need to identify the location of the absolute maximum. So we are going to compute the function f(x) at those locations corresponding to the maxima we obtained from step number two. Step number four: We also compute the function at the ends of its domain, which are the upper and lower values of the input. Step number five: Now, we have the value of those functions—we look for the maximum value, and this gives us the maximum value and its location. So let's apply that to a couple of examples. First Example For this example, we have a function—a second-order polynomial—and we'd like to find the location that corresponds to the absolute maximum. Here, we are not explicitly given the range, so we can assume that the domain of this function is from minus infinity to infinity. Step number one: We are going to compute the first derivative, f'(x). For this function, the derivative would be 20−8x. Then, solve for the value of X such that this equation is equal to zero. Apparently, we can find that from this expression: X=20/8, which is 5/2. So here, we have only one candidate, and we don't know whether this candidate corresponds to a global maximum or a minimum. Step number two: We are going to compute the second derivative. Computing the second derivative gives us −8. Since the second derivative is negative for all values of X (including this candidate that we have), this candidate here corresponds to a maximum. Step number three: Now, we compute the value of the function at X = 5/2 . This gives us 50. Step number four: We also compute the function at the ends of the range. f(−∞) gives us −∞. The other end of the range (or the domain), f(+∞), gives us −∞. Okay, so now I have the value of the function computed at the candidate for the local maximum and the function value at the end of the domain. Apparently, the highest value is here, so we say that this function is at a max value of 50 when X= 5/2. So this is the location of the global maximum, and this is the value of the global (or absolute) maximum. Okay, now let's see another example where we have more than one candidate. Here, we have a quadratic function, and this is defined over a finite range from −2 to 1.5. We would like to find the absolute maxima and the location of that maximum. Step number one: We start by computing the first derivative, f ′(x), which is equal to 3 − 3x^2. Then, find the candidates that make this equal to zero. The values of X that make this equation equal to zero are X=−1 and X=+1. These are the two candidates for local extrema (local maximum and local minimum). Step number two: To verify which one corresponds to a maximum and which one corresponds to a minimum, we compute the second derivative. The second derivative here is equal to −6x. Now, we compute the value of the second derivative at the first candidate (X=−1), which gives us 6. Six is greater than zero, so this is not a maximum. We repeat the process for the second candidate (X=+1): f ′′ (+1) gives us −6. So this is negative. Therefore, this point (X=+1) is a maximum. Step number three: Now, we need to compute the value of the function f(x) at our local maximum point, which is +1. So this gives us 3(1)−(1)^3 = 2. Okay, so this is the value of the function at least a local maximum (if not the global). Step number four: To complete the solution and verify whether this is the global maximum or just a local maximum, we are going to compute the value of the function at the interval endpoints (the ends of the range). We compute f(−2): f(−2)=3(−2)−(−2)^3 = −6−(−8)=-14. We compute the function value at the other end of the range (1.5): f(1.5)=3(1.5)−(1.5)^3 = 4.5−3.375 = 1.125. So what we did now: We had two candidates for local extrema. We rejected one (it was not a maximum). We accepted one. We have the value of the function at this candidate maximum. We have the value of the function at the ends of the range. Apparently, you can see that the maximum is 2, which happens at both X=−2 and X=+1. So the maximum of f(x) is equal to 2, and this happens at X=+1. So yep, that's it this is how we compute the maximum of a function. We take the derivative, equate it to zero; we get the candidates, then we use the second derivative to accept a candidate for Maxima or reject it, and then, we just double check with the end of range points to make sure that the end of range doesn't have any maximum. Okay? And now, we have the three numbers: 2, -14, and 1.125. Apparently, the highest is 2, so the maximum value is 2, and it occurs at X=+1. Thank you.