The total cost of operating a factory is
.
The avearage cost per unit is 
Apply derivative with respect to
.

Find the relative extremas by equating the first derivative to zero.
\
So the factory have minimum average cost at
units.
The factory have minimum average cost at
units.