Learn the idea. Try it yourself.
Read the explanation or try 6 questions with hints. Free, untimed and no sign-in needed.
All lessons · Thailand study route
Your goal: Find where a sum of distances is smallest, justify every minimising value, and use that structure to solve absolute-value equations and inequalities. You will move from a picture to a proof, then handle unequal weights and expressions containing a square.
Preparation context: This is original algebra preparation for Thailand’s POSN Camp 1 selection, with separate proof extensions. The official 2026 mathematics scope includes absolute values and equations and inequalities involving absolute values of one-variable polynomials. Weighted medians are an application developed here; they are not a separately named topic in that document. This lesson is not an official paper or an exact exam simulation.
Before you start: You should know that an absolute value is nonnegative, solve a linear inequality, and remember that x2 = 9 has two real solutions. Repair these first with absolute-value basics, inequality rules, equations and quadratics, or exact arithmetic. For the extensions, proof methods explains how a bound and its equality conditions form a complete proof.
A manageable route: In a first sitting, try the three starting checks, read the distance argument, and work through Examples 1–2 and Problems 1–3. In a second, study weights and Examples 3–4, then try Problems 4–6. Reserve Problems 7–9 for a proof session. Allow about 40–60 minutes per sitting, longer if you are writing every justification. After reading through Example 4, begin the six-response practice round. The round can move into weighted or polynomial questions, so finish those examples before starting it.
Three checks before you continue
Distance with negative coordinates
Find |−3 − 2|. Explain what the answer measures.
Answer and next step
First subtract: −3 − 2 = −5. Its absolute value is 5, the distance between −3 and 2. A distance cannot be −5. If the subtraction or signs felt uncertain, revisit absolute-value basics before removing any bars.
A sum need not have one best point
For D(x) = |x + 2| + |x − 6|, compare D(0) and D(4). Can either total be less than 8?
Answer and next step
At 0 the distances are 2 and 6, giving 8. At 4 they are 6 and 2, again giving 8. Any route from −2 to 6 through x has length at least 8. Equality holds for every −2 ≤ x ≤ 6. Thus several points can minimise the sum; do not assume the midpoint is the only one.
A substitution keeps its domain
If y = x2 and x is real, which values of x give y = 9? Can y = −1 occur?
Answer and next step
Both x = 3 and x = −3 give y = 9. No real square is −1, so the substitution permits only y ≥ 0. Record that restriction before solving in y, then recover every corresponding real x.
One pair of points explains the median
1. Pair two fixed points
For real numbers a ≤ b, consider |x − a| + |x − b|. If a ≤ x ≤ b, removing the bars gives (x − a) + (b − x) = b − a. A step towards one endpoint increases one distance by exactly the amount it decreases the other.
If x < a, the sum is (a − x) + (b − x) = (b − a) + 2(a − x), which is larger than b − a. If x > b, it is (b − a) + 2(x − b), again larger. Therefore
|x − a| + |x − b| ≥ b − a, with equality exactly when a ≤ x ≤ b.
This is more useful than a guessed answer: it gives a lower bound, every point attaining it, and a reason no other point can attain it.
2. An odd number of equally weighted points
Write the coordinates from smallest to largest, allowing equal coordinates. For five points a1 ≤ a2 ≤ a3 ≤ a4 ≤ a5, pair the outer two, then the next two. Those pairs contribute at least a5 − a1 and a4 − a2. The remaining term is |x − a3|, which is nonnegative.
At x = a3, both pair bounds are equalities and the remaining term is zero. At any other x, that last term is positive, while neither pair can fall below its bound. Thus the middle coordinate is the unique minimising location.
The same argument works for any positive odd number 2m + 1 of points: pair the first with the last, continue inwards, and leave the middle coordinate am+1. For one point there are no pairs; its own distance is zero only at that point. The middle coordinate is called a median. It need not be the arithmetic mean.
3. An even number: keep the whole middle interval
For 2m sorted points, where m is a positive integer, pair the extremes until all points are paired. Each pair has a smallest contribution. All those bounds hold with equality simultaneously precisely when am ≤ x ≤ am+1. This is because the innermost pair has that interval, and every outer pair’s interval contains it.
So every point of the closed middle interval minimises the sum. Outside it, even the innermost pair is strictly above its bound. If the two middle coordinates are equal, the interval collapses to one point. Although statistics often calls the average of the middle coordinates “the median”, this optimisation problem asks for the entire interval of minimisers.
When to use this: For a minimum, pairing often avoids a long sign table. For a specified level such as F(x) ≤ 19, you may still need the formulas on the intervals between the fixed coordinates. Those fixed coordinates are called breakpoints, because a distance changes its direction of increase there.
Unequal weights: count the influence on each side
4. What happens when you move right?
A weighted term w|x − a| means that one unit of distance from a costs w units. Throughout this lesson all weights are positive. An integer weight can first be understood as that many people at the same location; for example, 3|x − 9| is three copies of the distance from 9. Equal coordinates can be combined by adding their weights.
Now take a gap containing no fixed coordinate. Move from x to x + h, with h > 0, without crossing a fixed coordinate. Every point to your left becomes h farther away, and every point to your right becomes h nearer. If the total weights on the left and right are L and R, then
change in total cost = h(L − R).
If L < R, moving right lowers the cost. If L > R, it raises the cost. If L = R, the cost stays constant throughout that gap. This is an exact change calculation, not calculus. It also works with positive weights that are not integers.
5. The weighted-median test, including endpoints
Let the total weight be W. A point c minimises the total cost exactly when the weight strictly to its left and the weight strictly to its right are each at most W/2. Weight located at c belongs to neither strict side. This condition is called the weighted-median test.
Why the condition is necessary: Suppose the weight strictly to the right is greater than W/2. A sufficiently small move right crosses no other fixed coordinate. The right-side distances decrease, while distances to all remaining points, including any at c, increase. The net change is negative. Therefore c was not a minimum. If the weight strictly to the left is greater than half, a small move left gives the same contradiction.
Why it is sufficient: Suppose neither strict side has more than half. A small move right cannot lower the cost, since the weight on the right is at most half. After crossing a fixed point, some positive weight moves from the right side to the left side, so the change per unit rightward movement increases. Thus each successive segment of any longer rightward move also cannot lower the cost. The argument for a leftward move is the same, with left and right exchanged. Any destination is reached by finitely many such segments, so no destination is cheaper.
A practical procedure: Combine weights at equal coordinates, sort the distinct locations, and add their weights from left to right. Stop at the first location where the running total reaches or exceeds half the total weight. If this step takes the running total from below half to strictly above half, that location is the unique minimum. If the running total equals half, every point in the closed interval from this location to the next distinct location is a minimum. Stop at this equality case; do not continue to a later location and declare that later point unique. Positive weights make the cost strictly decrease before this minimum set and strictly increase after it. No flat interval elsewhere is possible, because each crossed point increases the rightward change per unit by twice its positive weight.
6. Levels and restrictions need one more check
A positive-weight distance sum grows without bound far to either side: outside all fixed points, every distance increases as you move farther away. It changes continuously, and is a straight-line expression between consecutive breakpoints. If its minimum is M, an equation F(x) = k has no real solution for k < M, exactly two for k > M, and all points of the minimum set for k = M. That means one solution at the minimum if the minimum set is a point, or infinitely many if it is an interval with positive length.
The reason for “two” is now visible: there is one strictly decreasing side and one strictly increasing side, each passing through every level above M. If the variable is restricted, one or both of those solutions may be forbidden. In particular, after y = x2, retain only y ≥ 0; each positive y gives two real values of x, but y = 0 gives only x = 0. Do not transfer a root count from y to x unchanged.
Four worked examples
Example 1 · A minimum without five sign cases
For real x, find the minimum of S(x) = |x + 4| + |x + 1| + |x − 2| + |x − 6| + |x − 9| and every value of x attaining it.
Notice first: The fixed coordinates are −4, −1, 2, 6, 9, already sorted. Pair the outer locations rather than replacing every bar separately.
The pair at −4 and 9 contributes at least 13. The pair at −1 and 6 contributes at least 7. The remaining distance is |x − 2| ≥ 0. Hence S(x) ≥ 13 + 7 = 20.
At x = 2, the five distances are 6, 3, 0, 4, 7, whose sum is 20. Both pair bounds are attained because 2 lies inside both paired intervals. If x ≠ 2, the unpaired term is positive, so the total is greater than 20. The minimum is therefore 20, attained only at x = 2.
Nearby task: Move the point 9 to 14, leaving the other four fixed. Does the minimising location change? What is the new minimum?
Nearby answer
The median remains 2. The outer pair now has length 14 − (−4) = 18, and the inner pair still has length 7. The new minimum is 25, still attained only at 2. Moving an extreme point farther away increased the minimum value without moving the best location.
Example 2 · From a minimum interval to an inequality
Solve F(x) ≤ 19 for real x, where F(x) = |x + 3| + |x − 1| + |x − 5| + |x − 8|.
The outer pair gives 11, and the inner pair gives 4, so the minimum is 15, attained throughout 1 ≤ x ≤ 5. We still need to find how far left and right the allowance of four extra units extends.
On −3 ≤ x ≤ 1, the first distance is x + 3 and the other three are 1 − x, 5 − x, 8 − x. Adding gives F(x) = 17 − 2x. The inequality becomes 17 − 2x ≤ 19, or x ≥ −1. This contributes −1 ≤ x ≤ 1.
On 5 ≤ x ≤ 8, the first three bars open positively and the last negatively, giving F(x) = 2x + 5. Hence F(x) ≤ 19 exactly when x ≤ 7 within this interval. This contributes 5 ≤ x ≤ 7.
All of 1 ≤ x ≤ 5 works because its value is 15. For x ≤ −3, the formula is 11 − 4x, at least 23. For x ≥ 8, it is 4x − 11, at least 21. Neither outside region supplies another solution. Joining the three permitted pieces gives −1 ≤ x ≤ 7, with endpoints included.
Nearby task: For the same F, solve F(x) = 17.
Nearby answer
The middle value 15 is too small. On the left, 17 − 2x = 17 gives x = 0, which lies in −3 ≤ x ≤ 1. On the right, 2x + 5 = 17 gives x = 6, which lies in 5 ≤ x ≤ 8. The outer regions have values at least 23 and 21, so the complete solution set is {0, 6}.
Example 3 · A weighted median can be an interval
Two students live at coordinate 0, one at 4, and three at 9. A meeting point x may be any real number. Minimise their total travel distance C(x) = 2|x| + |x − 4| + 3|x − 9|.
There are six equal individual contributions. The repeated list is 0, 0, 4, 9, 9, 9, whose two middle entries are 4 and 9. Thus the whole interval 4 ≤ x ≤ 9 is optimal. The weights make the same conclusion without writing repeats: between 4 and 9, weight 3 is on each side.
For every 4 ≤ x ≤ 9, remove the bars to obtain C(x) = 2x + (x − 4) + 3(9 − x) = 23. Before 0, moving right lowers the cost by 6 per unit. Between 0 and 4, the left weight is 2 and the right weight is 4, so moving right lowers it by 2 per unit. After 9, moving right raises it by 6 per unit. Therefore no point outside the interval 4 ≤ x ≤ 9 ties the minimum 23.
Nearby task: One more student joins at 4. Find the new set of optimal meeting points and the new minimum.
Nearby answer
The total weight is now 7. At 4, weight 2 lies strictly left and 3 strictly right, each below 7/2. Just to its left the right-side weight is 5, so the cost decreases towards 4. Just to its right the left-side weight is 4, so it increases away from 4. The unique minimiser is x = 4. Its value remains 23, since the added student travels zero distance there.
Example 4 · A square inside the distances
Solve |x2 − 1| + |x2 − 4| + |x2 − 9| = 10 for real x.
First simplify the shape: Put y = x2, so y ≥ 0. The left side becomes the distance sum from y to 1, 4, 9. Its minimum is 9 − 1 = 8 at y = 4, so level 10 is possible. Now find the two possible y values and check their intervals.
For 0 ≤ y ≤ 1, the sum is 14 − 3y, at least 11, so it cannot equal 10. For 1 ≤ y ≤ 4, it is (y − 1) + (4 − y) + (9 − y) = 12 − y. Setting this equal to 10 gives y = 2, inside the interval.
For 4 ≤ y ≤ 9, the sum is (y − 1) + (y − 4) + (9 − y) = y + 4. Thus y = 6, also inside its interval. For y ≥ 9, the sum is 3y − 14, at least 13, so no further y works.
Finally, x2 = 2 or x2 = 6. Hence all four solutions are x = −√6, −√2, √2, √6. Checking the squares gives distance totals 1 + 2 + 7 = 10 and 5 + 2 + 3 = 10. Both signs matter because the original expression depends only on the square.
Nearby task: Replace the right side 10 by 14. How many real solutions are there?
Nearby answer
For 0 ≤ y ≤ 1, 14 − 3y = 14 gives y = 0. The intervals from 1 to 9 never reach 14, since their values are between 8 and 13. For y ≥ 9, 3y − 14 = 14 gives y = 28/3, which is greater than 9. Thus there are three real solutions: x = 0 and x = ±√(28/3). The nonnegative substitution produced two y values, but zero supplies only one x.
Mistakes to catch before your final line
- Using the arithmetic mean automatically: Distance sums use medians. First decide whether you are adding distances or squared distances.
- Keeping only the midpoint of an even list: Give the entire closed middle interval, unless the problem restricts the allowed locations.
- Counting locations instead of weights: In Example 3 there are three locations but six individual distance contributions.
- Putting weight at a candidate on both sides: The half-weight test uses points strictly left and strictly right.
- Solving a formula outside its interval: Check every candidate against the region in which its bars were removed.
- Forgetting a transformed domain: With y = x2, negative y is forbidden, positive y has two corresponding real values of x, and zero has one.
- Showing only a lower bound: State where equality holds and verify that at least one permitted point attains it.
Nine original written problems
These are learning problems, not an official timed paper. Problems 1–3 establish the method, 4–6 transfer it, and 7–9 are proof extensions. Try each on paper before revealing a hint. The rubrics are self-check guides; written proofs are not automatically graded.
Problem 1 · Foundation · Pair before expanding
For real x, find the minimum of |x + 6| + |x + 2| + |x − 1| + |x − 4| + |x − 8| and all points attaining it.
Hint 1
Pair the smallest fixed coordinate with the largest, then the next two.
Hint 2
The outer pair has endpoints −6, 8, the inner pair −2, 4, and the unpaired point is 1.
Complete solution
The outer pair contributes at least 8 − (−6) = 14, and the inner pair at least 4 − (−2) = 6. The remaining term |x − 1| is nonnegative. Therefore the total is at least 20.
At x = 1, the pair bounds are both attained, and the remaining term is zero. If x ≠ 1, that remaining term is positive, while neither pair can fall below its bound. Hence the minimum is 20, attained only at x = 1.
Self-check rubric: 4 checkpoints: identify the sorted locations; form the two lower bounds; attain 20 at 1; rule out every other location.
Problem 2 · Foundation · An integer restriction
For an integer x, minimise |x + 4| + |x| + |x − 3| + |x − 7|. List every minimising integer.
Hint 1
First solve the problem for real x, then apply the integer restriction.
Hint 2
The middle interval of −4, 0, 3, 7 is 0 ≤ x ≤ 3.
Complete solution
The outer pair contributes at least 11, and the pair at 0 and 3 contributes at least 3. Thus the real minimum is 14, attained exactly on 0 ≤ x ≤ 3.
The permitted integers there are 0, 1, 2, 3. Each therefore gives 14. Outside the interval the inner pair is strictly above its bound, so no other integer ties. There are four minimising integers, not just the two middle coordinates.
Self-check rubric: 4 checkpoints: lower bound 14; complete real minimiser interval; all four permitted integers; exclusion outside the interval.
Problem 3 · Foundation · Solve an inequality
Solve |x + 1| + |x − 2| + |x − 6| ≤ 9 for real x.
Hint 1
The breakpoints are −1, 2, 6. Decide which bars change sign on each interval.
Hint 2
Between −1 and 2, the sum is 9 − x. Between 2 and 6, it is x + 5.
Complete solution
For x ≤ −1, all three signed differences are nonpositive, so the sum is 7 − 3x ≥ 10. No point in this region works.
For −1 ≤ x ≤ 2, the sum is (x + 1) + (2 − x) + (6 − x) = 9 − x. The inequality gives x ≥ 0, so this region contributes 0 ≤ x ≤ 2.
For 2 ≤ x ≤ 6, the sum is (x + 1) + (x − 2) + (6 − x) = x + 5. It is at most 9 when x ≤ 4, contributing 2 ≤ x ≤ 4.
For x ≥ 6, the sum is 3x − 7 ≥ 11, so there are no more solutions. Combining the pieces gives 0 ≤ x ≤ 4. Both endpoints give total 9 and are included.
Self-check rubric: 4 checkpoints: correct breakpoint regions; correct signed formulas; intersect each inequality with its region; join the pieces with endpoints.
Problem 4 · Transfer · The best point may be forbidden
A cost is C(x) = 2|x + 2| + 3|x − 3| + |x − 8|. The allowed meeting locations satisfy x ≥ 5. Find the minimum allowed cost and the unique location attaining it.
Hint 1
Find the unrestricted weighted median, then check whether it is allowed.
Hint 2
On 5 ≤ x ≤ 8, the left-side weight is 5 and the right-side weight is 1.
Complete solution
The total weight is 6, with weights 2, 3, 1 at −2, 3, 8. The cumulative weight first exceeds half at 3, so the unrestricted minimiser is 3, with cost 15. It is not allowed because 3 < 5.
For 5 ≤ x ≤ 8, removing the bars gives C(x) = 2(x + 2) + 3(x − 3) + (8 − x) = 4x + 3. This strictly increases with x, so its minimum on that interval is at 5, with value 23.
For x ≥ 8, the formula is 6x − 13, which also strictly increases and starts at 35. It cannot improve on 23. Therefore the allowed minimum is 23, attained only at x = 5.
Self-check rubric: 4 checkpoints: identify the unrestricted median; apply the domain restriction; show increasing cost across both allowed regions; give value 23 and uniqueness.
Problem 5 · Transfer · When a weight changes the answer
For each positive real parameter t, find the minimum value and all minimisers of Ft(x) = |x + 2| + t|x − 1| + 2|x − 5| over real x.
Hint 1
Only the gap from 1 to 5 can change its direction of improvement as t changes.
Hint 2
In that gap the left weight is 1 + t and the right weight is 2, so the change per unit right is t − 1.
Complete solution
The fixed locations are −2, 1, 5, with positive weights 1, t, 2. Before −2, moving right decreases the cost. Between −2 and 1, the change per unit right is 1 − (t + 2) = −t − 1, still negative. After 5, moving right increases the cost by t + 3 per unit.
Between 1 and 5, the change per unit right is t − 1. If 0 < t < 1, it is negative, so the cost keeps decreasing until 5 and then increases. The unique minimiser is 5, with value 7 + 4t.
If t = 1, this middle interval is flat. At 1, the cost is 3 + 0 + 8 = 11, so every 1 ≤ x ≤ 5 attains the minimum 11. Values outside the interval are strictly larger.
If t > 1, the middle interval increases. The cost decreases up to 1 and increases thereafter, so 1 is the unique minimiser. Its value is again 11. These three cases include every positive t, including the equality threshold.
Self-check rubric: 5 checkpoints: sorted locations and positive domain; movement before and after the central gap; threshold t = 1; all minimiser sets including the whole tie interval; correct minimum values.
Problem 6 · Transfer · Work backwards from a desired median
Four equally weighted locations are −5, 0, 4, 9. Add a fifth location b, where b is real. For which values of b does x = 4 minimise the sum of the five distances? Is it then the unique minimising location?
Hint 1
For five equal weights, the third entry of the sorted list is the minimising coordinate.
Hint 2
If b < 4, how many of the five entries lie strictly below 4? If b ≥ 4, how many lie strictly below?
Complete solution
If b < 4, the three entries −5, 0, b are all strictly below 4. Consequently the third entry of the sorted list is also below 4. The unique odd-list median is not 4, so 4 cannot minimise the sum.
If b ≥ 4, exactly two entries, −5 and 0, lie strictly below 4. At least one entry equals 4, and neither b nor 9 is smaller. Thus the third entry is 4, including the case b = 4. The odd-median proof makes 4 the unique minimising location. Therefore the full answer is b ≥ 4, with uniqueness in every permitted case.
Self-check rubric: 4 checkpoints: treat b below 4; treat b at or above 4; include b = 4; justify uniqueness by the odd-list argument.
Problem 7 · Proof extension · One location outweighs all the others
Let a, b1, …, bn be real locations, where n is a positive integer. All weights w, v1, …, vn are positive and w > v1 + ⋯ + vn. Prove that F(x) = w|x − a| + v1|x − b1| + ⋯ + vn|x − bn| has unique minimum at x = a. Show by an example that replacing > by ≥ does not guarantee uniqueness.
Hint 1
Compare the cost at a general x directly with the cost at a. Moving a distance d can save at most d in the distance to any one other location.
Hint 2
Use |x − b| ≥ |a − b| − |x − a|, then multiply by each positive weight and add.
Complete solution
Set d = |x − a|. The triangle inequality gives |a − bi| ≤ |a − x| + |x − bi|. Rearranging yields |x − bi| − |a − bi| ≥ −d. In words, moving from a to x cannot shorten the distance to any other location by more than the move itself.
Multiply each inequality by its positive weight vi and add them. The contribution at a itself rises from zero to wd. Hence
F(x) − F(a) ≥ (w − v1 − ⋯ − vn)d.
The coefficient is positive by hypothesis. If x ≠ a, then d > 0, so F(x) > F(a). Equality is possible only at x = a, proving both minimality and uniqueness.
For the non-strict condition, take two locations 0 and 2, each with weight 1. The first weight equals the sum of the others, but |x| + |x − 2| = 2 for every 0 ≤ x ≤ 2. Thus equality of weights can give an interval of minimisers, and uniqueness is not guaranteed.
Self-check rubric: 5 checkpoints: compare F(x) with F(a); derive the distance-saving bound; multiply by positive weights and add; use strictness for x ≠ a; give a valid equality-case counterexample.
Problem 8 · Proof extension · Design every set of weights
Place positive integer weights p, q, r at locations 0, 4, 10, with p + q + r = 8. Find every ordered triple (p, q, r) for which the complete set of minimisers of p|x| + q|x − 4| + r|x − 10| is exactly 0 ≤ x ≤ 4. Prove your list is complete.
Hint 1
The cost must be constant throughout the open gap between 0 and 4.
Hint 2
In that gap the change per unit right is p − (q + r). Combine the condition that this is zero with the total weight 8.
Complete solution
If every point from 0 to 4 is a minimiser, any move entirely within that gap must leave the cost unchanged. Its change per unit right is p − q − r, so p = q + r. With p + q + r = 8, this gives p = 4 and q + r = 4.
Since q and r must be positive integers, the only possibilities are (p, q, r) = (4, 1, 3), (4, 2, 2), (4, 3, 1). This proves that no other triple can work; we still check that all three do.
Before 0, the cost strictly decreases towards 0. Between 0 and 4, its change is zero because p = q + r. Between 4 and 10, its change per unit right is p + q − r = 2q > 0. After 10, it increases by total weight 8 per unit. Thus for each listed triple the cost is constant exactly on 0 ≤ x ≤ 4, larger on either side, and the full minimiser set is exactly the required interval.
Self-check rubric: 5 checkpoints: use constancy for necessity; derive p = 4 and q + r = 4; list all three positive integer pairs; verify zero change on the target interval; prove strict increase away from it.
Problem 9 · Proof extension · Count roots without solving each one
For a real parameter k, determine the number of distinct real solutions of |x2 − 2| + |x2 − 5| + |x2 − 10| = k. Give every parameter case and explain the boundary values.
Hint 1
Put y = x2 ≥ 0. Locate the minimum of the resulting three-distance sum and evaluate it at y = 0.
Hint 2
The minimum is 8 at y = 5, while the value at y = 0 is 17. A positive y gives two real x values; zero gives one.
Complete solution
Put y = x2 ≥ 0 and let H(y) = |y − 2| + |y − 5| + |y − 10|. The median is 5, so H has unique minimum 10 − 2 = 8 there.
To keep the restricted domain visible, write the formulas: H(y) = 17 − 3y for 0 ≤ y ≤ 2; H(y) = 13 − y for 2 ≤ y ≤ 5; H(y) = y + 3 for 5 ≤ y ≤ 10; and H(y) = 3y − 17 for y ≥ 10. The adjoining formulas agree at their shared endpoints. Thus H strictly decreases from 17 to 8 on 0 ≤ y ≤ 5, then strictly increases without bound on y ≥ 5.
- If k < 8, no permitted y reaches that level, so there are 0 real solutions.
- If k = 8, only y = 5 works, giving x = ±√5: 2 distinct solutions.
- If 8 < k < 17, one y lies strictly between 0 and 5, and one lies strictly above 5. Both are positive, so each gives two signs: 4 solutions.
- If k = 17, the left value is y = 0, giving only x = 0. There is also one positive y on the increasing side, giving two more values: 3 solutions.
- If k > 17, the decreasing branch on the allowed domain never reaches the level. Only the increasing branch supplies a positive y, giving 2 solutions.
These cases cover every real k. In particular, the value at zero changes the count even though it is not the minimum level.
Self-check rubric: 6 checkpoints: preserve y ≥ 0; find minimum 8; find boundary level 17; justify monotonicity and one y on each relevant branch; convert positive and zero y correctly; state all five cases.
Before you call a proof complete
- State the variable’s domain and the positivity or integrality conditions on the weights.
- Sort the fixed coordinates and identify the relevant middle point, middle interval or half-weight threshold.
- Give a reason the proposed value cannot be improved: paired lower bounds, movement in each gap, or a direct inequality.
- Check attainment and every equality case. If you claim uniqueness, explain why all other locations cost more.
- For an equation, keep each candidate inside its sign region. After a substitution, translate the whole solution set back to the original variable.
Practise the decisions
This practice is free and needs no login. After Example 4, select Start with the basics below for a guided first question, or Check my starting point to begin at the core level if you already know the ideas. Either starts a round of six responses. Choose an answer, read the feedback, and follow a suggested lesson link if a step needs repair. You may use a hint or request the solution; then return to the question’s idea before continuing.
A completed round means six responses, including requested solutions. It does not certify mastery, six unaided correct answers, or the quality of a written proof. The starting checks and written problems above are separate from this adaptive round. After completion, retry a written problem without a hint, and use the return-to-paper option when you arrived from a paper.
Interactive practice loads here. You can also use the complete question set below.
Source and authorship
The preparation context uses the POSN 2026 Camp 1 mathematics scope. Its absolute-value and polynomial-equation topics motivate this lesson; the distance and weighted-median development is our original teaching sequence. Every question, numerical example, explanation and the number-line diagram on this page was created for IMOolympiad.com. No official problem has been reproduced, translated, or relabelled as an original mock. This independent resource does not claim POSN endorsement or official affiliation.
Continue with Thailand’s selection and study guide or choose another lesson. For a useful next attempt, take one error from your paper, explain the missing step aloud, complete a practice round, then retry that paper question.