# 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???

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.