# Finding minimum of multidimensional function

My calculus knowledge is pretty limited, but unfortunately I need to solve a problem of the following kind:

I'm given a 2 dimensional function $f(x,y)$ from $\mathbb{R}^2$ to $\mathbb{R}$ and I want to know, where it attains its minimum value over $\mathbb{R}\times(a,b)$.

Put differently I want to find an $x$ value and a $y\in(a,b)$ such that $f(x,y) \leq f(x',y')$ for all x' in $\mathbb{R}$ and all $y \in (a,b)$.

I'll have to take the partial derivative of $f$ w.r.t $x$, but I don't understand how y will come into play.

-
There may be no minimum; you can try to locate the local minima using the Second partial derivatives test, and then comparing. –  Arturo Magidin Oct 23 '11 at 23:13
Wait: do you really want to find an $x$ such that for each $y\in (a,b)$, $f(x,y)\leq f(x',y)$ for all $x;\in\mathbb{R}$, or do you want to find an $x\in\mathbb{R}$ and a $y\in (a,b)$ such that $f(x,y)\leq f(x',y')$ for all $x'\in\mathbb{R}$ and all $y'\in(a,b)$? That's what "the minimum for arbitrary $x$ but for $y$ in some interval $(a,b)$" means. –  Arturo Magidin Oct 23 '11 at 23:20
oh yes i was ambiguous, I meant the second version, I edited it. –  stefan Oct 23 '11 at 23:25

$f(x,y)$ has a critical point at $(x,y)$ if the gradient $\left(\frac{\partial f}{\partial x}, \frac{\partial f}{\partial y}\right)$ is the zero vector at that point.
So the procedure you'll want to follow is the following. I assume that $f$ does in fact attain its minium on $\mathbb{R} \times [a,b]$; if it's not obvious for your particular $f$, it's something you'll need to check.
1. Find the points where the gradient of $f$ vanishes. Throw out critical points with $y$ not in $(a,b)$.
2. Evaluate $f$ at these points to find the minimum on the interior of your region. (If there are no critical points in the region, skip this step.)
3. Find the minimum of the one-dimensional functions $f(x,a)$ and $f(x,b)$. This will give you the minima at the boundary of your region.
4. Evaluate $f$ at the three points from steps 2 and 3. Whichever gives the smallest $f$ is the global minimum.