[Math] demand function from utility

derivativeseconomicsutility

thanks in advance.
I’m looking to find a way (apart from Lagrange and MUx/MUy=Px/Py) to derive demand function for x, not y. You see, whenever I try solving the problem, I get y’s Demand instead of x.
I have a function, $u(x,y)= 2\sqrt{x} + y$
whenever I differentiate and then put in the budget constraint equation, I end up getting the result of differentiation of x and the demand for y.
For example, $$\ MUx = \frac{1}{ \sqrt{x} }$$

$MUy=1$,
$$\frac{MUx}{MUy} = \frac{Px}{Py}$$
$$\frac{1}{\sqrt{x}} = \frac{Px}{Py}$$
$$\ x = \frac{Py^2}{Px^2}$$

then, substituting x in Budget constraint equation yields $$\ y = \frac{M}{Py} – \frac{Py}{Px}$$ with the impossibility to find x’s demand (or maybe I just don’t understand it)

MUx, MUy are marginal utilities of goods x and y respectively
Px, Py are prices of these goods
M is income, that comes from budget constraint equation (Px * x +Py * y=M)

Best Answer

You're actually done (regarding only the interior solutions)

Note that the exogenous variables to the problem are prices $P_x$, $P_y$ and income $M$, and your expression of $x$ is already expressed only with $P_x$, $P_y$.

That is, the demand for $x$ will be $$ x(P_x, P_y, M) = \frac{P_x^2}{P_y^2} $$ , which does not depend on income level $M$.

On the other hand, your demand for $y$ $$ y(P_x, P_y, M) = \frac{M}{P_y} - \frac{P_y}{P_x} $$ , depends on all the exogenous variables.

Additionally note that, if the situation happen to be $\frac{M}{P_y} - \frac{P_y}{P_x} <0$, which means the slope of your budget line is too flat to reduce the consumption level $y$, then you have no other choice but to consume $y=0$ and $x=\frac{M}{P_x}$ (the whole income is spent on $x$), which is called as 'corner solution' (not 'interior solution').