# Numerical Multivariate Maximization

#### BGM

##### TS Contributor
Hi everyone! After reading post in TS, I try to learn to use R, perhaps the nlminb() function to do a numerical maximization as a MLE question.

The optimization problem is

$$\max_{x,y,z} ~~360[7y^3z^2(1-x-y-z)^5 + 7xy^2z(1-x-y-z)^6 + x^2y(1-x-y-z)^7]$$

$$\text{subject to} ~~ \begin{matrix} 0 < x, y, z < 1 \\ x + y + z < 1 \end{matrix}$$

I know the very basic syntax for nlminb and it does seems that output several different results basic on several different initial guesses. My concern is that the objective function is a high degree polynomial which may has many local maxima to trap the possible convergence. Just want to know is there any tips/tweaks to learn so that we can search the maxima more efficiently, e.g. by controlling the step size in the optimization function?

It would be best if there is an example code for this problem to follow. Thanks for the time again