For a circle the perimeter is replaced with the circumference. And the area is the integral of the circumference, which makes sense
$ C = 2\pi r $
$ A = \int dr C = \int dr 2\pi r = \frac{1}{2} 2 \pi r^2 = \pi r^2 $
However, if we try to do this for a square we get
$ P = 4L $
$A = \int P dL = \int dL (4L) = 4 \left( \frac{1}{2} L^2 \right) = 2L^2 $
Which is not the area of the square
$A = L^2$
In fact it differs by a factor of 2. Why? It makes complete sense for the area to be the integral of the perimetre as it is the boundary and the integral of the boundary is the area but apparently it's not the case. What is the mathematical reason for this?


Let $\delta$ be an infintessimally small positive number, and let $L$ and $r$ all be positive numbers.
Let $S$ be a square where the sides have length $L$ and where $S$ is centered at the origin, and let $S'$ be a square where the sides have length $L+\delta$ and where $S'$ is centered about the origin. What What is the area of $S'\setminus S$? Well, the corners of $S$ are at $\Big(\pm \frac{L}{\color{red}{2}}, \pm \frac{L}{\color{red}{2}} \Big)$, while the corners of $S'$ are at $\Big(\pm \frac{L+\delta}{\color{red}{2}}, \pm \frac{L+\delta}{\color{red}{2}} \Big)$. This implies that the area of $S' \setminus S$ is about $4 \times L \times \frac{\delta}{\color{red}{2}}$ $=2L$ $=$ $\frac{P \delta}{\color{red}{2}}$, where $P=4L$ is the perimeter of $S$. Can you use this to make a correction in your OP? In particular, can you note that the area $A$ of a square where the sides have length $L_0$ satisfies $A = \int_0^{L_0} 4L (\frac{dL}{2})$, instead of $\int_0^{L_0} 4L dL$ as you had?
Compare this to the area of $C' \setminus C$, where $C'$ is a circle of diameter $\ell'=2r+\delta$ [and thus radius $r'=r+\frac{\delta}{2}$] centered at the origin, and $C$ a circle of diameter $\ell=2r$ [and thus radius $r$] centered at the origin. Note that the area of $C' \setminus C$ is about $(2\pi r) \frac{\delta}{\color{red} 2}$, or equivalently, $\frac{\ell \pi \delta}{\color{red}{2}}$. Can you note that the area $A$ of the circle of radius $r_0$ and equivalently diameter $\ell_0=2r_0$ is satisfies the equation $A=\int_0^{\ell_0} (\pi \ell) \frac{d\ell}{2}$ $= \int_0^{2r_0} (\pi \ell) \frac{d\ell}{2}$? Just as $A$ also satisfies the equation $A=\int_0^{r_0} (2\pi r) dr$?