Quadratic Optimization and Applications
Quadratic optimization means finding the largest or smallest value of a quantity that is described by a quadratic function, and the answer is the vertex of the parabola. In brief: a farmer with 40 m of fence who builds a rectangular pen of width x has the area A(x) = x(20 − x) = −x2 + 20x. The vertex is at x = 10, so the largest area is 100 m2, a square of side 10 m.
Many real problems have a trade-off: increasing one factor reduces another. When the combined effect is quadratic, the maximum or minimum is found exactly with the vertex formula x = −b/(2a), without calculus. This guide gives a four-step method and worked examples from geometry, projectile motion, business and numbers, and a table of typical models.
How do you solve an optimization problem step by step?
- Define the variable and write down what must be maximised or minimised.
- Use the constraint to express the quantity as a function of one variable.
- Check that the function is quadratic and note the allowed values of the variable (the domain).
- Find the vertex: x = −b/(2a) and the value there. If a < 0 it is a maximum and if a > 0 a minimum.
- Check that the vertex lies in the domain. Otherwise the extreme value is at an endpoint.
- Answer the question in words with units.
How do you optimize areas and lengths?
Example 1: the pen against a wall
A farmer has 60 m of fence and builds a rectangular pen using a wall as one side, so only three sides need a fence. Let x be the length of each of the two sides perpendicular to the wall. The side parallel to the wall is 60 − 2x. The area is A(x) = x(60 − 2x) = −2x2 + 60x. The domain is 0 < x < 30. The vertex is at x = 60/4 = 15, and A(15) = 15 · 30 = 450 m2. The best pen is 15 m by 30 m.
Example 2: minimizing a sum of squares
A wire of length 20 cm is cut into two pieces and each is bent into a square. Let the first piece be x. The sides are x/4 and (20 − x)/4. The total area is S(x) = x2/16 + (20 − x)2/16 = (2x2 − 40x + 400)/16. The vertex is at x = 10: the smallest total area is (200 − 400 + 400)/16 = 12.5 cm2, with two equal squares. The largest area, on the interval [0, 20], occurs at an endpoint: S(0) = S(20) = 25 cm2.
How do you find the maximum height of a projectile?
Ignoring air resistance, the height of an object thrown upward with speed v0 from height h0 is h(t) = −(g/2)t2 + v0t + h0, with g ≈ 9.8 m/s2.
Example 3
A ball is thrown upward at 19.6 m/s from a height of 2 m: h(t) = −4.9t2 + 19.6t + 2. The vertex is at t = 19.6/9.8 = 2 s, and h(2) = −19.6 + 39.2 + 2 = 21.6 m. The ball hits the ground when h(t) = 0: t = (19.6 + √(19.62 + 4 · 4.9 · 2))/9.8 = (19.6 + √(384.16 + 39.2))/9.8 = (19.6 + 20.58)/9.8 ≈ 4.10 s.
How do you optimize revenue and profit?
Example 4: pricing
A shop sells 200 items per week at 10 dollars. For every 0.50 dollar increase, it sells 10 fewer items. Let x be the number of 0.50-dollar increases. The price is 10 + 0.5x and the quantity is 200 − 10x. The revenue is R(x) = (10 + 0.5x)(200 − 10x) = 2000 − 100x + 100x − 5x2 = 2000 − 5x2. The maximum is at x = 0: the best price is the current one, with revenue 2,000 dollars. If instead a cost of 6 dollars per item is considered, the profit is P(x) = (4 + 0.5x)(200 − 10x) = 800 − 40x + 100x − 5x2 = −5x2 + 60x + 800. The vertex is at x = 6, so the price is 13 dollars and the profit is P(6) = −180 + 360 + 800 = 980 dollars.
Example 5: ticket price
A theatre with 500 seats sells all seats at 20 dollars. For each 1 dollar increase, 10 fewer tickets are sold. With x the increase, R(x) = (20 + x)(500 − 10x) = −10x2 + 300x + 10,000. The vertex is at x = 15, so the price is 35 dollars and the revenue is 12,250 dollars with 350 tickets sold.
How do you handle problems about numbers?
Example 6
Two numbers have a sum of 24. What is the largest possible product? Let the numbers be x and 24 − x. The product is P(x) = x(24 − x) = −x2 + 24x, with a maximum at x = 12: the product is 144. For the smallest sum of squares, x2 + (24 − x)2 = 2x2 − 48x + 576, the minimum is at x = 12 with value 288.
Typical quadratic models
| Situation | Model | Optimal x | Optimal value |
|---|---|---|---|
| Pen along a wall, 60 m of fence | x(60 − 2x) | 15 | 450 m2 |
| Rectangle with perimeter 40 m | x(20 − x) | 10 | 100 m2 |
| Two numbers with sum 24 | x(24 − x) | 12 | 144 |
| Ball thrown at 19.6 m/s | −4.9t2 + 19.6t + 2 | 2 s | 21.6 m |
| Theatre tickets | (20 + x)(500 − 10x) | 15 | 12,250 dollars |
Where do these problems come from?
Extremal problems, such as finding the rectangle with the largest area for a given perimeter, appear in ancient Greek mathematics, and the Greek geometers proved that the square is the best rectangle. Methods of finding maxima by algebra were developed by Fermat in the seventeenth century, shortly before calculus. The parabolic path of projectiles, found by Galileo, connected optimization with motion.
Where else is quadratic optimization used?
Engineers minimise material for a given volume and choose an angle for the longest throw, which for ground-level launch is 45° in a vacuum. Statisticians fit lines by minimising sums of squared errors, which is a quadratic minimisation problem. Machine learning uses quadratic loss functions for the same reason. For optimization with more complex functions, calculus is needed.
Which mistakes are common?
Choosing a variable that does not allow one-variable modelling
Use the constraint to remove the second variable before looking for the vertex.
Ignoring the domain
If the vertex lies outside the allowed values, compare the values at the endpoints.
Answering with x instead of the question’s quantity
The question may ask for the maximum area or the best price, not for the value of x.
Mixing up the maximum and the position
The position of the maximum is the x-coordinate of the vertex, and the maximum value is the y-coordinate.