<p>its now been a couple days without response to @Herr so I will show you the general solution. Usually you will be given values for <span class="math-container">$a$</span> and <span class="math-container">$b$</span> and the respective prices, but you can always solve this symbolically treating them as unknowns. The solution follows:
<span class="math-container">$$max\;U(X,Y)=X^{a}Y^{b}$$</span>
<span class="math-container">$$s.t.\; B=P_{x}X+P_{y}Y$$</span>
Taking first order conditions of the utility function, we get:
<span class="math-container">$$FOC_{x}=aX^{a-1}Y^{b}$$</span>
<span class="math-container">$$FOC_{y}=bX^{a}Y^{b-1}$$</span>
Setting these equal to the price ratio as you suggested, it simplifies to
<span class="math-container">$$\frac{aY}{bX}=\frac{P_{x}}{P_{y}}$$</span>
As you found. Here you have this equation and the equation for the budget line: two equations and two unknowns, algebra is all that is needed now. Rearrange the tangency condition (<span class="math-container">$MRS=\frac{P_x}{P_y}$</span>) and we get:
<span class="math-container">$$\frac{aY}{bX}=\frac{P_{x}}{P_{y}}$$</span>
<span class="math-container">$$aY=\frac{P_{x}}{P_{y}}bX$$</span>
<span class="math-container">$$Y=\frac{P_{x}}{P_{y}}\frac{b}{a}X$$</span>
then we can substitute this demand for Y (as a function of X) into the budget line:
<span class="math-container">$$B=P_{x}X+P_{y}(\frac{P_{x}}{P_{y}}\frac{b}{a}X)$$</span>
which leaves us with an equation of only <span class="math-container">$X$</span>! Continue solving:
<span class="math-container">$$B=P_{x}X+P_{x}\frac{b}{a}X$$</span>
<span class="math-container">$$B=P_{x}X(1+\frac{b}{a})$$</span>
<span class="math-container">$$\frac{B}{1+\frac{b}{a}}=P_{x}X$$</span>
<span class="math-container">$$X=\frac{B}{P_{x}(1+\frac{b}{a})}$$</span>
<span class="math-container">$$X=\frac{a}{a+b}\frac{B}{P_x}$$</span>
where the RHS are all values of parameters, hence the demand of <span class="math-container">$X$</span> depends on the prices and level of income. Then you use the original <span class="math-container">$Y=\frac{P_{x}}{P_{y}}\frac{b}{a}X$</span> derived from the tangency condition and substitute <span class="math-container">$X$</span> in:
<span class="math-container">$$Y=\frac{P_{x}}{P_{y}}\frac{b}{a}\frac{B}{P_{x}(1+\frac{b}{a})}$$</span>
<span class="math-container">$$Y=\frac{b}{a}\frac{B}{P_{y}(1+\frac{b}{a})}$$</span>
<span class="math-container">$$Y=\frac{a}{a+b}\frac{b}{a}\frac{B}{P_{y}}$$</span>
<span class="math-container">$$Y=\frac{b}{a+b}\frac{B}{P_y}$$</span></p>

<p>Note the symmetry between the demand functions of <span class="math-container">$X$</span> and <span class="math-container">$Y$</span>. While these questions are much easier with actual values for the unknowns, you come up with a rather intuitive answer when working with the parameters instead! The relationship still holds true and if you plug the values given into <span class="math-container">$X$</span> and <span class="math-container">$Y$</span> you will get the correct answer.</p>

CC BY-SA 4.0
2019-07-31T17:40:08.280Z
Note that $(1+\frac{b}{a})^{-1}$ is sometimes written as $\frac{a}{a+b}$ for easier memorization.
Herr K.
CC BY-SA 4.0
2019-07-31T19:03:43.910Z
That's the step I was forgetting, thank you!
Brennan
CC BY-SA 4.0
2019-07-31T16:10:37.027Z
2019-07-31T19:06:21.920Z
2019-07-31T19:06:21.920Z
Brennan
<p>You need to maximize the utility function subject to the budget constraint. I invite you to do the full procedure with the Lagrangian and the first order conditions. However the shortcut as you mention consist of equalizing the Marginal Rate of Substitution to the ratio of prices (Since it is the condition of optimality). Then, from this expression you need to solve for x as a function of y (or the reverse) and plug the result in the budget constraint. Doing so you will be able to solve for the demand for good y. Then plug the demand function of y into the expression of x and you get the demand function for x.</p>

CC BY-SA 4.0
2019-07-30T15:54:06.113Z
2019-07-30T15:54:06.113Z
M. Coppee
<p>use the general form of the Cobb Douglas utility function <span class="math-container">$U(x,y)= (x^a)(y^b)$</span> and the budget constraint in the form <span class="math-container">$B=p_{x}X + p_{y}Y$</span> to find the demand functions for good x and good y. </p>

<p>Is this even possible? I took the derivative with respect to x and y and set them equal to <span class="math-container">$\frac{p_x}{p_y}$</span>. I can’t get past <span class="math-container">$\frac{ay}{bx}= \frac{p_x}{p_y}$</span></p>

CC BY-SA 4.0
2019-07-30T18:26:02.340Z
Hint: With ay/bx= px/py and B=pxX + pyY, you have two equations and two unknowns. So you should be able to solve for x and y, the quantity demanded for each good.
Herr K.
<microeconomics><optimization>
Cobb Douglas, Budget Line, Demand function question
Steven Di Pr
# Cobb Douglas, Budget Line, Demand function question

(Asked by: username_0 on 2019-07-30)

use the general form of the Cobb Douglas utility function $U(x,y)= (x^a)(y^b)$ and the budget constraint in the form $B=p\_{x}X + p\_{y}Y$ to find the demand functions for good x and good y.

Is this even possible? I took the derivative with respect to x and y and set them equal to $\frac{p\_x}{p\_y}$. I can’t get past $\frac{ay}{bx}= \frac{p\_x}{p\_y}$

**Tags:** microeconomics, optimization
> **Comments:**
> **username_1**: Hint: With ay/bx= px/py and B=pxX + pyY, you have two equations and two unknowns. So you should be able to solve for x and y, the quantity demanded for each good.  

---

## 2 answers

### Answer by username_2 on 2019-07-31. Score: 2

its now been a couple days without response to @Herr so I will show you the general solution. Usually you will be given values for $a$ and $b$ and the respective prices, but you can always solve this symbolically treating them as unknowns. The solution follows:
$$max\;U(X,Y)=X^{a}Y^{b}$$
$$s.t.\; B=P\_{x}X+P\_{y}Y$$
Taking first order conditions of the utility function, we get:
$$FOC\_{x}=aX^{a-1}Y^{b}$$
$$FOC\_{y}=bX^{a}Y^{b-1}$$
Setting these equal to the price ratio as you suggested, it simplifies to
$$\frac{aY}{bX}=\frac{P\_{x}}{P\_{y}}$$
As you found. Here you have this equation and the equation for the budget line: two equations and two unknowns, algebra is all that is needed now. Rearrange the tangency condition ($MRS=\frac{P\_x}{P\_y}$) and we get:
$$\frac{aY}{bX}=\frac{P\_{x}}{P\_{y}}$$
$$aY=\frac{P\_{x}}{P\_{y}}bX$$
$$Y=\frac{P\_{x}}{P\_{y}}\frac{b}{a}X$$
then we can substitute this demand for Y (as a function of X) into the budget line:
$$B=P\_{x}X+P\_{y}(\frac{P\_{x}}{P\_{y}}\frac{b}{a}X)$$
which leaves us with an equation of only $X$! Continue solving:
$$B=P\_{x}X+P\_{x}\frac{b}{a}X$$
$$B=P\_{x}X(1+\frac{b}{a})$$
$$\frac{B}{1+\frac{b}{a}}=P\_{x}X$$
$$X=\frac{B}{P\_{x}(1+\frac{b}{a})}$$
$$X=\frac{a}{a+b}\frac{B}{P\_x}$$
where the RHS are all values of parameters, hence the demand of $X$ depends on the prices and level of income. Then you use the original $Y=\frac{P\_{x}}{P\_{y}}\frac{b}{a}X$ derived from the tangency condition and substitute $X$ in:
$$Y=\frac{P\_{x}}{P\_{y}}\frac{b}{a}\frac{B}{P\_{x}(1+\frac{b}{a})}$$
$$Y=\frac{b}{a}\frac{B}{P\_{y}(1+\frac{b}{a})}$$
$$Y=\frac{a}{a+b}\frac{b}{a}\frac{B}{P\_{y}}$$
$$Y=\frac{b}{a+b}\frac{B}{P\_y}$$

Note the symmetry between the demand functions of $X$ and $Y$. While these questions are much easier with actual values for the unknowns, you come up with a rather intuitive answer when working with the parameters instead! The relationship still holds true and if you plug the values given into $X$ and $Y$ you will get the correct answer.

> **Comments:**
> **username_1**: Note that $(1+\frac{b}{a})^{-1}$ is sometimes written as $\frac{a}{a+b}$ for easier memorization.  
> **username_2**: That's the step I was forgetting, thank you!  

---

### Answer by username_3 on 2019-07-30. Score: 0

You need to maximize the utility function subject to the budget constraint. I invite you to do the full procedure with the Lagrangian and the first order conditions. However the shortcut as you mention consist of equalizing the Marginal Rate of Substitution to the ratio of prices (Since it is the condition of optimality). Then, from this expression you need to solve for x as a function of y (or the reverse) and plug the result in the budget constraint. Doing so you will be able to solve for the demand for good y. Then plug the demand function of y into the expression of x and you get the demand function for x.


---

