Finding the absolute maximum of the following 3d function $ f(x,y) = \frac{(\lambda_1x+\lambda_2y+\lambda_3)^2}{x^2+y^2+1} $
I know that the function looks like some deformed dorito chip depending on the lambda values. That is about as far as I've gotten. 
I can't seem to solve this, given the unknowns and the fact that the positive numerator can change and create different limits for the overall function. 
I'm probably going down the wrong path altogether and confusing myself more... could someone show me how to approach this.
Thanks!
 A: Do you know how to take a partial derivative? The maximum, if there is one, must be at a point where both partials are zero.  That gives you two equations in two unknowns.
A: You could use the Cauchy-Schwarz inequality for the vectors $(λ_1,λ_2,λ_3)$ and $(x,y,1)$. This gives an upper bound and a condition for equality to that bound.
A: Let us define $\mathbf{u} = [x,y,z]^T $ and $\lambda = [\lambda_1,\lambda_2,\lambda_3]^T$. With this definition and ignoring that $z=1,$ you can formulate your problem as
$$ \max_{\mathbf{u}} \frac{\lvert \mathbf{u}^T \lambda  \rvert^2}{ \lVert \mathbf{u} \rVert^2}.$$
From this formulation it becomes clear that the solution has the form $\mathbf{u}^\star = c \lambda,$ where $c\neq 0$ is a scaling factor that does not change the value of our function. To obtain $z=1$ we can therefore choose $c=1/\lambda_3$.
Finally, we can conclude 
$$ x = \lambda_1/\lambda_3, y = \lambda_2/\lambda_3. $$
$Remark:$
The reformulated optimization problem is actually known as the Rayleigh quotient.
