# Solving utility maximization, and finding demand function

A consumer has the following utility function $$u(x_1,x_2)=2x_1x_2+x_1+2x_2$$ I want to maximize his utility function. $$max: 2x_1x_2+x_1+2x_2. uc:p_1x_1+p_2x_2=y_A$$ Using Lagrange, I get $$L(x_1,x_2,\lambda)=2x_1x_2+x_1+2x_2-\lambda(p_1x_1+p_2x_2-y_A)$$ I then get the first order conditions: $$\frac{d L}{d x_1}= 2x_2+1-\lambda p_1=0$$ $$\frac{d L}{d x_2}= 2x_1+2-\lambda p_2=0$$ $$\frac{d L}{d \lambda}= y_A-p_1x_1-p_2x_2=0$$

But I am not sure how to find the demand functions, ie. isolating $$x_1$$ and $$x_2$$. I have tried dividing the first two terms with each other, but I am pretty much stuck at this point, and would greatly appreciate a hint in how to proceed

EDIT: I have solved it thanks to a hint I received on this website, but I have one final question: My TA told me that it was important that I remember that this utility function is quasi-concave, but I don't understand why he would tell me that? Considering that my only task is to maximize utility and find the demand function.

• There are three unknowns $(x_1, x_2, \lambda)$ and three equations so there are many ways to solve this. One way is to use the first two equations to eliminate $\lambda$. Then you have two equations left that only uses the variables $x_1$ and $x_2$.
– tdm
Commented May 6 at 7:12
• This is done by setting (1) and (2) equal to each other, right? And then solving for đťś†?
– Noah
Commented May 6 at 7:19
• I have solved it, but I have one final question: My TA told me that it was important that I remember that the utility function is quasi-concave, but I don't understand why he would tell me that? Considering that my only task is to maximize utility and find the demand function.
– Noah
Commented May 6 at 7:47
• Quadi-concavity of the utility function (and linearity of the constraint) is a sufficient condition such that the first order conditions determine a global maximum. If the objective function is not quasi-concave, the solution that satisfies the first order conditions might not solve your utility maximization problem.
– tdm
Commented May 6 at 13:21

$$u(x_1,x_2)=(x_1+1)(2x_2+1)$$
$$\max_{(x_1,x_2)\in\mathbb{R}^2_+} (x_1+1)(2x_2+1)$$ subject to $$p_1x_1+p_2x_2\leq M$$
$$\begin{eqnarray*} (x_1^d,x_2^d)(p_1,p_2,M)=\begin{cases}\left(0,\dfrac{M}{p_2}\right) & \text{if } \dfrac{M}{p_2}+\dfrac{1}{2}<\dfrac{p_1}{p_2} \\ \left(\dfrac{M}{p_1},0\right) & \text{if } \dfrac{1}{2\left(\dfrac{M}{p_1}+1\right)}>\dfrac{p_1}{p_2} \\ \left(\dfrac{M}{2p_1}-\dfrac{1}{2}+\dfrac{p_2}{4p_1},\dfrac{M}{2p_2}-\dfrac{1}{4}+\dfrac{p_1}{2p_2}\right)& \text{if } \dfrac{1}{2\left(\dfrac{M}{p_1}+1\right)}\leq \dfrac{p_1}{p_2}\leq \dfrac{M}{p_2}+\dfrac{1}{2}\end{cases} \end{eqnarray*}$$