Utility functions, indifference curves, marginal utility. Rational consumer choice under budget constraints via Lagrangian optimization.
Every purchase you make balances want against cost — utility theory gives a precise, calculus-based recipe for predicting those choices and how they respond to price or income changes.
Utility theory models consumer satisfaction with utility functions and indifference curves, and it gives the optimal bundle under a budget constraint via Lagrangian optimization (or corner solutions).
Utility theory formalizes how consumers rank bundles of goods and how they choose given prices and income. The central idea is a utility function that assigns a real number to each bundle so that higher numbers mean higher preference. Utility numbers themselves are ordinal (only ordering matters), but specific functional forms let us compute marginal benefits and solve optimization problems.
Why care? Utility theory turns qualitative statements like “I prefer more of good A to less” into quantitative tools that let you predict demand, compute consumer surplus, and perform welfare comparisons. It gives a way to move from psychology-like preference language to calculus-based comparative statics.
Core intuition and building blocks
with . Concrete numeric example: . For the bundle , .
Concrete numeric example: with and at we computed . Similarly
so This says the consumer would give up about 2.25 units of to gain one extra unit of while staying on the same indifference curve (negative sign shows opposite directions). The absolute tradeoff is 2.25.
Budget constraint and rational choice
A consumer faces prices and income . The budget constraint is
This section develops the operational formulas for marginal utilities, how to compute the Marginal Rate of Substitution (MRS) and how indifference curve geometry follows from these calculations. We'll work incrementally from definitions to interpretation and give worked mini-examples with numbers at each step.
1) Marginal utilities and their computation
Definition: For a twice-differentiable utility ,
Interpretation: if a consumer's subjective tradeoff differs from market tradeoff, there's a local profitable adjustment. For example, if , then the consumer values more than its market cost relative to , so they should buy more and less .
Mini-example numeric check: Suppose and the consumer currently at with has . So the consumer should reallocate spending towards . The optimization in Section 3 will find the exact amount.
Takeaway: Computing and is straightforward calculus (use "Derivatives"). These calculations give the geometry of indifference curves and the local condition equating subjective tradeoffs to price ratios at interior optima.
This section develops the constrained optimization technique used to solve the consumer's problem: maximize utility subject to a budget constraint. We'll use the Lagrangian, connect to the first-order conditions, discuss corner solutions, and extract closed-form demand for common utility functions. Every formula is followed by a concrete numeric example.
Problem statement
A consumer chooses nonnegative quantities to
Here is the Lagrange multiplier; economically it equals the marginal utility of income (the gain in utility from a small increase in ) when evaluated at the optimum.
First-order conditions (FOCs): set partial derivatives to zero (assuming interior solution):
\begin{align*}
\frac{\partial \mathcal{L}}{\partial x}&=MU_x -\lambda p_x=0,\\
\frac{\partial \mathcal{L}}{\partial y}&=MU_y -\lambda p_y=0,\\
\frac{\partial \mathcal{L}}{\partial \lambda}&=I-p_x x-p_y y=0.
\end{align*}
Combine the first two to eliminate and recover the MRS = price ratio condition:
Numeric template and example: Cobb–Douglas
Take , with . Then
Concrete numeric example: let (so standard Cobb–Douglas ), . Then
This section explains how utility theory connects to real-world applications and downstream economic concepts. I include numeric mini-examples for each application and point explicitly to which methods from earlier sections are used.
1) Deriving demand curves and market demand
From the consumer optimization we obtain Marshallian demand functions and . For example, Cobb–Douglas with gave
Maximize utility u(x,y)=sqrt(x y) subject to 2x + 1y = 100. Find x, y.
Set up the Lagrangian: L(x,y,λ)=x^{1/2} y^{1/2} + λ(100 - 2x - y).
Compute partial derivatives: ∂L/∂x = (1/2)x^{-1/2} y^{1/2} - 2λ = 0; ∂L/∂y = (1/2)x^{1/2} y^{-1/2} - λ = 0.
Divide the first equation by the second to eliminate λ: \frac{(1/2)x^{-1/2} y^{1/2}}{(1/2)x^{1/2} y^{-1/2}} = \frac{2λ}{λ} ⇒ \frac{y}{x} = 2.
Use the budget constraint: 2x + y = 100 and y = 2x ⇒ 2x + 2x = 100 ⇒ 4x = 100 ⇒ x^* = 25.
Compute y^ from y=2x ⇒ y^ = 50. Check: budget 225 + 150 = 100 holds. Compute utility u(25,50)=√(1250)≈35.355.
Insight: This worked example shows the standard Cobb–Douglas income-share result: with α=β=0.5 we allocate half of income to each good in expenditure shares; here 2x is half of 100 and y is the other half, yielding x=25,y=50.
For u(x,y)=x^{0.4} y^{0.6}, prices p_x=3,p_y=2 and income I=120, find demands and verify MU_x/MU_y=p_x/p_y.
Recall Cobb–Douglas demands: x^ = α/(α+β) I/p_x and y^ = β/(α+β) I/p_y, where α=0.4, β=0.6.
Compute x^ = 0.4/1.0 120 / 3 = 0.4 * 40 = 16.
Compute y^ = 0.6/1.0 120 / 2 = 0.6 * 60 = 36.
Compute MU_x = α x^{α-1} y^{β} = 0.4 x^{-0.6} y^{0.6}. Numerically, x^{-0.6}=16^{-0.6}≈16^{-3/5}≈(2^4)^{-0.6}=2^{-2.4}≈0.189, y^{0.6}=36^{0.6}≈36^{3/5}≈(6^2)^{3/5}=6^{6/5}≈6^{1.2}≈8.303 ⇒ MU_x≈0.40.1898.303≈0.628.
Compute MU_y = β x^{α} y^{β-1} = 0.6 x^{0.4} y^{-0.4}. Numerically x^{0.4}=16^{0.4}≈2^{1.6}≈3.03, y^{-0.4}=36^{-0.4}≈6^{-0.8}≈0.263 ⇒ MU_y≈0.63.030.263≈0.478.
Compute MU_x/MU_y ≈ 0.628/0.478 ≈ 1.314. Compute price ratio p_x/p_y = 3/2 = 1.5. The small numerical discrepancy is due to rounding in intermediate approximations; with exact algebra the equality holds at the true optimum. Alternatively verify algebraically: (α/β)(y/x) = p_x/p_y; plugging the solved x^,y^* gives equality.
Insight: This example illustrates numeric verification that the FOC condition MU_x/MU_y = p_x/p_y holds at the interior optimum; in practice keep enough precision or use exact algebra to avoid rounding artifacts.
Maximize u(x,y)=3x+2y with prices p_x=2, p_y=1 and income I=100. Determine the optimal bundle.
Compute marginal utility per dollar for each good: MU_x/p_x = 3/2 = 1.5 and MU_y/p_y = 2/1 = 2.
Compare: since MU_y/p_y > MU_x/p_x, good y delivers more utility per dollar than x.
Therefore spend all income on good y (corner solution): x^ = 0, y^ = 100/1 = 100.
Check alternate corner: all income on x gives x=50 and utility = 350 = 150, whereas the chosen bundle yields utility = 2100 = 200, so the corner selection is correct.
Interpret λ: since MU_y = 2 = λ p_y ⇒ λ = 2/1 = 2. This λ equals the marginal utility of income (each extra dollar raises utility by 2 units) at the optimum.
Insight: This example demonstrates that when the MRS condition cannot be satisfied because MU ratios are constant (linear utility), the optimum can be at a corner. Checking utility across corners is essential.
Utility functions map bundles to satisfaction levels; marginal utility is the partial derivative and tells the utility gain from a tiny increase in a good (see "Derivatives").
Indifference curves are level sets of utility; their slope equals the negative ratio of marginal utilities: MRS = -MU_x/MU_y.
At an interior optimum under a linear budget, consumers equate subjective tradeoff to market prices: MU_x/MU_y = p_x/p_y. Use Lagrangian methods from "Optimization Introduction" to solve.
Cobb–Douglas preferences yield closed-form demand: x^* = α/(α+β) · I/p_x, so expenditure shares are constant (numeric checks help avoid arithmetic mistakes).
Linear utilities produce corner solutions: buy the good with higher marginal utility per dollar (MU_i/p_i). Always check corners in addition to interior FOCs.
The Lagrange multiplier λ equals the marginal utility of income; computing it numerically gives useful welfare interpretation.
Utility theory enables comparative statics (how demand responds to price and income), consumer surplus calculations, and is foundational for demand estimation and general equilibrium models.
Confusing marginal utility with MRS: MU_x is the marginal increase in utility from x, whereas MRS = -MU_x/MU_y is the slope of indifference curves. They are related but not the same.
Ignoring corner solutions: applying MU_x/MU_y = p_x/p_y mechanically without checking non-negativity or linear utility cases can produce infeasible or suboptimal bundles.
Algebra/rounding errors in numeric substitution: when verifying FOCs numerically, low-precision intermediate approximations can make equality checks appear to fail; use exact algebra where possible.
Interpreting λ incorrectly: λ is the marginal utility of income (utility per extra dollar) at optimum, not a price or a quantity of goods.
Easy: For u(x,y)=x^{0.5} y^{0.5} compute MU_x, MU_y and MRS at the bundle (x,y)=(9,4). Provide numeric values.
Hint: Use partial derivatives: MU_x = 0.5 x^{-0.5} y^{0.5}; MU_y = 0.5 x^{0.5} y^{-0.5}. Then MRS = -MU_x/MU_y.
Compute MU_x = 0.5 9^{-0.5} 4^{0.5} = 0.5 (1/3) 2 = 0.3333. MU_y = 0.5 9^{0.5} 4^{-0.5} = 0.5 3 (1/2) = 0.75. MRS = -MU_x/MU_y = -0.3333/0.75 = -0.4444 (i.e., -4/9).
Medium: Maximize u(x,y)=x^{0.6} y^{0.4} subject to p_x=4, p_y=2, income I=200. Solve for x^(I,p), y^(I,p) and compute the Engel curve for x (x^* as function of I).
Hint: Use Cobb–Douglas demand formula x^ = α/(α+β) · I/p_x. For Engel curve express x^ as a linear function of I.
Here α=0.6, β=0.4 so α/(α+β)=0.6. Then x^ = 0.6 200 / 4 = 0.6 50 = 30. y^ = 0.4 200 / 2 = 0.4 100 = 40. Engel curve for x is x^(I) = 0.6 I / 4 = 0.15 I. For example if I doubles to 400 then x^=60.
Hard: Consider u(x,y)=ln x + y with prices p_x=1, p_y=1 and income I. (a) Solve for Marshallian demands x^(I), y^(I). (b) Find the income effect on x when income increases infinitesimally (dx/dI). (c) Discuss whether x is normal or inferior.
Hint: Set up Lagrangian: maximize ln x + y + λ(I - x - y). Use FOCs to solve. Be cautious: domain requires x>0. Recall derivative of ln x is 1/x.
L = ln x + y + λ(I - x - y). FOCs: ∂L/∂x = 1/x - λ = 0 ⇒ λ = 1/x. ∂L/∂y = 1 - λ = 0 ⇒ λ = 1. Thus 1/x = 1 ⇒ x^ = 1. Budget constraint: x + y = I ⇒ y^ = I - 1. (a) So x^(I) = 1, y^(I) = I - 1 for I > 1. (b) dx/dI = 0 (x does not change with income). (c) x is income-neutral (neither normal nor inferior in the usual sense); it has zero income elasticity. Intuition: u is quasilinear in y, so x chosen to satisfy 1/x = λ (which equals marginal utility of income) becomes constant. For small I below 1, corner solutions may arise (feasible region requires y≥0 ⇒ I≥1 for interior solution).
Looking back: this lesson relies directly on the prerequisites. In "Derivatives" we learned how to compute partial derivatives and slopes — those skills are used to calculate marginal utilities (MU_x, MU_y) and the slope of indifference curves (MRS = -MU_x/MU_y). In "Optimization Introduction" we learned the Lagrangian method and first-order conditions; here we apply that technique to maximize utility under a budget constraint and interpret the Lagrange multiplier as the marginal utility of income. Looking forward: mastery of utility theory enables demand estimation (specifying functional forms like Cobb–Douglas or CES and fitting them to data), welfare analysis (consumer surplus, compensating and equivalent variation), price incidence/tax analysis, Hicksian demand and Slutsky decomposition, and participation in general equilibrium models where individual utility maximization is aggregated to compute market outcomes. Specific downstream topics that require this material include: computation of Marshallian and Hicksian demand, derivation of income and substitution effects (Slutsky equation), welfare comparisons in public economics, and consumer-side behavior in industrial organization and macro models. Numerical practice with the examples above also prepares you for empirical calibration and counterfactual policy simulations.