I'm currently reading chapter 4 of Mas-Colell, Whinston, and Green (1995). I have a problem with the way integrals are treated. For instance, Proposition 4.C.4 (p.113) states that when wealth is uniformly distributed on $[0,W]$, the aggregate and the average demand function are: $$x(p) = \int_0^W x(p,w) dw $$
Where $x(p,w)$ is an individual demand (every individual has the same preferences, their demands only differ in the amount of wealth).
However, I think the right way to write the average would be: $$x(p) = \int_0^W \frac1W x(p,w) dw $$ because this is the definition of the expected value.
Am I wrong? When using integrals, can I just assume that averages are equal to aggregates? This a big problem to me because in exercise 4.C.10 it is asked to prove that $$C(p,w)=\int_0^W S(p,w)dw - S(p,W)=-D_w x(p).x^T(p)+\int_0^WD_w x(p,w).x^T(p,w)dw$$ is positive definite, where $S(p,w)$ are individual Slutsky matrices, and $S(p,W)$ is the Slutsky matrix of aggregate demand.
I thought to define $w=aW$ with $a$ uniformly distributed on some interval. Therefore, I could re-define $x(p)=x(p,W)$ and differentiate $x(p)=x(p,W)$ and $x(p,w)=x(p,aW)$ with respect to $W$. However, I'm not sure how to define an interval for $a$ such that average wealth is equal to aggregate wealth using $w=aW$.
Note: Proposition 4.C.4 is based on an example given by Hildebrand (1983) ("On the Law of Demand"). I read the article and he assumes wealth is distributed on $[0,1]$. With this interval, aggregate demand is equal to average demand. Does this mean Proposition 4.C.4 is misspelled? If it is so, I still have a problem with exercise 4.C.10 because I need an interval for a such that aggregate wealth is equal to average wealth.