Solving a system of equations with Cobb-Douglas production function I have two equations and two unknowns in the following:
$$p \alpha x_{1}^{\alpha-1}x_{2}^{\beta}-w_{1}=0,$$
$$p \beta x_{1}^{\alpha}x_{2}^{\beta-1}-w_{2}=0.$$
After solving I am supposed to get my solutions
$$x_{1}^{*} = \left [ \frac{1}{p} \left ( \frac{w{1}}{\alpha} \right )^{1-\beta} \left ( \frac{w_{2}}{\beta} \right )^{\beta} \right ]^{\frac{1}{\alpha+\beta-1}},$$
$$x_{2}^{*} = \left [ \frac{1}{p} \left ( \frac{w{1}}{\alpha} \right )^{\alpha} \left ( \frac{w_{2}}{\beta} \right )^{1-\alpha} \right ]^{\frac{1}{\alpha+\beta-1}}.$$
So far, I am unable to get these solutions. I have started from the first equation and have $$x_{2}^{\beta} = \frac{w_{1}}{p \alpha x_{1}^{\alpha - 1}}.$$
Then I took the power of $\frac{1}{\beta}$ on both sides to obtain $$x_{2}= \left [\frac{w_{1}}{p \alpha x_{1}^{\alpha - 1}}  \right ]^{\frac{1}{\beta}}$$
Then things become messy from there. Any clever ways to do it?
 A: A clever way in such exercises (optimization with Cobb-Douglas function) is to divide one equation by another. But first you have to put $w_1$ and $w_2$ on the RHS.
$$p \alpha x_{1}^{\alpha-1}x_{2}^{\beta}=w_{1}\quad (1)$$
$$p \beta x_{1}^{\alpha}x_{2}^{\beta-1}=w_{2}\quad (2)$$
Dividing first equation by the second equation gives
$\frac{\alpha}{\beta}\cdot \frac{x_2}{x_1}=\frac{w_1}{w_2}$
Solving for $x_2$
$x_2=\frac{w_1}{w_2}\cdot  \frac{\beta}{\alpha}\cdot x_1$
Inserting the expression for $x_2$ in (1).
$$p \alpha x_{1}^{\alpha-1}\cdot \left(\frac{w_1}{w_2}\cdot  \frac{\beta}{\alpha}\cdot x_1\right)^{\beta}=w_{1}$$
$p \frac{1}{\alpha^{-1}} x_1^{\beta +\alpha-1}\cdot w_1^{\beta}\cdot \frac{1}{w_2}^{\beta}\cdot \beta ^{\beta} \frac{1}{\alpha ^{\beta}} =w_1$
Leaving $x_1^{\beta +\alpha-1}$ on the LHS alone.
$x_1^{\beta +\alpha-1} =\frac{1}{p}\cdot w_1\cdot \frac{1}{\alpha^{1}}\cdot w_1^{-\beta}\cdot \frac{1}{w_2}^{-\beta}\cdot \frac{1}{\beta ^{\beta}} \cdot  \frac{1}{\alpha ^{-\beta}}$
$ x_1^{\beta +\alpha-1}=\frac{1}{p}\cdot w_1\cdot \frac{1}{\alpha^{1}}\cdot w_1^{-\beta}\cdot w_2^{\beta} \cdot \frac{1}{\beta ^{\beta}} \cdot \frac{1}{\alpha ^{-\beta}}$
I think you can take it from here. If there are any questions, feel free to ask.
