# Let $(X,Y)$ be a uniformly chosen point of a region $A$, given $A$ compute $EX$

Let $$(X,Y)$$ be a uniformly chosen point of a region $$A \subset \mathbb{R}^2$$

Given we have the following joint pdf:

$$f(x,y) = \begin{cases} \dfrac{a}{ \text{area of}~ A} & (x,y)\in A \\ 0 & \text{else} \end{cases}$$

And Let $$A = {(x,y),|y| \leq x \cdot e^{-x}}$$

the provided solutions state that A is 2 and it computes

$$EX = \int_{0}^{\infty} \int_{-xe^{-x}}^{e^{-x}} \frac{x}{2} dydx = \int_{0}^{\infty} x^2 e^{-x} = 2$$

Not that doesn't make sense to me:

1) how is the area of $$A = 2$$ , when the graph of $$|y| = x e^{-x}$$ looks like this:

The area of $$A$$ is given by $$\int_0^\infty xe^{-x}-(-xe^{-x})\, dx=2\int_0^\infty xe^{-x}\, dx=2.$$ To see that $$\int_0^\infty xe^{-x}\, dx=1$$ use integration by parts. Indeed, $$\int_0^\infty xe^{-x}\, dx=-xe^{-x}]_{0}^\infty+\int_0^\infty e^{-x}\, dx=0+1=1.$$