Derivation of Marshallian Demand
Deriving the Marshallian demand function for a good from a Cobb-Douglas utility function and a budget.
Question template
In an educational institution, suppose John is trying to determine the optimal way to allocate his budget between buying scientific journals and other academic resources. His utility function is given by utility func, and his budget constraint is represented by budget. Here p_x and p_y are the prices of one unit of x and of y. If scientific journals are denoted by x and other academic resources by y, what is the demand function for scientific journals?
Use it
from datasets import load_dataset
ds = load_dataset("narunraman/steer_me", "deriving_demand")curl "https://steer-benchmark.cs.ubc.ca/api/sample?element_name=deriving_demand&n=5&seed=42"
See the Reference for the parameters.