Derive demand function from utility Never encountered such a problem as I am new.
$$U(x_1,x_2)=(a\ln(x_1)+b\ln(x_2))^n$$
and  $a,b,n&gt;0$ with income $w&gt;0$ and prices $p_1,p_2&gt;0$.

Find the demand function.

Attempt
I am thinking that I am able to use that $h(u(x))$ for a strictly increasing function represents the same præferences. I.e I can just work on $a\ln(x_1)+b\ln(x_2)$. I am also thinking about using the $MRS$ but not sure on how to continue.
Firstly find the marginal utility of $x_1$ and $x_2$. Hint: Use the chain rule.
$\frac{\partial U}{\partial x_1} = \frac{na(aln(x_1)+ bln(x_2))^{n-1}}{x_1}$
$\frac{\partial U}{\partial x_1} = \frac{nb(aln(x_1)+ bln(x_2))^{n-1}}{x_1}$
The consumer maximises their utility when $\frac{MU_{x_1}}{P_{x_1}}= \frac{MU_{x_2}}{P_{x_2}}$.
From that we simply need to solve for $x_1$ and $x_2$.
Plug each expression into the budget constraint which in this case is $w =P_{x_1}x_1 + P_{x_2}x_2$. Then solve for $x_1$ and $x_2$, giving each demand function.