Why does area differentiate to perimeter for circles and not for squares?

Actually, it is also true for squares (and for regular polygons in general!). The problem you ran into is what the equivalent of "r" is. The side length of a square is actually more comparable to the circle's diameter.

Instead, the correct analogue of the circle's radius is the distance from the center of the square to the midpoint of one side, which is only half as long as the square's side.

alt text

Here, we have $A = (2r)^2 = 4 r^2$ and $P = 4 (2r) = 8 r$. The perimeter is the derivative of the area with respect to $r$, just as in the case of a circle.


If you use the formula you describe for squares, your measurements are coming from one corner of the square. Imagine those measurements growing slowly. The square will grow, but only along the two sides opposite the corner from which you measured, so the derivative of the area formula is only the perimeter on those two sides.

Alternately, consider measuring the size of a square by the distance d from its center to the midpoint of a side. This would make the side length 2d, the perimeter 8d and the area 4d^2. Now, the derivative of the area is the perimeter. (Also, if you imagine growing the square slowly with this measurement, it grows from the center outward, growing on all four sides.)