Non-FictionStudent's ShortcutOptimization
Utility Function Solver Workbook eBook
Optimize utility subject to budget constraints usi
by Herron Sona
Optimize utility subject to budget constraints using Excel's Solver add-in. Practice Lagrangian multiplier problems common in intermediate micro exams.
Formats
Free sample
Chapter 1: The Budget Mirror--–- Economics begins with a lie we tell ourselves every day: that we can have everything we want. You walk into a grocery store with twenty dollars. Your eyes scan the aisles—avocados, coffee, a baguette, perhaps a small chocolate bar for later. In that moment, before any calculation, you experience the illusion of infinite possibility. Then reality asserts itself.
You cannot buy the avocados and the coffee and the baguette and the chocolate. Something must be sacrificed. That painful but necessary act of sacrifice is the budget constraint, and it is the single most important concept in microeconomics. It is also, paradoxically, the foundation of freedom. Without constraints, choice is meaningless.
This chapter builds that foundation from the ground up, using Excel’s Solver not as an optimizer yet, but as a mirror to reflect the boundaries within which all rational decisions are made.The Geometry of Scarcity Every consumer choice problem begins with two lines on a graph. The first is the budget line—a straight line that marks the outer boundary of what you can afford. The second is the indifference curve—a curved line representing your preferences. Where these two lines touch, at a single point of tangency, lies the optimal bundle. But before we can find that touchpoint, we must understand the budget line in its purest form.The budget line is defined by a deceptively simple equation:PXX+PYY=MP_X X + P_Y Y = MPXX+PYY=MHere, PXP_XPX is the price of good X, PYP_YPY is the price of good Y, and MMM is your money income (or budget).
The equation says that the total amount spent on good X plus the total amount spent on good Y exactly equals your income. Every point on this line represents a bundle that exhausts your budget. Points below the line are affordable but leave money unspent. Points above the line are unattainable fantasies—the avocados, coffee, baguette, and chocolate that your wallet rejects.The slope of the budget line is −PX/PY-P_X/P_Y−PX/PY. This negative slope encodes the trade-off: to consume one more unit of X, you must give up PX/PYP_X/P_YPX/PY units of Y.
Economists call this the opportunity cost of X in terms of Y. If a coffee costs 4andacroissantcosts4 and a croissant costs 4andacroissantcosts2, the opportunity cost of one coffee is two croissants. Every purchase is a hidden sacrifice.When income changes, the budget line shifts. Double your money, and the line moves outward, parallel to the original. Halve your money, and it moves inward.
When a price changes, the line rotates. If coffee becomes cheaper, the horizontal intercept (where you spend everything on coffee) moves rightward, while the vertical intercept (all croissants) stays fixed. These shifts and rotations are the grammar of consumer choice. Learning to read them is learning to read the constraints of your own life.Why Spreadsheets Beat Mental Math Most introductory economics textbooks present the budget constraint as a simple equation and then quickly move on. This is a mistake.
The budget constraint is not merely a formula to be memorized; it is a living structure that must be manipulated, tested, and internalized. Paper and pencil are too slow for this. Mental math is too error-prone. Excel is the perfect laboratory.Consider a typical problem: You have 100tospendontwogoods.Good Xcosts100 to spend on two goods. Good X costs 100tospendontwogoods.Good Xcosts5 per unit.
Good Y costs 10perunit.Whatbundlesareaffordable?Ahumancansolvethisinseconds:ifyoubuy10unitsof X(10 per unit. What bundles are affordable? A human can solve this in seconds: if you buy 10 units of X (10perunit.Whatbundlesareaffordable?Ahumancansolvethisinseconds:ifyoubuy10unitsof X(50), you have 50leftfor Y,whichbuys5units.Ifyoubuy20unitsof X(50 left for Y, which buys 5 units. If you buy 20 units of X (50leftfor Y,whichbuys5units.Ifyoubuy20unitsof X(100), you buy 0 units of Y. If you buy 0 units of X, you buy 10 units of Y.
That is the entire budget line in three points.But what if we add a third good? What if prices change nonlinearly after a certain quantity? What if the budget is not a simple sum but includes taxes, subsidies, or quantity discounts? The mental math that works for two goods collapses under complexity. Excel never collapses.
It scales. That is the central promise of this workbook: to teach you a method that works for any number of goods, any form of constraint, and any shape of utility function. The budget line is the first and simplest constraint. Master it here, and every subsequent chapter will build smoothly from this foundation.Setting Up Your First Spreadsheet Open a new Excel workbook. We will build a budget constraint model that you will reuse, with modifications, throughout the book.
This model will be simple in Chapter 1, but its architecture—separate input cells, named ranges, and a clear separation between parameters and decision variables—will serve you well in later chapters when the problems become complex.Step 1: Organize inputs In cells A1 through A4, enter the following labels:text Copy Download A1: Price X A2: Price Y A3: Income (M) A4: Constraint Type In cells B1 through B4, enter the corresponding values:text Copy Download B1: 5 B2: 10 B3: 100 B4: "= (we will fill this in a moment)Step 2: Create decision variables In cells A6 and A7, enter:text Copy Download A6: Quantity X A7: Quantity YIn cells B6 and B7, enter starting values. These can be any numbers that you guess might be affordable. Let us start with X=5, Y=5. Later, Solver will change these numbers to find the bundle we want. For now, they are just placeholders.Step 3: Write the budget equation In cell B9, enter the label "Total Spending".
In cell C9, enter the formula:text Copy Download= B1 * B6 + B2 * B7This multiplies the price of X (cell B1) by the quantity of X (cell B6), adds the same for Y, and displays the total amount spent.In cell B10, enter the label "Budget Status". In cell C10, enter:text Copy Download= IF(C9 = B3, "Exact", IF(C9 < B3, "Under", "Over"))This formula checks whether your total spending equals, is less than, or exceeds your income. It is a simple visual check before we introduce Solver.Step 4: Name your ranges (critical for later chapters)Select cell B1. Go to the Formulas tab and click "Define Name". Enter "Price_X" as the name.
Repeat for B2 ("Price_Y"), B3 ("Income"), B6 ("Quantity_X"), and B7 ("Quantity_Y").Now rewrite the formula in C9 using these names:text Copy Download= Price_X * Quantity_X + Price_Y * Quantity_YThe formula is now readable English: price of X times quantity of X plus price of Y times quantity of Y. This readability becomes essential when you have ten goods, nonlinear terms, and complex constraints. Get in the habit now.Step 5: Introduce Solver (as a verification tool, not yet an optimizer)Click the Data tab, then Solver. (If Solver is not visible, you have not installed it. Stop now and follow the installation instructions in Appendix A, which has been moved to the front of this book for exactly this reason.)The Solver Parameters dialog box appears.
For now, we will use Solver not to maximize anything, but simply to find any affordable bundle that satisfies the…
This is the end of the free sample. Get the eBook to keep going. Buy now
About this book
Details
- Author
- Herron Sona
- Publisher
- SamEnrico
- Language
- English
- Genre
- Non-Fiction, Student's Shortcut, Optimization
- Released
- 2026-06-01
- Pages (approx.)
- 143
- Available as
- eBook, Audiobook
Read better in the ZLOADR app
Your eBooks on your phone or tablet. Sign in with your SamEnrico account and start reading.
More by Herron Sona
Cleopatra Language Mastery GuideHerron Sona$11.99
The Authority BiasHerron Sona$11.99
Financial Stress and InflationHerron Sona$11.99
Mindfulness Meditation for KidsHerron Sona$11.99
Fenrir's Fetters: The Architect of Asgard's DoomHerron Sona$11.99
How to Start a Boxing Promoter Business (Beginners Guide)Herron Sona$11.99
How to Produce Audio Recording EquipmentHerron Sona$11.99You may also like
Hong Kong Handover 1997Dunn Johnnie$11.99
Zumba For Postnatal Recovery CourseNeal Christian$11.99
Zumba for BeginnersLadner Nikia$11.99
YouTube Comment Mining GuideHumes Pandora$12.99
Worry Box MeditationCarlin Rudy$11.99
Workplace Stress MeditationNguyen Lynn$11.99
Workplace Stress and Sleep RepairHawley Ivory$11.99
Workplace Perfectionism CureDelaney Jeffry$11.99
Workplace Injustice Anger GuideWallen Isabelle$11.99
Work Addiction and Burnout LinkGreenwood Ester$11.99
Women in Yoga and WellnessBeattie Galina$11.99
Women in Stand Up ComedyChun Evangeline$11.99