# Are other 'variables' in demand functions always fixed?

My question is whether our demand functions e.g. Hicksian (compensated) demand, are ever functions of 3 or more variables, or if the other price variables and utility are always fixed, and hence just parameters.

E.g. The classic problem: Max: $$U(x,y) = (xy)^{1/2}$$ s.t. $$p_xx + p_yy = m$$

Hicksian demand for $$x$$ is: $$h_x = U(\frac{p_2}{p_1})^{1/2}$$

Should I be writing this as $$h_x = \bar{U}(\frac{\bar{p_2}}{p_1})^{1/2}$$ to indicate that $$p_2$$ and $$U$$ are fixed?

I.e. Is the function $$h$$ always: $$h(p_x, \bar p_y, \bar U)$$ or can we write it generally as $$h(p_x, p_y, U)$$

One reason we might not assume the other variables are always fixed is so that we can account for shifts in the demand curve caused by $$∆p_y$$ & $$∆U$$ is that correct?

A brief outline of when is and isn't appropriate to fix the other variables could be most helpful if someone has time. Thanks!

Generally you would write the hicksian demand $$h(p_x,p_y,U)$$. But when you graph it is easier to think of it as a single variable function.
What you see on a typical demand curve (assuming it is a hicksian one) is actually $$h(p_x,\overline{p_y},\overline{U})$$, i.e. you would graph the quantity as a single variable function of its price, for given values of the other variables.
Changes on the other variables $$p_y, U$$, cause the “curve” to shift. In the context of graphing, the other variables can be thought of as parameters.
• Thanks again @Nicolas for another great answer! This fits my expectation. The Hicksian demand function keeps $P_y$ and $U$ as variables, but when we graph it, we want to show demand given these particularly values, and we so fix them as parameters. Commented Feb 14, 2023 at 17:18