How to find the value that give the global maximum of a function?

116 Views Asked by At

I have got the following function:

$$L(x,y) = \frac{(16.2x +0.9y+5.2)^{24} e^{-(16.2x +0.9y+5.2)}}{24!} \cdot \frac{(2.1x +4.2y+0.9)^8 e^{-(2.1x +4.2y+0.9)}}{8!} \tag{1}$$

and I am attempting at finding the values for x and y that give me the global maximum.


I have attempted doing this using MATLAB by setting an equal range for the x and y coordinates, and using islocalmax(L),but I simply get a row of 0s and 1s.

Can this be done any other way?

1

There are 1 best solutions below

1
On BEST ANSWER

Done by hand.

For the coordinates of the maximum, forget the factorial and take the logarithm of the function and compute the partial derivatives

$$\frac{\partial\log[L(x,y)]}{\partial x}=\frac{56}{7 x+14 y+3}+\frac{3888}{162 x+9 y+52}-\frac{183}{10}=0$$ $$\frac{\partial\log[L(x,y)]}{\partial y}=\frac{112}{7 x+14 y+3}+\frac{216}{162 x+9 y+52}-\frac{51}{10}=0$$ which is more than simple if you let $$A=\frac{1}{7 x+14 y+3} \qquad \text{and} \qquad B=\frac{1}{162 x+9 y+52}$$ Two linear equations in $(A,B)$ which, back to $(x,y)$ give $$x=\frac{2419}{2205}\qquad \text{and} \qquad y=\frac{2518}{2205}$$