Optimization — Practice Problems

Practice problems for the Optimization lecture
Authors

Vitor Farinha Luz

Viktoriya Hnatkovska

William Duan

Ying Gao

These practice questions accompany the Optimization lecture and will be discussed in the review session.

Question 1

Is the function \(f(x) = x^2\) continuous? Why?

Question 2

Is the function

\[ f(x) = \begin{cases} 0 &\text{, if }x<10\\ 1 &\text{, if }x \geq 10 \end{cases} \]

continuous?

Question 3

Find the gradient of the following functions:

  1. \(f(x) = 3(x+10)^3+20x\).
  2. \(f(x) = \log(\frac{x^2}{1+x})\) (You can assume \(x > -1\) ).
  3. \(f(x_1,x_2,x_3) = ( 3x_1 x_2 ) \log(\frac{x_3 +3}{2x_2})\) (You can assume \(x_2 > 0, x_3>-3\).)

Question 4

Determine whether the following functions are concave (strictly or not), convex (strictly or not) or neither:

  1. \(f(x) = 3 x_1 - 10\)
  2. \(f(x) = e^{x^2}\)
  3. \(f(x) = \log (2x_1 + 3)\)
  4. \(f(x) = 2x^3 - 3x^2 +10x\)

Question 5

Function \(f(x) = \log(1 + x) - 3x\) has a global maximum. What is it? (You can assume throughout that \(x > -1\).)

Question 6

Function \(f(x) = (2 + x_1) x_2 - x_1 - x_2\) has a global maximum. What is it?

Question 7

Does the function \(f(x) = -(x - 2)^4 + 32x\) have a global maximum? If so, justify why and find this maximum.

Question 8

Does the function \(f(x) = x^{4} + x\) have a global maximum? If so, justify why and find this maximum. Find the point satisfying the FOC. Why is it not a maximum?

Question 9

Find the global maximum of

\[ f(x) = -3x^2 + 12x - 5. \]

Verify that the FOC is sufficient here.

Question 10

Find all critical points of

\[ f(x) = -x^4 + 8x^2. \]

Classify each one using the second order condition, and determine the global maximum.

Question 11

Consider the same utility maximization problem as in the Optimization lecture. However, assume that utility function takes the form \(a \ln(x) + b \ln(y)\). Solve this problem and discuss how its solution differs from that in the lecture.

Question 12

Minimize function \(3x^2 + 2y^2 - z^2 + z\) subject to \(x + y + z = 1\).

Question 13

Maximize function \(xz + yz\) subject to constraints

\[ \begin{aligned} y^2+z^2=1 \\ xz=5 \end{aligned} \]

Question 14

A household chooses quantities of three goods \(x, y, z\) to maximize Cobb-Douglas utility

\[ u(x,y,z) = x^{a} y^{b} z^{c} \]

subject to both a budget constraint and a calorie constraint:

\[ p_x x + p_y y + p_z z = m, \qquad\qquad k_x x + k_y y + k_z z = K, \]

where \(p_x, p_y, p_z\) are prices, \(m\) is income, \(k_x, k_y, k_z\) are calories per unit of each good, and \(K\) is the household’s required calorie intake.

Set up the Lagrangian and write down the first-order conditions.

Question 15

Solve

\[ \max_{x,y} \; -(x-6)^2 - (y-6)^2 \qquad \text{s.t.} \qquad x + y \le 8, \quad x \le 3. \]

Which constraint(s) bind at the optimum? Use the guess-and-verify procedure to justify your answer.

PhD Track

Building on the guess-and-verify method for inequality constraints and on the PhD-track sections of the Optimization lecture (corner solutions and kinks, infinite-horizon optimization, and the envelope theorem).

ImportantPhD Track

Question 16

A decision-maker chooses a state-contingent consumption plan \((c_1,c_2)\): \(c_1\) is consumed if state 1 occurs, \(c_2\) if state 2 occurs, and the states occur with weights \(\pi \in (0,1)\) and \(1-\pi\) respectively. She solves

\[ \max_{c_1,c_2}\; \pi\, u(c_1) + (1-\pi)\, u(c_2) \qquad \text{s.t.} \qquad \pi c_1 + (1-\pi) c_2 = W, \]

where \(u\) is differentiable, strictly increasing, and strictly concave, and \(W>0\).

  1. Set up the Lagrangian and derive the first-order conditions.
  2. Show that \(u'(c_1^*) = u'(c_2^*)\), and use this to argue that \(c_1^* = c_2^*\), regardless of the value of \(\pi\).
  3. Solve for \(c_1^*\) and \(c_2^*\) in terms of \(W\) only.
ImportantPhD Track

Question 17

Continue with the setup of Question 16, but now add a subsistence floor in state 2: consumption there cannot fall below some \(\underline{c} > 0\), so the problem becomes

\[ \max_{c_1,c_2}\; \pi\, u(c_1) + (1-\pi)\, u(c_2) \qquad \text{s.t.} \qquad \pi c_1 + (1-\pi) c_2 = W, \qquad c_2 \ge \underline{c}. \]

  1. Suppose \(\underline{c} < W\). Argue, without redoing the algebra, that the floor does not bind and the solution from Question 16 still applies.
  2. Now suppose \(\underline{c} > W\) (and \(W > (1-\pi)\underline{c}\), so the problem remains feasible with \(c_1>0\)). Write the Lagrangian with a multiplier \(\mu \ge 0\) on the floor constraint, solve for \(c_1^*, c_2^*\), and find \(\mu^*\). Verify \(\mu^* > 0\).
ImportantPhD Track

Question 18

Solve

\[ \max_{x,y} \; -(x-4)^2 - (y-4)^2 \qquad \text{s.t.} \qquad x + y \le 5, \quad x \ge 0, \quad y \ge 0. \]

  1. Guess that only the constraint \(x+y\le 5\) binds. Solve the resulting equality-constrained problem and verify the guess (feasibility of the dropped constraints and the sign of the multiplier).
  2. Now check the alternative guess that \(x \ge 0\) binds instead (with \(x+y\le 5\) slack). Show that this guess fails verification, and explain which part of the KKT conditions it violates.
ImportantPhD Track

Question 19

A consumer maximizes

\[ u(x,y) = x + a \ln(y) \]

subject to \(p_x x + p_y y = m\), with \(x, y \geq 0\).

Set up the Lagrangian and derive the FOCs. For what values of \(m\) does the naive interior solution fail to satisfy \(x \geq 0\)? What is the optimal bundle in that case?

ImportantPhD Track

Question 20

A consumer maximizes

\[ u(x,y) = \min\{ax, by\} \]

subject to \(p_x x + p_y y = m\), with \(x, y \geq 0\).

Why does the Lagrangian/FOC approach not apply directly here? Find the utility-maximizing bundle using economic reasoning instead.

ImportantPhD Track

Question 21

A consumer maximizes

\[ u(x,y) = ax + by \]

subject to \(p_x x + p_y y = m\), with \(x, y \geq 0\).

Try applying the FOC \(\nabla u(x^*) = \lambda \nabla g(x^*)\). Under what condition on prices does a well-defined interior solution exist? What happens otherwise?

ImportantPhD Track

Question 22

Consider the problem

\[ \max_{x,y \ge 0} \; \max\{x,y\} \qquad \text{s.t.} \qquad x+y \le w, \]

for some \(w>0\). This objective is a “worst-case” analogue of the perfect-substitutes case from Question 21: instead of adding \(x\) and \(y\), we take whichever is larger.

  1. Show algebraically that \(\max\{x,y\} \le w\) for every feasible \((x,y)\), with equality if and only if \(x+y=w\) and \(\min\{x,y\}=0\). Conclude that the maximizers are \((x,y)=(w,0)\) and \((x,y)=(0,w)\).
  2. Try to apply the Lagrangian/FOC approach on the region where \(x>y\) (so \(u(x,y)=x\) there) and separately on the region where \(y>x\). Show that the tangency condition \(\nabla u = \lambda \nabla g\) has no solution in either region — unlike the perfect-substitutes case, where a matching condition on prices could be satisfied.
  3. Why does the FOC fail so completely here? Relate your answer to the concavity/convexity of \(u\).
ImportantPhD Track

Question 23

Suppose \(u(c) = \ln(c)\) and \(f(x) = x^{\alpha}\) for \(\alpha \in (0,1)\), with transition \(x_{t+1} = x_t^{\alpha} - c_t\).

Write out the Euler equation for this specific problem. What does it say about the relationship between \(c_t\), \(c_{t+1}\), and \(x_{t+1}\)?

ImportantPhD Track

Question 24

A household lives forever with discount factor \(\beta \in (0,1)\). Each period she receives fixed income \(y>0\) and holds assets \(a_t\) that earn gross return \(R>1\), so

\[ a_{t+1} = R a_t + y - c_t, \qquad a_0 \text{ given}, \]

subject to a no-borrowing condition \(a_{t+1} \ge 0\) for all \(t \ge 0\). She maximizes \(\sum_{t=0}^{\infty} \beta^t u(c_t)\) for some differentiable, strictly increasing, strictly concave \(u\).

  1. Write the Lagrangian, attaching multiplier \(\lambda_t\) to the period-\(t\) budget constraint and \(\mu_t \ge 0\) to the no-borrowing constraint \(a_{t+1}\ge0\).
  2. Derive the first-order conditions with respect to \(c_t\) and \(a_{t+1}\).
  3. Combine them into a single condition relating \(u'(c_t)\) and \(u'(c_{t+1})\). Show it holds as an equality (the usual Euler equation) when \(a_{t+1}>0\), and as the strict inequality \(u'(c_t) \ge \beta R\, u'(c_{t+1})\) when the no-borrowing constraint binds.
ImportantPhD Track

Question 25

Suppose \(u(c) = \ln(c)\), \(a_0 = 0\), and \(\beta R < 1\) (the household discounts the future faster than assets grow). Guess that the no-borrowing constraint binds in every period, i.e. \(a_t = 0\) for all \(t \ge 0\). Verify this guess using the condition from Question 24, and find the resulting consumption sequence.

ImportantPhD Track

Question 26

Let \(f(x,\theta) = -(x-\theta)^2 + \theta x\) and define \(V(\theta) = \max_x f(x,\theta)\).

  1. Solve for \(x^*(\theta)\), compute \(V(\theta)\) explicitly, and find \(dV/d\theta\) by direct differentiation.
  2. Compute \(\partial f/\partial \theta\) holding \(x\) fixed, then evaluate it at \(x = x^*(\theta)\). Confirm this matches part (a), as predicted by the envelope theorem.
ImportantPhD Track

Question 27

Let \(V(\theta) = \max_x \; \ln(x) \quad \text{s.t.} \quad \theta x = 1\), for \(\theta > 0\). Note that here the parameter \(\theta\) appears inside the constraint function, not just on the right-hand side.

  1. Solve for \(x^*(\theta)\) and \(V(\theta)\) explicitly, and find \(dV/d\theta\) by direct differentiation.
  2. Apply the envelope theorem to the Lagrangian \(\Lambda(x,\lambda;\theta) = \ln(x) + \lambda(1 - \theta x)\) to compute \(dV/d\theta\). Confirm the two answers agree.