How to derive utility function from indirect utility in this exercise Derive the consumer’s direct utility function if his indirect utility function has the form

$$v(\boldsymbol{\mathbf{p}},y)=yp_1^\alpha p_2^\beta$$

where $\beta ,\alpha$ are negative.
Use Roy's identity to find demand functions:
$$\displaystyle x_1=-\frac{\frac{\partial v}{\partial p_1}}{\frac{\partial v}{\partial y}} =-\frac{\alpha yp_1^{\alpha-1} p_2^\beta}{p_1^\alpha p_2^\beta}=-\frac{\alpha y }{p_1} $$

$$\displaystyle x_2=-\frac{\frac{\partial v}{\partial p_2}}{\frac{\partial v}{\partial y}} =-\frac{\beta yp_1^{\alpha} p_2^{\beta-1}}{p_1^\alpha p_2^\beta}=-\frac{\beta y }{p_2} $$

Since $p_1x_1 + p_2x_2 = y$, from the above demand expressions we get $-\alpha -\beta = 1$.
Demand equations above can also be rewritten as:

$$x_1^{-\alpha}  = (-\alpha y)^{-\alpha}p_1^\alpha$$
$$x_2^{-\beta}  = (-\beta y)^{-\beta}p_2^\beta$$

Multiplying them we obtain the following:
$$x_1^{-\alpha}x_2^{-\beta} = (-\alpha y)^{-\alpha}p_1^\alpha (-\beta y)^{-\beta}p_1^\beta = (-\alpha)^{-\alpha}(-\beta)^{-\beta}yp_1^\alpha p_2^\beta $$

Comparing it with the indirect utility function, we get the direct utility function as:

$$u(x_1, x_2) = \frac{x_1^{-\alpha}x_2^{-\beta}}{(-\alpha)^{-\alpha}(-\beta)^{-\beta}}$$