A student asks,
I am trying to prove that the area inside an n-gon differentiated is the perimeter of the n-gon.
MathHelp replies,

This is true, if you consider both the perimeter, P, and area, A, to be functions of the apothem, a. The reason you need a to be the independent variable is that the perimeter (every side, that is) is perpendicular to a. Therefore, loosely speaking, the infinitessimal da multiplied by the perimeter, P, is the infinitessimal dA. Imagine lots and lots of very thin rectangles of width da, and length P wrapped around the polygon, and you can start to see how they "add up" (in the limit as the width goes to zero) to the area of the polygon.

To prove this, consider the simplest formula for the area of a polygon:

A = (1/2) n s a,

where n = number of sides, s = side length, and a = apothem. Expressing s in terms of a, we get

s = 2a tan(π/n)

which is evident by looking at the right triangle formed by the apothem and half of one side of the polygon. Substituting this formula for s into the formula, above, for A, we get

A = n a2 tan(π/n)

Differentiating A with respect to a, we get

dA/da = 2na tan(π/n),

which, indeed, is the perimeter of the polygon.