# Finding demand function given a utility min(x,y) function

I am confused about a particular point regarding finding a demand function. All the problems in this practice set I am doing have involved applying the method of Lagrangian multipliers. But I am uncertain if it applies here for this problem.

Problem Setup

Consider a consumer with utility function $u(x,y) = \min\lbrace x,y\rbrace$. Suppose we are given wealth $w$ and prices $p_x = 1, p_y = \frac{1}{2}$.

My Work

Not much to do yet. All I did was set up a budget constraint $w = xp_x + yp_y = x + \frac{1}{2} y$.

My Confusion

I was all set to setup a Lagrangian multiplier equation when suddenly I realized that my utility function is a $\min$ function. At first, I thought this function wasn't differentiable. Now, I am thinking it is not differentiable but it is partially differentiable. I am still unsure.

My Guess

I suspect yes $\min$ is partially differentiable based on this thread

https://math.stackexchange.com/questions/150960/derivative-of-the-fx-y-minx-y

But I suspect my answer will need a piecewise component or something.

My Question

Are Lagrangian multipliers applicable here? If so, how do I define the Lagrangian in piecewise terms as I think I will need to do? If it is not differentiable, how does one derive a demand function given a $\min$ or a $\max$ function?

No, you should not use Lagrange multipliers here, but sound thinking. Suppose $x\neq y$, say for concreteness $x<y$. Let $\epsilon=y-x$. Then $\min\{x,y\}=x=\min\{x,x\}=\min\{x,y-\epsilon\}.$ So the consumer could reduce her consumption of good 2, without being worse off. On the other hand for all $\delta>0$, we would have $\min\{x+\delta,y-\epsilon/2\}>x=\min\{x,y\}$, so the consumer could be better of by reducing the consumption of the second good and spending the freed money on the first good. In an optimum, a consumer cannot improve so optimality requires $x=y$. It is also clear that consumers improve along the $x=y$ 45° ray. So you can simply use $x=y$ as an optimality condition to be substituted into your budget constraint and bypass Lagrange multipliers.