How to maximize or find a condition for maximum of the following function
$$ f(x,y,z,w) = a(x+y)e^{-a(x+y+z+w)} $$
I tried to apply the second derivative test and obtain the following Hessian matrix
$$ H_f = ae^{-a(x+y+z+w)} \begin{bmatrix} a(x+y)-2 & a(x+y)-2 & a(x+y)-1 & a(x+y)-1 \\ a(x+y)-2 & a(x+y)-2 & a(x+y)-1 & a(x+y)-1 \\ a(x+y)-1 & a(x+y)-1 & x+y& x+y \\ a(x+y)-1 & a(x+y)-1 & x+y& x+y \end{bmatrix}$$
But apparently, $H_f$ is not positive definite as each block has an eigenvalue of zero.
Let $g(x+y,z+w)=f(x,y,z,w)=a(x+y)e^{-a(x+y+z+w)}$. then $g(s,t)=ase^{-a(s+t)}$.
Then Hessian of $g$ comes with... $$ H_g = a^2e^{-a(s+t)} \begin{bmatrix} as-2 & as-1 \\ as-1 & as \end{bmatrix}$$
Then the Hessian determinant is $-a^4e^{-2a(s+t)}<0$.