Area expressions in terms of its dimensions (This question is about area, but the same thing fully applies to volume)
Whenever I was finding an area of a shape / geometric figure - triangle, square, circle, ellipse etc - I always had this understanding that if I express the final result in terms of 1D components of that shape, it must always result in a degree 2 polynomial.
The best example here would be a triangle since there are a lot of ways to get its area:
$$S=\frac{1}{2}ab\cdot sinA = \frac{1}{2}ah = \sqrt{s(s-a)(a-b)(a-c)}$$
All of them are degree 2 polynomials in the end, even if the components aren't exactly "degree 1 things" - like Heron's formula is a product of 4 "degree 1/2" components, yet in the end it sums up to 2. Also, standard trigonometric functions are all "degree 0" because by definition any such function is just a quotient of two sides of a right triangle, so has "degree 0"
I'm asking this because of a "counter example" I recently encountered. That one is the area of a shape in its polar form defined by:
$$r=\theta , 0\le\theta\le2\pi$$
That shape will have its area equal to $\frac{1}{6}{\theta}^{3}|_0^{2\pi}=\frac{4}{3}{\pi}^3$ (thanks bprp!). Now I'm not concerned about the last expression featuring ${\pi}^3$ - it's just a constant. But the integral from which that is derived definitely results in a cubic, not a quadratic form in terms of $\theta$
I know I'm very loose here with defining things - I'm not a mathematician, it's just about my intuition. Perhaps, this is the reason I'm having this question in the first place. And the question is this:

*

*Are there cases when a 2D shape will not have its area to be a quadratic polynomial in terms of its 1D components?

*What can be counted as "proper" 1D components of a 2D shape?

*Do polar coordinates have some differences (like the one above)?

 A: A physics course would clear this up for you. This is sometimes called dimensional analysis, and it is really useful in helping make sure you have the right formula: if the units of measure don't match up, you've made a mistake.
As a general rule of thumb, physical measurements are not raw numbers. Instead, they come with units attached. The distance between two points is not $1$ or $2$, but $1$ meter, or $1$ inch, or $1$ femto-light-second, or some other unit of measure of length. The time between two events might be $1$ second, or $1$ hour, or $1$ year. It is never just "$1$".
An exception to this is the measure of angles. This is because we define the radian measure of angle by drawing a circle about the vertex of the angle, and dividing the length of the arc subtended by the angle by radius of the circle:
$$\theta = \frac cr$$
Where $c$ is the length of the arc, and $r$ is the radius of the circle. But $c$ and $r$ are both lengths. So if we measure them in meters, for example, we might get something like
$$\theta = \frac{1.5\text{ meters}}{1\text{ meters}} = 1.5 \frac{\text{meters}}{\text{meters}} = 1.5,$$
a pure number. So as long as you are using radians, the measure of an angle is a pure number.
Units of measure have certain rules that they obey:

*

*Units can be multiplied or divided, and cancelled in ratios just like they were variables. Thus area is measured in units of length$^2$, volume in units of length$^3$, velocity in units of $\frac{\text{length}}{\text{time}}$, etc.

*Two quantities can only be added or subtracted if they are measured in the same units. Thus while it makes sense to talk about $\text{centimeters}^2$, $\text{inch pounds}$, and $\frac{\text{meters}}{\text{second}}$, it does not make sense to talk about $\text{meters }+\text{ seconds}$ or $\text{kilograms }-\text{ meters}$. (This is a deep fact, and I don't know if anyone has adequately explained it in all circumstances. But rest assured, it is never broken unless someone does so artificially.)

*Combining those rules, polynomial functions can act on arguments measured with a given unit of measure, but the coefficient for each term of the polynomial must convert the terms to the same unit of measure for the output before the terms can be added together. For example, in the ballistic equation
$$y = -gt^2 +v_0t + y_0$$
where

*

*$t$ is time, measured in seconds,

*$y$ is the height of the particle at time $t$, in meters,

*$g = 9.8\frac{\text{m}}{\text{s}^2}$ is the acceleration due to gravity,

*$v_0$, in $\frac{\text{m}}{\text{s}}$ is the upwards velocity of the particle when $t = 0 \text{ s}$,

*$y_0$ is the height of the particle in meters when $t = 0 \text{ s}$,



$\phantom{WW}$notice that the $y_0$ term is in meters ($\text{m}$), the $v_0t$ term is in $\frac{\text{m}}{\text{s}}\text{s} = \text m$, and the $-gt^2$ term is in $\frac{\text{m}}{\text{s}^2}\text{s}^2 = \text m$.
So all three terms are in $\text{m}$ before they are added together.

*

*Transcendental functions (trig functions, exponentiation, logarithms) only take pure numbers as arguments and only give pure numbers as output. One has to multiply values with units by conversion factors that remove those units before they can be used as arguments in these functions.

*Since differentials represent infinitesimally small differences between two values of the same variable, they carry the same units that the variable does. Derivatives are the ratios of two differentials, so their units are the ratios of the units of the two variables. For example, if $s$ is measured in meters and $t$ is measured in seconds, then $\frac{ds}{dt}$ is measured in $\frac{\text{m}}{\text{s}}$.

*Integrals are the sums of the product of the integrand by the differential of the variable, so they will be measured in the product of the units of the integrand and the variable. For example, if $v(t)$ is measured in $\frac{\text{m}}{\text{s}}$ and $t$ is measured in seconds, then $\int v(t)\,dt$ is measured in $\frac{\text{m}}{\text{s}}\text{s} = \text{m}$.


So how does this apply to your example? The handling of units by the mathematical operations themselves was completely correct. But how you set up the problem didn't make sense. Your definition of $r$ was
$$r = \theta, \quad 0 \le \theta < 2\pi$$
But $\theta$ measures an angle in radians, while $r$ measures a distance. As discussed, this makes $\theta$ a pure number without any units. But $r$ has to be measured with some unit of length. Because this definition violates the rules of units, everything you derive from it is likely to violate the rules of units also. And that is exactly what happened.
As Ng Chung Tak points out, how you fix this is to put in a conversion constant to explain how the radians of $\theta$ are converted to the meters of $r$:
$$r = a\theta$$
where $a$ is some constant with units of $\frac{\text{meters}}{\text{radians}}$ or just meters, since radians are not a true unit. Now
$$A = \iint r\,d\theta\,dr$$
Note that $r$ has units of meters, as does $dr$, while $d\theta$ has no units. So $A$ will have units of $\text{m}^2$. Iterating the integral,
$$\begin{align}A &= \int_0^{2\pi}\int_0^{a\theta}r\,dr\,d\theta\\
&=\int_0^{2\pi}\left.\frac{r^2}2\right|_0^{a\theta}\,d\theta\\
&=\frac{a^2}2\int_0^{2\pi}\theta^2\,d\theta\\
&=\frac{a^2}2\left.\frac{\theta^3}3\right|_0^{2\pi}\\
&=\frac{4\pi^3}3a^2\end{align}$$
And if you check the dimensions on every step, you will see that they always come out as $\text{m}^2$.
