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

I read this question the other day and it got me thinking: the area of a circle is $\pi r^2$, which differentiates to $2 \pi r$, which is just the perimeter of the circle.

Why doesn't the same thing happen for squares?

If we start with the area formula for squares, $l^2$, this differentiates to $2l$ which is sort of right but only half the perimeter. I asked my calculus teacher and he couldn't tell me why. Can anyone explain???

-
isn't $l$ more analogous to $D$ (diameter) and not $r$ (radius)? – Justin L. Jul 26 '10 at 8:26

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.

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

-
How beautiful! Thank you for sharing this, Larry. – Taylor Jun 23 '15 at 23:02

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.)

-

The area of a circle can be defined as a summation of infinite concentric circles which are infinitely small, each of radius $r$ perimeter $2\pi r$ where $r$ is a variable that changes from $0$ to $R$, where $R$ denotes the radius of the circle we defined.

So, obviously when the area of the circle is differentiated, you will find $dA$ equal to $2\pi rdr$ (It's not $2 \pi R$).

-