Maths WorkshopMaths problems with full solutions
Exercise 163Calculus › Single-variable calculus › Differentiation › Optimisation and curve sketchingHigh schoolAdded 4 Nov 2026

Extrema of |x² − 3x + 2| on [0, 3]

#absolute value#global extrema#non-differentiable points

Statement

Find the maximum and minimum of f(x)=∣x2−3x+2∣f(x)=|x^2-3x+2| on [0,3][0,3]. Where is ff not differentiable?

Hint

Factor: x2−3x+2=(x−1)(x−2)x^2-3x+2=(x-1)(x-2). Remove the absolute value interval by interval.

Show solutionHide solution

Solution

Without the absolute value.
- On [0,1]∪[2,3][0,1]\cup[2,3], (x−1)(x−2)≥0(x-1)(x-2)\ge0 and f(x)=x2−3x+2f(x)=x^2-3x+2 (decreasing on [0,1][0,1] from 22 to 00; increasing on [2,3][2,3] from 00 to 22).
- On [1,2][1,2], f(x)=−(x2−3x+2)f(x)=-(x^2-3x+2), which rises from 00 at x=1x=1 to its maximum 14\frac14 at x=32x=\frac32, then falls back to 00 at x=2x=2.

Extrema.
- Minimum: f=0f=0, attained at x=1x=1 and x=2x=2.
- Maximum: 22, attained at the endpoints x=0x=0 and x=3x=3 (the interior local maximum 14\frac14 at 32\frac32 is much lower).

Non-differentiable points. At x=1x=1 and x=2x=2, where the expression inside the absolute value changes sign. At x=1x=1 the left derivative is −1-1 and the right derivative is +1+1; the same holds at x=2x=2 (left −1-1, right +1+1). Both are corners.

Remark. The minima occur *exactly at the points where ff is not differentiable*. This is why the theorem "an extremum of a differentiable function has zero derivative" requires differentiability at the extremum.