Find the maximum of $U (x,y) = x^\alpha y^\beta$ subject to $I = px + qy$ 
Let be $U (x,y) = x^\alpha y^\beta$. Find the maximum of the function $U(x,y)$ subject to the equality constraint $I = px + qy$.

I have tried to use the Lagrangian function to find the solution for the problem, with the equation
$$\nabla\mathscr{L}=\vec{0}$$
where $\mathscr{L}$ is the Lagrangian function and $\vec{0}=\pmatrix{0,0}$.
Using this method I have a system of $3$ equations with $3$ variables, but I can't simplify this system:
$$ax^{\alpha-1}y^\beta-p\lambda=0$$
$$\beta y^{\beta-1}x^\alpha-q\lambda=0$$
$$I=px+qx$$
 A: The solution
The answer can be been found on the internet in any number of places. The function $U$ is a Cobb-Douglas utility function. The Cobb-Douglas function is one of the most commonly used utility functions in economics. 
The demand functions you should get are:
$$x(p,I)=\frac{\alpha I}{(\alpha+\beta)p}\qquad y(p,I)=\frac{\beta I}{(\alpha+\beta)q}$$
The  solution has a nice interpretation: the consumer spends a fraction $\frac{\alpha}{\alpha+\beta}$ of their income on good $x$ and fraction $\frac{\beta}{\alpha+\beta}$ on good $y$.
If you want to find the full working spend a minute or two searching the internet.
A simplification
Note here that you can simplify things by instead maximizing the function $V$ where $$V(x,y)=\ln U(x,y)=\alpha \ln x+\beta\ln y$$
Since $V$ is an increasing transformation of $U$ it will have the same maximizer. 
In fact you could simplify the working further by maximizing $W$ where $$W(x,y)=\frac{V(x,y)}{\alpha+\beta}=\bar{\alpha}\ln x+(1-\bar{\alpha})\ln y$$ where $\bar{\alpha}=\frac{\alpha}{\alpha+\beta}$.
A: You can certainly simplify that system!
$$\lambda = \frac{\alpha x^{\alpha - 1}y^\beta} p$$
$$\lambda = \frac{\beta y^{\beta - 1}x^\alpha} q$$
Thus
$$\frac{\alpha x^{\alpha - 1}y^\beta} p = \frac{\beta y^{\beta - 1}x^\alpha} q$$
and
$$q\left(\alpha x^{\alpha - 1}y^\beta\right) = p\left(\beta y^{\beta - 1}x^\alpha\right)$$
You can reduce powers:
$$q\alpha \cdot y^\beta = p\beta \cdot xy^{\beta-1}$$
$$q\alpha \cdot y = p\beta \cdot x$$
So now you have two equations:
$$qy\alpha = px\beta$$
$$I = px + qy$$
We then have $$qy = px\frac\beta\alpha$$
$$I = px + px\frac\beta\alpha = x\cdot p\left(1+\frac\beta\alpha\right)$$
So $$x = \frac I {p\left(1+\frac\beta\alpha\right)}$$
Do similar computations for $y$, and you get $$(x, y) = \left(\frac I {p\left(1+\frac\beta\alpha\right)}, \frac I {q\left(1+\frac\alpha\beta\right)}\right)$$
You can then continue with Lagrange multipliers.
A: If
$I=px+qy$,
then
$y = (I-px)/q$,
so
$x^ay^b
=x^a((I-px)/q)^b
=x^a(I-px)^b/q^b
$.
Differentiating,
we want
$\begin{array}\\
0
&=(x^a(I-px)^b)'\\
&=ax^{a-1}(I-px)^b-x^apb(I-px)^{b-1}\\
&=x^{a-1}(I-px)^{b-1}(a(I-px)-xpb)\\
&=x^{a-1}(I-px)^{b-1}(aI-apx-xpb)\\
&=x^{a-1}(I-px)^{b-1}(aI-xp(a+b))\\
\text{so}\\
x
&=\dfrac{aI}{p(a+b)}\\
\text{and}\\
y
&=(I-px)/q\\
&=(I-p\dfrac{aI}{p(a+b)})/q\\
&=(I-\dfrac{aI}{(a+b)})/q\\
&=\dfrac{(I(a+b)-aI}{q(a+b)}\\
&=\dfrac{bI}{q(a+b)}\\
\end{array}
$
A: We want to solve
$$\begin{array}{lc} \text{maximize} & x^\alpha y^\beta\\ \text{subject to} & p x + q y = r\end{array}$$
We define the Lagrangian
$$\mathcal{L} (x,y,\lambda) := x^\alpha y^\beta - \lambda (p x + q y - r)$$
Taking the partial derivatives and finding where they vanish,
$$\alpha x^{\alpha-1} y^\beta = \lambda p \qquad \qquad \beta x^\alpha y^{\beta-1} = \lambda q \qquad \qquad p x + q y = r$$
Multiplying the first equation by $x$ and the second by $y$,
$$\alpha x^\alpha y^\beta = \lambda p x \qquad \qquad \beta x^\alpha y^\beta = \lambda q y \qquad \qquad p x + q y = r$$
Adding the first two equations and using the third,
$$\lambda = \left(\frac{\alpha + \beta}{r}\right) x^\alpha y^\beta$$
and, thus,
$$\left( \alpha r - (\alpha + \beta) p x \right) x^\alpha y^\beta = 0 \qquad \qquad \left( \beta r - (\alpha + \beta) q y \right) x^\alpha y^\beta = 0$$
Since $x^\alpha y^\beta$ is not the zero function, we then can compute $x$ and $y$ easily.
