Minimum Maximum of a function of more than two variables

166 Views Asked by At

I am coming from a computer science background. I came across this when I was looking into machine learning.

Is it possible to find the minimum or maximum of a function of more than two variables using derivatives?

If so, why gradient descent is used instead of it?

1

There are 1 best solutions below

3
On

Yes, it is possible to find local extrema using calculus.

If you have no constraint, then just set the gradient of the multivariable function you are considering to be the zero vector and solve the system to find local extrema. If you have a constraint, use Lagrange multipliers (this again results in solving a system).

Gradient descent is useful in cases where this system is difficult to solve (it is applicable in many cases). However, a disadvantage is that the solution you obtain may not be perfectly exact, and also you may miss some local extrema (depending on the point you start with in your iteration).