# Minima and Maxima of a multivariable function...

1. Dec 30, 2015

### fog37

Hello Forum,

I think I am clear on how to find the maxima and minima of function of one or two independent variables like f(x) or f(x,y). What if the function had 5 independent variables, i.e. f(x,y,z,a,b)? What is the best method, even numerically? Should we find the partial derivatives of f w.r.t. to each variables and set them to zero? We would get a set of 5 equations. Then what?

fog37

2. Dec 30, 2015

### Isaac0427

3. Dec 30, 2015

### jasonRF

Yes, you set each of the partial derivatives equal to zero and solve for sets of $(x,y,z,a,b)$ that solve the set of 5 equations. These locations are the critical points; in order to determine whether each critical point is a maxima, minima or saddle point one would use the second derivative test. For this multivariable case the second derivative test requires you to compute the Hessian matrix (which just contains all of the second derivatives) and examine whether it is positive definite, negative definite, or neither. See the beginning and section 7 of the wikipedia page:
https://en.wikipedia.org/wiki/Hessian_matrix

jason

4. Dec 30, 2015

### JonnyG

Set the partial derivatives equal to 0 then solve to find the critical points. Now calculate the Hessian of $f$. If the Hessian, evaluated at a critical point, has all positive eigenvalues, then the critical point is a local minimum. If it has all negative eigenvalues, then the critical point is a local maximum. If it has eigenvalues of mixed signs, the critical point is a saddle point.

5. Dec 31, 2015

### Svein

You (and several others) always assume that the functions are differentiable. Even when they are, their absolute maxima may not necessarily be at the points where some differential is 0.
1. If the function is not differentiable, finding the maximum is not trivial. If the function is bounded, there may be a maximum, but not necessarily at one or several points.
2. If the function is differentiable in a region Ω, the maxima will be found either at places where the "Differential" is 0 or at the border of Ω. In complex analysis, the maxima for an analytic function lies on the border (otherwise the function reduces to a constant).