College Algebra

Quadratic Optimization

Last updated: March 2026 · Advanced
Before you start

You should be comfortable with:

Real-world applications
💰
Retail & Finance

Discounts, tax, tips, profit margins

📐
Carpentry

Measurements, material estimation, cutting calculations

Quadratic functions model countless real-world situations: the revenue from selling a product, the area of a fenced region, the height of a thrown ball, the cost of manufacturing. Because every quadratic has a single vertex — a highest or lowest point — we can find the optimal value of any quantity modeled by a quadratic. This is quadratic optimization.

Why the Vertex Is the Key

A quadratic function f(x)=ax2+bx+cf(x) = ax^2 + bx + c has a parabola as its graph. The vertex of that parabola is the maximum or minimum point:

  • If a>0a > 0 (opens upward), the vertex is the minimum
  • If a<0a < 0 (opens downward), the vertex is the maximum

The xx-coordinate of the vertex is:

x=b2ax = -\frac{b}{2a}

The optimal value (the yy-coordinate) is f ⁣(b2a)f\!\left(-\frac{b}{2a}\right).

This formula comes from completing the square, which rewrites ax2+bx+cax^2 + bx + c as:

a ⁣(x+b2a) ⁣2+cb24aa\!\left(x + \frac{b}{2a}\right)^{\!2} + c - \frac{b^2}{4a}

The squared term is minimized (equals zero) when x=b2ax = -\frac{b}{2a}.

Completing the Square to Find the Vertex

Worked Example 1: Standard Form to Vertex Form

Convert f(x)=2x212x+7f(x) = 2x^2 - 12x + 7 to vertex form.

Step 1: Factor out the leading coefficient from the first two terms:

f(x)=2(x26x)+7f(x) = 2(x^2 - 6x) + 7

Step 2: Complete the square inside the parentheses. Half of 6-6 is 3-3; square it to get 99:

f(x)=2(x26x+99)+7=2(x3)218+7=2(x3)211f(x) = 2(x^2 - 6x + 9 - 9) + 7 = 2(x - 3)^2 - 18 + 7 = 2(x - 3)^2 - 11

Vertex: (3,11)(3, -11). Since a=2>0a = 2 > 0, this is a minimum.

Quick Formula Method

Using x=b2a=122(2)=124=3x = -\frac{b}{2a} = -\frac{-12}{2(2)} = \frac{12}{4} = 3:

f(3)=2(9)12(3)+7=1836+7=11f(3) = 2(9) - 12(3) + 7 = 18 - 36 + 7 = -11

Both methods confirm the vertex is (3,11)(3, -11).

Optimization Word Problems

The general strategy for quadratic optimization problems:

  1. Define variables and write the quantity to optimize as a function
  2. Express everything in one variable using the given constraint
  3. Find the vertex using x=b2ax = -\frac{b}{2a} or completing the square
  4. Interpret the result in context and check that it makes sense

Worked Example 2: Maximum Revenue

A company sells widgets at a price of pp dollars each. Market research shows that the number of units sold is n=80020pn = 800 - 20p. Find the price that maximizes revenue.

Step 1: Revenue = (price)(quantity): R(p)=p(80020p)=800p20p2R(p) = p \cdot (800 - 20p) = 800p - 20p^2.

Step 2: This is a quadratic in pp with a=20a = -20 (opens downward), so it has a maximum.

Step 3: p=b2a=8002(20)=80040=20p = -\frac{b}{2a} = -\frac{800}{2(-20)} = -\frac{800}{-40} = 20

Step 4: Maximum revenue: R(20)=800(20)20(400)=160008000=8000R(20) = 800(20) - 20(400) = 16000 - 8000 = 8000.

Answer: The optimal price is $20 per widget, producing a maximum revenue of $8,000. At this price, n=80020(20)=400n = 800 - 20(20) = 400 widgets are sold.

Worked Example 3: Maximum Area with Fixed Perimeter (Carpentry)

A carpenter has 60 feet of trim to frame a rectangular window. What dimensions maximize the area?

Step 1: Let xx = width. Then the perimeter constraint gives: 2x+2y=602x + 2y = 60, so y=30xy = 30 - x.

Step 2: Area: A(x)=x(30x)=30xx2A(x) = x(30 - x) = 30x - x^2.

Step 3: x=302(1)=15x = -\frac{30}{2(-1)} = 15 feet, so y=3015=15y = 30 - 15 = 15 feet.

Step 4: Maximum area: A(15)=15(15)=225A(15) = 15(15) = 225 square feet.

Answer: A square window (15 ft by 15 ft) maximizes the area at 225 sq ft. This confirms the classic result: among all rectangles with a given perimeter, the square has the greatest area.

Worked Example 4: Minimum Cost (Engineering)

A manufacturer’s cost function is C(x)=0.01x28x+3000C(x) = 0.01x^2 - 8x + 3000, where xx is the number of units produced daily.

Step 1: Here a=0.01>0a = 0.01 > 0, so the parabola opens upward — the vertex is a minimum.

Step 2: x=82(0.01)=80.02=400x = -\frac{-8}{2(0.01)} = \frac{8}{0.02} = 400 units.

Step 3: Minimum cost: C(400)=0.01(160000)8(400)+3000=16003200+3000=1400C(400) = 0.01(160000) - 8(400) + 3000 = 1600 - 3200 + 3000 = 1400.

Answer: Producing 400 units daily minimizes the cost at $1,400.

Worked Example 5: Three Sides of Fencing

A farmer needs to fence a rectangular area along a river (no fence needed on the river side). With 200 meters of fencing, what dimensions maximize the enclosed area?

Step 1: Let xx = the side perpendicular to the river (two of these). Then the side parallel to the river is 2002x200 - 2x.

Step 2: Area: A(x)=x(2002x)=200x2x2A(x) = x(200 - 2x) = 200x - 2x^2.

Step 3: x=2002(2)=50x = -\frac{200}{2(-2)} = 50 meters. The parallel side is 2002(50)=100200 - 2(50) = 100 meters.

Step 4: Maximum area: A(50)=50(100)=5000A(50) = 50(100) = 5000 square meters.

Answer: The optimal pen is 50 m by 100 m, enclosing 5,000 sq m.

Worked Example 6: Projectile Motion

A ball is launched upward from a 48-foot platform with an initial velocity of 64 ft/s. Its height is h(t)=16t2+64t+48h(t) = -16t^2 + 64t + 48.

Maximum height time: t=642(16)=6432=2t = -\frac{64}{2(-16)} = \frac{64}{32} = 2 seconds.

Maximum height: h(2)=16(4)+64(2)+48=64+128+48=112h(2) = -16(4) + 64(2) + 48 = -64 + 128 + 48 = 112 feet.

When does it hit the ground? Set h(t)=0h(t) = 0:

16t2+64t+48=0    t24t3=0-16t^2 + 64t + 48 = 0 \implies t^2 - 4t - 3 = 0

t=4±16+122=4±282=2±72±2.646t = \frac{4 \pm \sqrt{16 + 12}}{2} = \frac{4 \pm \sqrt{28}}{2} = 2 \pm \sqrt{7} \approx 2 \pm 2.646

Taking the positive root: t4.646t \approx 4.646 seconds.

Second Derivative Test Preview

In calculus, you will learn that the second derivative of f(x)=ax2+bx+cf(x) = ax^2 + bx + c is f(x)=2af''(x) = 2a. This constant tells you the concavity:

  • f(x)=2a>0f''(x) = 2a > 0: concave up, so the critical point is a minimum
  • f(x)=2a<0f''(x) = 2a < 0: concave down, so the critical point is a maximum

This is exactly what the sign of aa already tells you in the quadratic case, but the second derivative test generalizes to all differentiable functions — not just quadratics.

Common Mistakes

  1. Forgetting domain restrictions. If xx represents a physical quantity (like length), it must be positive. Always check that your optimal xx-value is in the feasible domain.

  2. Confusing xx and yy in the answer. The problem asks for dimensions, not just the vertex coordinates. Translate back to the original variables.

  3. Not checking the sign of aa. The vertex is a maximum only when a<0a < 0, and a minimum only when a>0a > 0.

Practice Problems

Test your understanding with these problems. Click to reveal each answer.

Problem 1: Find the vertex of f(x)=3x2+18x5f(x) = -3x^2 + 18x - 5 and state whether it is a maximum or minimum.

x=182(3)=186=3x = -\frac{18}{2(-3)} = -\frac{18}{-6} = 3

f(3)=3(9)+18(3)5=27+545=22f(3) = -3(9) + 18(3) - 5 = -27 + 54 - 5 = 22

Since a=3<0a = -3 < 0, the vertex (3,22)(3, 22) is a maximum.

Answer: Vertex is (3,22)(3, 22), a maximum.

Problem 2: A store sells T-shirts at a price of pp dollars. The demand function is n=50025pn = 500 - 25p. Find the price that maximizes revenue.

R(p)=p(50025p)=500p25p2R(p) = p(500 - 25p) = 500p - 25p^2

p=5002(25)=10p = -\frac{500}{2(-25)} = 10

R(10)=500(10)25(100)=50002500=2500R(10) = 500(10) - 25(100) = 5000 - 2500 = 2500

Answer: Price = $10 per shirt, maximum revenue = $2,500 (selling 250 shirts).

Problem 3: A rectangular garden has one side against a house wall (no fence needed). If 40 meters of fencing is available, find the dimensions that maximize the area.

Let xx = side perpendicular to house (two sides). Parallel side = 402x40 - 2x.

A(x)=x(402x)=40x2x2A(x) = x(40 - 2x) = 40x - 2x^2

x=402(2)=10x = -\frac{40}{2(-2)} = 10 m. Parallel side = 4020=2040 - 20 = 20 m.

A(10)=10(20)=200A(10) = 10(20) = 200 sq m.

Answer: 10 m by 20 m, maximum area 200 sq m.

Problem 4: The profit function of a company is P(x)=0.5x2+60x800P(x) = -0.5x^2 + 60x - 800, where xx is the number of units sold. Find the number of units that maximizes profit and the maximum profit.

x=602(0.5)=601=60x = -\frac{60}{2(-0.5)} = -\frac{60}{-1} = 60 units

P(60)=0.5(3600)+60(60)800=1800+3600800=1000P(60) = -0.5(3600) + 60(60) - 800 = -1800 + 3600 - 800 = 1000

Answer: 60 units for a maximum profit of $1,000.

Problem 5: Two numbers have a sum of 24. Find the two numbers whose product is a maximum.

Let xx be one number. The other is 24x24 - x.

P(x)=x(24x)=24xx2P(x) = x(24 - x) = 24x - x^2

x=242(1)=12x = -\frac{24}{2(-1)} = 12

The other number is 2412=1224 - 12 = 12. Product = 144144.

Answer: Both numbers are 12, with a maximum product of 144.

Key Takeaways

  • The vertex of a quadratic f(x)=ax2+bx+cf(x) = ax^2 + bx + c occurs at x=b2ax = -\frac{b}{2a}
  • If a>0a > 0, the vertex is a minimum; if a<0a < 0, the vertex is a maximum
  • For optimization problems: define the objective function, use constraints to reduce to one variable, then find the vertex
  • Among rectangles with a fixed perimeter, the square has the maximum area
  • Among rectangles with three sides fenced, the optimal width is half the length
  • Always check that the optimal solution lies within the physically meaningful domain
  • The second derivative test (f(x)=2af''(x) = 2a) extends the vertex analysis to calculus

Return to College Algebra for more topics in this section.

Last updated: March 29, 2026