How to maximise this bivariate function: $\frac{x}{x + y} + \frac{50 - x}{100 - x - y}$ I wish to maximise 
$ g(x,y) = \frac{x}{x + y} + \frac{50 - x}{100 - x - y}$
subject to the constraints $x , y \in   \mathbb{N}$. $ 1≤ x≤ 50 ,0≤y≤50$
I know $g(x,y) = f(x,y) + f(50-x,50-y)$ if that helps.
I know it is maximised at $x = 1$, $y = 0$, but cannot rigorously show why, I have tried finding the gradient, and then the critical points, but the gradient is just messy, so I don't think this is the correct way.

We have $$g(x,y) = \frac{x}{x + y} + \frac{50 - x}{100 - x - y}=2-\frac y{x+y}+\frac{y-50}{100-x-y}$$ so $$\frac{\partial g}{\partial x}=\frac y{(x+y)^2}+\frac{y-50}{(100-x-y)^2}=0$$ gives $$\color{red}{y(100-(x+y))^2=-(y-50)(x+y)^2}\implies200y-4y(x+y)=(x+y)^2\tag{1}$$ and since $$g(x,y) = \frac{x}{x + y} + \frac{50 - x}{100 - x - y}$$ we have $$\frac{\partial g}{\partial y}=-\frac x{(x+y)^2}+\frac{x-50}{(100-x-y)^2}=0$$ so $$\color{blue}{x(100-(x+y))^2=(x-50)(x+y)^2}\implies-200x+4x(x+y)=(x+y)^2\tag{2}$$ Dividing the blue equation by the red gives $$\frac yx=-\frac{y-50}{x-50}\implies x=\frac{25y}{y+25}\tag{3}$$ Equating $(1)$ and $(2)$, $$50(x+y)=(x+y)^2\implies(x+y)(x+y-50)=0\tag{4}$$ Can you continue with $(3)$ and $(4)$?
