The Consumer’s Choice Problem
Where we are
We’ve built two ingredients separately. From the Budget lecture we have the affordable set — every bundle the consumer can pay for. From the preferences/utility lectures we have what they want — a ranking over bundles, with higher indifference curves preferred to lower ones. Now we combine them.
The basic idea isn’t subtle. Agents have goals (their preferences) and face constraints (their budget). They pick whichever bundle is most preferred among the bundles that are feasible. This lecture is about turning that sentence into a picture and into algebra.
Solve it by picture first
There’s a fancy machinery called Karush-Kuhn-Tucker optimization that handles constrained-choice problems in full generality. We’re not going to use it. For an undergraduate microeconomics course the right method is simpler:
- Draw the budget set.
- Draw a few indifference curves.
- Find the highest indifference curve that still touches the budget set.
- The point of contact is the consumer’s choice.
For “well-behaved” preferences (smooth, downward-sloping, convex indifference curves), step 3 has a clean visual: the highest reachable indifference curve just touches the budget line — they’re tangent. Tangency is what we want to find.
The bundle at the tangency point is called the consumer’s ordinary demand for the given prices and income, and we’ll denote it \[ \bigl(x_1^*(p_1, p_2, m),\; x_2^*(p_1, p_2, m)\bigr). \] The notation is verbose but useful: it reminds you that the optimal bundle depends on every input the consumer faces.
Two conditions at the optimum
For well-behaved preferences with an interior optimum, the optimal bundle \((x_1^*, x_2^*)\) satisfies two conditions:
(a) Budget exhausted: \[ p_1 x_1^* + p_2 x_2^* = m. \]
(b) Tangency: the slope of the indifference curve at \((x_1^*, x_2^*)\) equals the slope of the budget constraint: \[ \underbrace{-\,\frac{MU_1(x_1^*, x_2^*)}{MU_2(x_1^*, x_2^*)}}_{\text{IC slope}} \;=\; \underbrace{-\,\frac{p_1}{p_2}}_{\text{budget slope}}. \]
That’s it. Two equations, two unknowns (\(x_1^*, x_2^*\)), one bundle. Every interior consumer-choice problem in the course boils down to this.
Why tangency? The bite-of-apple test
At an interior optimum, the consumer can’t make herself better off by spending one more dollar on good 1 and one fewer dollar on good 2 (or vice versa). Spend a dollar on good 1 and you gain \(MU_1 / p_1\) utility units; spend a dollar on good 2 and you gain \(MU_2 / p_2\) utility units. If these “bang-per-buck” terms weren’t equal, the consumer would reallocate toward whichever good gave more utility per dollar, and was therefore not yet at the optimum. Setting them equal, \[ \frac{MU_1}{p_1} = \frac{MU_2}{p_2} \quad\Longleftrightarrow\quad \frac{MU_1}{MU_2} = \frac{p_1}{p_2}. \]
Cobb-Douglas: the worked example
A consumer with Cobb-Douglas preferences has utility \[ U(x_1, x_2) \;=\; x_1^{\,a}\, x_2^{\,b}, \] where \(a, b > 0\). Marginal utilities are \[ MU_1 = a\, x_1^{a-1} x_2^{b}, \qquad MU_2 = b\, x_1^{a} x_2^{b-1}. \] The marginal rate of substitution (MRS, the slope of the indifference curve) is \[ \text{MRS} = -\frac{MU_1}{MU_2} = -\frac{a\, x_2}{b\, x_1}. \] At the optimum, MRS equals the price slope: \[ -\,\frac{a\, x_2^*}{b\, x_1^*} = -\,\frac{p_1}{p_2} \quad\Longrightarrow\quad x_2^* = \frac{b\, p_1}{a\, p_2}\, x_1^*. \quad(\star) \] And the budget is exhausted: \(p_1 x_1^* + p_2 x_2^* = m\). Substitute \((\star)\) into the budget equation: \[ p_1 x_1^* + p_2 \cdot \frac{b\, p_1}{a\, p_2}\, x_1^* = m \;\;\Longrightarrow\;\; p_1 x_1^* \left(1 + \frac{b}{a}\right) = m \;\;\Longrightarrow\;\; \boxed{\; x_1^* \;=\; \frac{a\, m}{(a+b)\, p_1}, \qquad x_2^* \;=\; \frac{b\, m}{(a+b)\, p_2}. \;} \]
Two clean observations:
- The consumer spends a fixed fraction of income on each good. Total spending on good 1 is \(p_1 x_1^* = \frac{a}{a+b} m\). So a Cobb-Douglas consumer with exponents \(a\) and \(b\) devotes the share \(a/(a+b)\) of income to good 1 and \(b/(a+b)\) to good 2 — regardless of prices. Price changes shift the quantity bought, but not the share of the budget spent.
- Cross-price effects are zero. Demand for good 1 doesn’t depend on \(p_2\). That’s not a feature of the world; it’s a feature of Cobb-Douglas. More flexible utility functions (CES, quasilinear, additively separable) generate non-zero cross-price effects.
#| standalone: true
#| viewerHeight: 660
library(shiny)
ui <- fluidPage(
titlePanel("Solve Choice by Picture: Cobb-Douglas Consumer"),
sidebarLayout(
sidebarPanel(
width = 4,
sliderInput("a", "Cobb-Douglas exponent a:",
min = 0.5, max = 4, value = 1, step = 0.25),
sliderInput("b", "Cobb-Douglas exponent b:",
min = 0.5, max = 4, value = 1, step = 0.25),
sliderInput("m", "Income (m):", min = 20, max = 200, value = 100, step = 10),
sliderInput("p1", "Price of good 1 (p₁):", min = 1, max = 20, value = 5, step = 1),
sliderInput("p2", "Price of good 2 (p₂):", min = 1, max = 20, value = 5, step = 1),
hr(),
checkboxInput("show_other_ics",
"Show a ladder of indifference curves",
value = TRUE),
htmlOutput("readout")
),
mainPanel(
width = 8,
plotOutput("choice_plot", height = "520px")
)
)
)
server <- function(input, output, session) {
bundle <- reactive({
a <- input$a; b <- input$b
m <- input$m; p1 <- input$p1; p2 <- input$p2
x1 <- a * m / ((a + b) * p1)
x2 <- b * m / ((a + b) * p2)
u_opt <- x1^a * x2^b
list(a = a, b = b, m = m, p1 = p1, p2 = p2,
x1 = x1, x2 = x2, u_opt = u_opt)
})
output$choice_plot <- renderPlot({
s <- bundle()
x1_int <- s$m / s$p1
x2_int <- s$m / s$p2
xmax <- max(40, x1_int) * 1.05
ymax <- max(40, x2_int) * 1.05
par(mar = c(4.2, 4.5, 1, 1))
plot(NA, xlim = c(0, xmax), ylim = c(0, ymax),
xlab = expression(x[1]), ylab = expression(x[2]), main = "")
# Indifference curves: x_1^a x_2^b = U => x_2 = (U / x_1^a)^(1/b)
ic_x <- seq(0.1, xmax * 1.5, length.out = 600)
ic_y_opt <- (s$u_opt / ic_x^s$a)^(1 / s$b)
if (isTRUE(input$show_other_ics)) {
for (frac in c(0.5, 0.75, 1.25)) {
u <- s$u_opt * frac
y <- (u / ic_x^s$a)^(1 / s$b)
lines(ic_x, y, col = adjustcolor("#7f8c8d", 0.5), lwd = 1.2, lty = 3)
}
}
lines(ic_x, ic_y_opt, col = "#27ae60", lwd = 2.4)
polygon(c(0, x1_int, 0), c(0, 0, x2_int),
col = adjustcolor("#3498db", 0.12), border = NA)
segments(0, x2_int, x1_int, 0, col = "#185FA5", lwd = 3)
points(s$x1, s$x2, pch = 19, col = "#c0392b", cex = 1.8)
text(s$x1, s$x2, sprintf(" (%.1f, %.1f)", s$x1, s$x2),
pos = 4, col = "#c0392b", cex = 1.0)
legend("topright",
legend = c("Budget line", "Indifference curve through optimum",
if (isTRUE(input$show_other_ics)) "Other indifference curves" else NULL,
"Optimal bundle (x₁*, x₂*)"),
col = c("#185FA5", "#27ae60",
if (isTRUE(input$show_other_ics)) "#7f8c8d" else NULL,
"#c0392b"),
lwd = c(3, 2.4, if (isTRUE(input$show_other_ics)) 1.2 else NULL, NA),
lty = c(1, 1, if (isTRUE(input$show_other_ics)) 3 else NULL, NA),
pch = c(NA, NA, if (isTRUE(input$show_other_ics)) NA else NULL, 19),
bty = "n", cex = 0.9)
})
output$readout <- renderUI({
s <- bundle()
share1 <- s$a / (s$a + s$b)
share2 <- s$b / (s$a + s$b)
HTML(sprintf(paste(
"<div style='margin-top:10px;font-size:13px;line-height:1.7;'>",
"<b>Ordinary demand:</b> x₁* = %.2f, x₂* = %.2f<br>",
"<b>Spending on good 1:</b> p₁·x₁* = %.1f (%.0f%% of income)<br>",
"<b>Spending on good 2:</b> p₂·x₂* = %.1f (%.0f%% of income)<br>",
"<b>MRS at optimum:</b> %.2f <b>p₁/p₂:</b> %.2f<br>",
"<b>Utility achieved:</b> %.2f",
"</div>"
),
s$x1, s$x2,
s$p1 * s$x1, 100 * share1,
s$p2 * s$x2, 100 * share2,
(s$a / s$b) * (s$x2 / s$x1),
s$p1 / s$p2, s$u_opt))
})
}
shinyApp(ui, server)
When tangency fails: corner and kinky solutions
The tangency condition assumes preferences are smooth (so MRS is well-defined) and convex (so tangency picks out a maximum, not a minimum or saddle). Two textbook cases break those assumptions.
Perfect substitutes (corner solution)
Suppose \(U(x_1, x_2) = x_1 + x_2\). Indifference curves are straight lines with slope \(-1\). The consumer is indifferent between any one-for-one trade of the two goods.
There’s nothing to tangent against here — the indifference curves are themselves straight. The optimum is whichever corner of the budget set is on the highest indifference curve. If \(p_1 < p_2\), good 1 is the cheap way to buy utility and the consumer spends everything on it: \(x_1^* = m/p_1,\; x_2^* = 0\). If \(p_1 > p_2\), the reverse. If \(p_1 = p_2\), every bundle on the budget line is equally good. The textbook “tangency rule” doesn’t apply; you find the optimum by checking each corner.
Non-convex preferences (also a corner)
If indifference curves bow the wrong way — concave instead of convex — the tangency point is the worst affordable bundle, not the best. The optimum lies at one of the boundary points of the budget set. Same conclusion as before: tangency isn’t enough; you have to check what kind of stationary point you’ve found.
Perfect complements (kinky solution)
Suppose \(U(x_1, x_2) = \min\{a x_1, x_2\}\). The consumer values goods 1 and 2 only in fixed proportion \(x_2 = a x_1\) — think left shoes and right shoes, where one of each is the only useful combination. Indifference curves are L-shaped, with the kink along the ray \(x_2 = a x_1\).
The MRS is undefined at the kink (it’s \(0\) on one side and \(-\infty\) on the other), so we can’t use tangency. But the optimum logic still works: the consumer wants to be at the kink — anywhere else wastes one good while paying for it. So the optimum satisfies:
(a) budget exhausted: \(p_1 x_1^* + p_2 x_2^* = m\),
(b) kink condition: \(x_2^* = a x_1^*\).
Substitute (b) into (a): \[ p_1 x_1^* + p_2 \cdot a x_1^* = m \;\;\Longrightarrow\;\; x_1^* = \frac{m}{p_1 + a\, p_2}, \quad x_2^* = \frac{a\, m}{p_1 + a\, p_2}. \] Same approach, different optimality condition swapped in for tangency.
The general pattern
You’ve now seen three flavors of solution and they all follow the same template:
- Write down the budget exhaustion condition.
- Write down whatever optimality condition fits the preferences (tangency, corner, or kink).
- Solve the two equations together.
The flavor of the optimality condition depends on the shape of the indifference curves. The procedure doesn’t.
Did you know?
- The tangency condition is the Lagrangian in disguise. Setting up \(L = U(x_1, x_2) + \lambda(m - p_1 x_1 - p_2 x_2)\) and differentiating gives \(\partial U/\partial x_i = \lambda p_i\), which rearranges into MRS = \(p_1/p_2\). The Lagrange multiplier \(\lambda\) is the marginal utility of income — how much utility goes up if the consumer is handed an extra dollar.
- A monotonic transformation of utility doesn’t change the optimum. Cobb-Douglas is often written instead as \(U(x_1, x_2) = a \log x_1 + b \log x_2\), which produces the same demand functions because the consumer’s ranking of bundles is the same. The log form is easier to differentiate and reappears all over Demand, Maximum Likelihood Estimation, and price-index theory.
- Sticky takeaway: the consumer always seeks the highest indifference curve they can afford. Tangency is one way that happens. Corners and kinks are other ways. The procedure (combine budget exhaustion with the right optimality condition) doesn’t depend on which case you’re in.