Learn
Lesson · Inventory Models · The order quantity

The Order Quantity as a Discriminant

“Minimise the cost” needs calculus. “Is there an order quantity costing at most T” needs a quadratic: multiply K·D/Q + h·Q/2 ≤ T through by Q and it becomes h·Q²/2 − T·Q + K·D ≤ 0, which holds exactly between the two roots. Lower T and the roots move together; they meet when the discriminant reaches exactly zero, and the single quantity left at that moment is the economic order quantity. Existence, uniqueness and optimality arrive together, and nothing is differentiated.

K·D/Q + h·Q/2 ≤ T and Q > 0 ⟺ h·Q²/2 − T·Q + K·D ≤ 0 leading coefficient h/2 > 0, so the parabola is at or below zero BETWEEN its roots discriminant T² − 2hKD: positive ⟹ an interval, zero ⟹ one point, negative ⟹ nothing it is zero at T = √(2hKD) = C*, and the merged root is T/h = √(2KD/h) = Q* on K = 100, D = 1200, h = 6: 3Q² − T·Q + 120000 ≤ 0, 2hKD = 1440000 T = 1300 ⟹ roots 400/3 and 300; T = 1200 ⟹ 200 twice; T = 1199 ⟹ none
One inequality, one discriminant, and three things it can say

Core ideas

What this lesson establishes

Three ideas. The first is the change of question that makes the algebra possible, the second is the step that has a condition attached, and the third is what the collision actually proves.

1

A feasibility question is easier than an optimisation question

“What is the smallest cost” is a search over all quantities. “Is there a quantity costing at most T” is a yes-or-no question about one inequality, and inequalities in one variable with a squared term in them are something Algebra already solves. Lowering T until the answer turns from yes to no is then a complete method, and the turning point is exact rather than approached.

2

Multiplying an inequality by Q is legal here for a reason worth stating

Multiplying both sides by a negative number reverses an inequality. The step from K·D/Q + h·Q/2 ≤ T to h·Q²/2 − T·Q + K·D ≤ 0 multiplies by Q, and it keeps the direction only because an order quantity is positive. That is not pedantry: it is the one place in this derivation where a condition on the variable is doing real work, and the lab refuses a zero or negative Q for the same reason.

3

A double root is a proof, not a coincidence

While the discriminant is positive there are many quantities cheap enough, and the budget is not tight. When it is negative there are none, and the budget is impossible. Exactly one budget separates those two cases, the interval of affordable quantities has shrunk to a single point there, and that point is therefore the unique cheapest quantity. Nothing else can be: any cheaper one would make the discriminant negative and it would not exist.

The material

The budget question, and what its discriminant says

The rearrangement, the three regimes of the discriminant, and the collision that produces the answer.

Fix the model and ask a different question. Instead of “what is the cheapest order quantity”, ask “is there an order quantity costing at most T per unit time”. That is K·D/Q + h·Q/2 ≤ T with Q > 0, and multiplying through by the positive quantity Q turns it into a polynomial inequality:

K·D/Q + h·Q/2 ≤ T Q > 0 ⟺ K·D + h·Q²/2 ≤ T·Q multiply by Q, which is positive ⟺ h·Q²/2 − T·Q + K·D ≤ 0 a quadratic in Q leading coefficient h/2 > 0 ⟹ the parabola opens upward, so it is at or below zero exactly BETWEEN its roots, and nowhere else
Definition · The budget discriminant

For the quadratic h·Q²/2 − T·Q + K·D the discriminant is T² − 4·(h/2)·(K·D) = T² − 2hKD. Its sign decides everything:

positive, and there is an interval of order quantities meeting the budget; zero, and there is exactly one; negative, and there is none — the parabola never reaches the axis and no quantity is that cheap.

So the budget can be walked down. Each step is a fresh quadratic with a fresh discriminant, and the interval of affordable quantities closes as the budget tightens. The panel does exactly that, on K = 100, D = 1200, h = 6, where the quadratic is 3Q² − T·Q + 120000 and 2hKD = 1440000.

budget T T² − 2hKD roots of 3Q² − T·Q + 120000 width 1920 2246400 320 ± 40√39 ≈ 70.20 … 569.80 499.600 1680 1382400 280 ± 80√6 ≈ 84.04 … 475.96 391.918 1440 633600 240 ± 40√11 ≈ 107.34 … 372.67 265.330 1320 302400 220 ± 20√21 ≈ 128.35 … 311.65 183.303 1300 250000 400/3 and 300 exactly 500/3 1260 147600 210 ± 10√41 ≈ 145.97 … 274.03 128.062 1200 0 200, twice 0 1199 −2399 none: the parabola misses the axis

The collision, and what survives it

Theorem · The economic order quantity, from a double root

T² − 2hKD = 0 exactly when T = √(2hKD). At that budget the two roots coincide at Q = T/h = √(2hKD)/h = √(2KD/h).

No smaller budget is met by any quantity, since the discriminant is then negative; and that single Q meets this one. So √(2hKD) is the least achievable cost and √(2KD/h) is the unique quantity achieving it.

That is the whole derivation. It uses the quadratic formula, the sign of a leading coefficient, and the fact that a positive variable may be multiplied through an inequality. It proves existence, uniqueness and optimality in one motion, and it never mentions a rate of change. Where a calculus treatment differentiates C(Q), sets the result to zero and then checks a second derivative to rule out a maximum, this argument has no second case to rule out: an upward parabola cannot be below zero outside its roots.

Example · A budget that is not tight

Set T = 1300 on the worked instance. The discriminant is 1300² − 1440000 = 250000, a perfect square, and the roots are 400/3 and 300 exactly. Every order quantity between them costs at most 1300: the panel prices 134, 200 and 299 and all three clear the budget, while 133 and 301 do not.

Both endpoints cost exactly 1300 — they are where the cost curve crosses the budget line — so the interval is closed at both ends, which is what ≤ in the original question asked for.

Example · A budget one unit too tight

T = 1199 gives 1199² − 1440000 = −2399. The parabola 3Q² − 1199Q + 120000 stays strictly above the axis, and the panel draws it in red with no shaded interval at all.

This is the informative failure. The answer is not “the arithmetic went wrong” but “no order quantity whatsoever costs as little as 1199 per unit time on this data”, and the discriminant is the proof of it.

The same quadratic, read as a tolerance

Setting the budget as a percentage of C* connects this page to the flat band of “The Economic Order Quantity”, because they are the same interval computed two ways. At T = 1260, which is 105% of 1200, the roots are 210 ± 10√41 ≈ 145.9688 … 274.0312; the flatness band at a 5% tolerance is 145.9688 … 274.0312. At 110% the roots are 220 ± 20√21 ≈ 128.3485 … 311.6515 and the 10% band is 128.3485 … 311.6515. One is a discriminant in Q, the other a discriminant in t, and they agree because they are the same question.

The panel's budget slider is a percentage of C*, and where C* is irrational that percentage is applied to a rounded decimal of it. The argument itself never touches that decimal — it runs on whatever rational T the slider produced — but it does mean that on an irrational instance the 100% row is very close to a merge rather than exactly one, and the panel says so rather than pretending the roots met. On the worked instance C* = 1200 exactly, so the merge really is a merge and the discriminant prints as exactly zero.

One consequence is worth carrying into the rest of the course. The width of the affordable interval shrinks to zero, but it shrinks slowly: at a budget 5% above the minimum the interval is still 128 units wide out of an optimum of 200. That is the flatness of the cost curve seen from underneath, and it is why the models in the rest of this course can afford to round their answers to a case size, a pallet or a whole number of units.

Interactive

The order quantity is where two roots collide

no derivative: a quadratic, its discriminant, and the budget at which the interval closes

Ask for a budget, and read off the quantities that meet ithQ²/2 − TQ + KD ≤ 0 — a quadratic, and its discriminant decides
the parabola hQ²/2 − TQ + KDquantities that cost at most Tthe two rootsno quantity meets the budget

Method

Running the discriminant argument on an instance

Five steps. The third is where most of the errors live, and it is the one that costs nothing to check.

1

Write the budget question as an inequality in Q

K·D/Q + h·Q/2 ≤ T. Not an equation: the question is whether anything is cheap enough, and the set of answers is generally an interval rather than a point.

2

Multiply by Q and say why the direction is preserved

Q > 0, so the inequality keeps its direction and becomes h·Q²/2 − T·Q + K·D ≤ 0. Write the reason down. A reader who omits it has the right answer by accident and will lose it the first time a variable can be negative.

3

Check the sign of the leading coefficient before reading the roots

h/2 > 0, so the parabola opens upward and the inequality holds BETWEEN the roots. If it opened downward the solution set would be everything outside them — two rays, no bounded interval, and no collision to find.

4

Compute T² − 2hKD and read its sign

Positive: an interval of affordable quantities, ends at (T ± √(T² − 2hKD))/h. Zero: exactly one, at T/h. Negative: none, and the budget is impossible rather than merely demanding.

5

Set the discriminant to zero to get the optimum

T = √(2hKD) is the least achievable cost and T/h = √(2KD/h) is the quantity that achieves it. Keep both as surds; the decimal is a printing step, and doing it earlier makes the merge look approximate when it is not.

Signs, roots and what a collision proves

Score 0 / 0

One instance, five budgets, and the exact moment the interval closes

K = 100, D = 1200, h = 6, so the quadratic is 3Q² − T·Q + 120000 and 2hKD = 1440000. Every root below is what the panel reports, and the surds are the panel's own.

budget T discriminant T² − 1440000 roots verdict 1560 993600 260 ± 20√69 interval ≈ 93.87 … 426.13 1300 250000 400/3 and 300 interval 1260 147600 210 ± 10√41 interval ≈ 145.97 … 274.03 1200 0 200, a double root THE OPTIMUM 1199 −2399 none impossible the merge: T = √(2hKD) = √1440000 = 1200 Q = T/h = 1200/6 = 200 = √(2KD/h) = √40000 check it against the cost function, which was never used above: C(200) = 120000/200 + 6(200)/2 = 600 + 600 = 1200 ✓

The last line is the only place the cost function appears, and it is a check rather than a step. Everything above it came from factorising a quadratic, which is why the argument survives the path's promise of no calculus: 1200 and 200 were produced by the discriminant and then confirmed by the thing they are supposed to minimise.

Notice that T = 1300 gives rational roots and T = 1260 does not, on the same instance. Whether the ends of the interval are nice has nothing to do with whether the optimum is: 1300² − 1440000 = 250000 = 500² is luck, while 1200² − 1440000 = 0 is the theorem. A page that printed both as decimals would have hidden the difference.

For a rehearsal, take K = 50, D = 600, h = 5, where 2hKD = 300000 and C* = 100√30. The first move is given: the merge budget is irrational, so the panel's percentage slider is working from a rounded 547.7226 and the 100% row shows a very small positive discriminant instead of zero. Say what the two roots look like just before they meet, and why the panel is right to report that rather than to round the discriminant to zero.

Common mistakes

1
Forgetting that the multiplication needs Q > 0The step is correct and the reason is load-bearing. Omit it and the same manipulation, applied to a variable that can be negative, silently flips an inequality — which is the single most common way a correct-looking algebraic argument produces a wrong feasible set. Say it out loud every time.
2
Reading the discriminant's sign backwardsA positive discriminant means the budget is generous: two roots, an interval of quantities, room to spare. A negative one means the budget is impossible. It is easy to associate “negative” with “small answer” rather than with “no answer”, and the panel colours the parabola red in that case for exactly that reason.
3
Rounding the surd before the collision√(2hKD) is the budget at which the roots meet. Round it to four places first and the discriminant at that rounded value is a small non-zero number, the roots are two distinct quantities a few thousandths apart, and the merge — the whole argument — disappears into rounding. The lab keeps the surd and rounds only to print, and it tells you when the percentage slider has forced it to do otherwise.

Check your understanding

✓
Finish when a budget you cannot meet reads as a negative discriminant rather than as an error.

You should be able to turn a cost target into a quadratic inequality with the positivity condition stated, read all three regimes off the discriminant, locate the budget at which the roots merge, derive Q* = √(2KD/h) and C* = √(2KDh) from that merge, and explain why the collision proves optimality without any appeal to a rate of change.

Note: Everything so far has assumed the unit price is a constant, so that D·price is a term no choice of Q can move and can be left out of the cost. The next lesson removes that assumption: when the price depends on how much is ordered, the total-cost curve breaks into pieces and the cheapest plan is no longer the one nearest this quantity.

Kept in this browser only, for you. Nothing is sent anywhere and nothing checks it. Carry it to another device.

Feedback and recommendations

Something to change about this lesson? Write it down, tick it off when it is handled, and export the list when you want to act on it. Kept in this browser only: nothing is sent anywhere, and nobody is notified.

No recommendations yet for this lesson.