# How to derive the demand function of $U(x_1,x_2)=x_1-x_2$

I'm trying to find the uncompensated demand function. How would you do that, when I have the following utility function $u(x_1,x_2)=x_1-x_2$, and the budget constraint $p_1\cdot x_1+p_2\cdot x_2=p_1\cdot e_1+p_2\cdot e_2$.

I've found the following.

$\max\ u(x_1,x_2)=x_1-x_2 \ s.t. \ p_1(x_1-e_1)+p_2(x_2-e_2)=0$

With use of substitutions I must maximize the following expression

$\max\ u(x_1,x_2)=x_1-\frac{p_1(e_1-x_1)+p_2e_2}{p_2}$

I find the f.o.c.

$\frac{\partial u}{\partial x_1}=1+\frac{p_1}{p_2}=0$

• Please do show what you have tried. Just a hint : Either you can solve the maximization by plugging the constraint in your utility function or juste use a Lagrangian. – optimal control Mar 4 '17 at 22:49
• While Ubiquitus answer is excellent, if you want to explore the mathematical treatment of your problem, note that with the presence of a "bad" ($x_2$), one should expect that the non-negativity constraint on it will become binding at the solution (in a "usual" problem it is not so we conveniently ignore this constraint). So your maximization problem includes additional constraints ad multipliers that are usually zero, but here they are not. And you have to consider the full Karush-Kuhn-Tucker conditions for a maximum. – Alecos Papadopoulos Mar 6 '17 at 0:32

Some economics problems are deisgned to help us practice the basic tools (e.g., optimisation) of the trade. Others are designed to force us to think about the mechanics of a problem to help us understand the underlying economics better.

This problem falls into the latter category, so I recommend you give up on trying to usual calculus (which is premised on finding some sort of indifference curve tangent) and play around with the problem to figure out why this approach isn't working.

A consumer with $u=x_1-x_2$ is indifferent between the bundles $(4,3)$ and $(3,2)$. We can plot these and other indifference budles to draw an indifference curve:

Likewise, the consumer is indifferent between $(4,4)$ and $(5,5)$ and we can, in this fashion, get an indifference map:

From inspection of the utility function we know that the consumer is better off with more $x_1$ and less $x_2$, so utility increases in the direction indicated.

Now we can pick an endowment vector (e.g,. $(2,4)$) and a relative price (e.g. $-p_1/p_2=-1$) and plot the price line:

The consumer can trade from their endowment to any point along this line. By inspection, you should be able to figure out what the demand vector $\mathbf{x}=(x_1,x_2)$ will be.

Addendum: once you figure out what is going on here, your condition $$\frac{\partial u}{\partial x_1}=1+p_1/p_2$$ should make a bit more sense to you.

• So the consumer will demand $x^*(\frac{E}{p_1},0),\ E=e_1p_1+e_2p_2$ – Jakob Jul Elben Mar 5 '17 at 11:09
• @JakobJulElben Yes, that's basically right. If we want to be thorough, there are two special cases to worry about. Firstly, think about what happens in the figure if the price line is almost horizontal and the total social endowment is $(6,5)$. Secondly, it could be that the reason the consumer doesn't like $x_2$ is that it is, for example, "hours of work". But then we might expect $p_2$ (the wage) to be negative. If $p_1>0$ and $p_2<0$ then the price line will slope upwards and then we need to be a bit more careful about the solution. – Ubiquitous Mar 5 '17 at 11:41
• That's excellent. I might as well create a socket puppet to give you a second vote (just kidding). – Alecos Papadopoulos Mar 6 '17 at 0:26