Lawfare Academy

Mathematical Economics and Optimization — Bridge · Chapter 1 of 4

Build functions,limits and marginal-change arguments

Return to the linked course unit →

DEVELOPED COURSE TEXT

Build functions,limits and marginal-change arguments

A function is a model with a domain and units

Let a fictional service provider sell quantityq at inverse demandp(q)=100-q and incur costC(q)=20 q+q squared. Quantity is a divisible service measure per period and currency is a consistent normalized unit. The economic domain includesq≥0 and any capacity bound;negative prices beyondq 100 are outside the intended market model. Revenue is the productp(q)q=100 q-q squared, not the price function itself. Profit is 80 q-2 q squared before any fixed cost. State these relationships before differentiating so the derivative answers the intended question.
Composition also matters. If demand isQ(p), revenue as a function of price ispQ(p), and its derivative requires the product rule. If cost depends on output and output depends on advertising, then total cost as a function of advertising isC(Q(a));its derivative requires the chain rule. Units help diagnose mistakes:derivative of cost with respect to output is currency per service unit, while derivative with respect to advertising spend is a different ratio.

Derive a derivative from a limit

For the profit function, the finite difference is profit(q+h)-profit(q)=(80-4 q)h-2 h squared. Dividing by nonzeroh gives 80-4 q-2 h. The derivative is the limit ash approaches 0, namely 80-4 q. The cancellation does not permit settingh 0 before dividing;the limiting argument concerns nearby nonzero changes. Continuity and differentiability are related but different:a function can be continuous at a kink while having no single derivative there.
Atq 10, the derivative is 40. Increasingq by 2 changes profit by 40×2-2×4=72, not the 80 predicted by the first-order approximation. The remainder is exactly-2 h squared for this quadratic. Atq 20, the derivative is 0, yet moving to 21 reduces profit by 2. Zero marginal slope does not mean all nearby finite changes have zero consequence. The curvature determines the second-order effect and helps distinguish a maximum from a minimum.

Use elasticity, logs and implicit relationships carefully

For a separate demand modelQ(p)=A p to power minus epsilon withA>0, p>0 andepsilon>0, the derivative is-epsilon A p to power(-epsilon-1). Multiplying byp/Q gives elasticity-epsilon. The log form islogQ=logA-epsilon logp, whose slope with respect tologp is the same elasticity. A coefficient on raw price in a log-demand model has a different interpretation. Logs also require positive arguments;zero sales cannot be passed through a logarithm without a defined modeling choice.
An implicit relation can be differentiated without first solving globally. IfF(q, p)=0 and the partial derivativeF_q is nonzero locally, then dq/dp=-F_p/F_q under suitable smoothness. This is a local response, not proof that a unique global equilibrium exists. IfF_q=0, the formula may fail and the underlying relation needs separate analysis. A bridge course should connect notation to the economic mechanism rather than make differentiation a pattern-matching exercise.

Verify symbolically and numerically

Check the derivative by evaluating a centered finite difference[profit(q+h)-profit(q-h)]/(2 h)for several sensibleh values. For this quadratic the centered expression equals the exact derivative in exact arithmetic. In floating-point arithmetic, extremely smallh can amplify cancellation, while a largeh can create approximation error for more general functions. A numerical match is a useful implementation check, not a proof of the model or a substitute for the limit derivation.
The final mathematical statement should include the function, domain, derivative, units and interpretation. If output comes in whole jobs, compare feasible integer alternatives rather than pretend an infinitesimal change is directly implementable. If fixed setup creates a jump, an interior derivative cannot decide whether to enter. The next chapters use the same discipline for multivariable objectives, constraints and accumulated effects, showing how calculus supports an economic argument while preserving its assumptions.

Worked records

Record 1

Profitπ(q)=80 q-2 q² forq≥0 in the intended price domain. Evaluateq 10 with finite changeh 2 andq 20 withh 1.

Develop the reasoning

π′(q)=80-4 q. Atq 10,π=600 andπ12=672, change 72 versus linear prediction 80. Atq 20,π=800 andπ21=798, change-2 despite zero derivative. Centered differences reproduce the exact quadratic derivative up to rounding;the finite-change remainder is-2 h².

Progressive practice — optional

1. Foundation

Derive revenue and profit fromp=100-q, C=20 q+q².

Compare the worked reasoning

R=100 q-q²;π=80 q-2 q².

Change the record

Cost is 20 q only.

Compare the changed-record reasoning

Profit becomes 80 q-q² and derivative 80-2 q. A changed cost model changes the optimum;do not reuse the old derivative.

2. Application

Find the derivative and finite change fromq 10 to 12.

Compare the worked reasoning

Derivative 40;actual change 72.

Change the record

The increment ish=.5 instead.

Compare the changed-record reasoning

Linear prediction 20;exact change 20-2(.25)=19.5. Smaller steps reduce this quadratic approximation error.

3. Transfer

Can the derivative decide a fixed-entry payment by itself?

Compare the worked reasoning

No. Compare total feasible profit with the no-entry alternative.

Change the record

A fixed setup 900 is paid only if operating, and there is no other benefit.

Compare the changed-record reasoning

Maximum variable profit is 800 atq 20, below setup 900. Entry value-100 is worse than 0 despite the positive derivative at low output.

Sources and scope