Question about maximizers and trig Hi there I have a quick question about the following
Consider the simple maximization problem of $$f(x,y)= \frac{x}{1+x^2+y^2}$$
It can be easily seen from analysis of critical points obtained from the partial derivatives that we have a minimum at $f(-1,0)=\frac{-1}{2}$ and a  maximum at $f(1,0)=\frac{1}{2}$
However I am interested in being able to really prove that these are indeed the maximum and minimum values.
Now I know this can be done by considering $r=\sqrt{x^2+y^2}$ to be the distance from the origin and showing that $|f(x,y)|$ is smaller when (x,y) isn't within that disk. But I am wondering if this following method is valid too, and if not, why?
can we not just set $x=rcos\theta$ and  $y=rsin\theta$ and on the boundaries of that disk we have r=1 so,
then $$f(r,\theta)= \frac{ cos\theta}{2}$$ which has minimum and maximum when $cos \theta= -1$ and 1 respectively. Can that not be enough to conclude that these are indeed the true max/mins?
Thanks all
 A: It looks like you haven't quite justified why the extrema lie on the circle $r=1$ with your new method. Note that $f(r,\theta) \neq \frac{\cos \theta}{2}$ in general; what you've actually found is $f(1,\theta) = \frac{\cos \theta}{2}$.
Hint:
You already have the ingredients in your question to show that $f(r,\theta)$ is separable, i.e. $$f(r,\theta) = g(r) h(\theta)$$ is the product of two single-variable functions (whose particular forms I will leave for you to determine). Can you think of a way to bound this product?

Full proof:
Substituting $x = r \cos \theta$ and $y = r \sin \theta$,
$$
\frac{x}{1+x^2+y^2}
= \frac{r \cos \theta}{1 + r^2 \cos^2 \theta + r^2 \sin^2 \theta}
= \frac{r}{1 + r^2} \cdot \cos \theta.
$$
It is clear that $r/(1+r^2) \geq 0$ for all $r \geq 0$. Moreover,
\begin{align}
0 \leq (1-r)^2
&\implies 2r \leq 1+r^2
\\
&\implies \frac{r}{1+r^2} \leq \frac{1}{2}
\end{align}
(with equality holding only when $r=1$). Thus we have the global bound
$$
\lvert f(r,\theta) \rvert
= \left\lvert \frac{r}{1+r^2} \right\rvert \cdot \lvert \cos \theta \rvert
\leq \frac{1}{2}
\implies -\frac{1}{2} \leq f(r,\theta) \leq \frac{1}{2},
$$
proving that $f(x=1,y=0) = f(r=1,\theta=0) = 1/2$ and $f(x=-1,y=0) = f(r=1,\theta=\pi) = -1/2$ are global maximum and minimum, respectively.
(In fact, if $r \neq 1$ or $\lvert \cos \theta \rvert < 1$, then $\lvert f(r,\theta) \rvert < 1/2$, so the global maximum and minimum are unique.)
A: $$ f(x,y)= \frac{x}{1+x^2+y^2} $$
Using polar coordinates, we have
$$ f(r,\phi)=\frac{r\cos\phi}{1+r^2\cos^2\phi+r^2\sin^2\phi} $$
$$= \frac{r\cos\phi}{1+r^2\left(\cos^2\phi+\sin^2\phi\right)} $$
$$= \frac{r\cos\phi}{1+r^2} = \left(\frac{r}{1+r^2}\right) \cos\phi $$
Since 
$$\left|\cos\phi\right|\leq 1$$
Then
$$ \left|\frac{r}{1+r^2}\right| \left|\cos\phi\right|\leq \left|\frac{r}{1+r^2}\right| $$
$$\mbox{Let}\ g(r)= \frac{r}{1+r^2}$$
Now let's attempt to find the extrema of $g(r)$. First note that
$$ \frac{d}{dr}[g(r)]= \frac{1-r^2}{\left(r^2+1\right)^2} =0$$
Therefore the critical points of $g(r)$ are
$$ r=-1\quad\mbox{and}\quad r=1 $$
Also note that 
$$ \frac{d^2}{dr^2}[g(r)]= \frac{2r\left(r^2-3\right)}{\left(r^2+1\right)^3} $$
So now we have
$$ \frac{d^2}{dr^2}[g(-1)]\gt 0 $$
$$ \frac{d^2}{dr^2}[g(1)]\lt 0 $$
Therefore 
$$ g(r)\ \mbox{has a global minimum at}\ r =-1$$
And
$$ g(r)\ \mbox{has a global maximum at}\ r =1$$
What does this say about $f(r, \phi)$?
$$ \left|f(r,\phi)\right|\leq g(1) $$
$$ -g(1)\leq f(r,\phi)\leq g(1)$$
$$ -\frac12\leq \left(\frac{r}{1+r^2}\right)\cos\phi\leq \frac12 $$
Therefore 
$$ f(r,\phi)\ \mbox{has a global minimum at}\ (1,\pi)$$
And
$$ f(r,\phi)\ \mbox{has a global maximum at}\ (1,0)$$
