1. Learn
  2. /
  3. Courses
  4. /
  5. Introduction to Optimization in Python

Connected

Exercise

Visualize the indifference curve

You have been provided the following utility function and constraint.

\(U(c, m)=c^{0.7}m^{0.3}\)

\(c+m=2\)

Use this to visualize the indifference curve.

np and plt have been loaded for you.

Instructions

100 XP
  • Define the constraint as m and generate the combinations of c and m.
  • Define the utility function and assign it to F.
  • Plot the contours and constraint.