joint pdf of two random variables A pair of random variable $(X, Y)$ is uniformly distributed in the quadrilateral region with $(0,0),(a,0),(a,b),(2a,b)$, where $a,b$ are positive real numbers.

What is the joint pdf $f(X,Y.)$
Find the marginal probability density functions $f_X (x)$ and $f_Y (y)$.
Find $E(X)$and $E(Y)$.
Find $E(X,Y)$.

My understanding is the uniformly distributed pdf $=\frac1{\text{area}}=\frac1{ab}$.
It seems that $X$ and $Y$ are independent R.V. because it seems the joint pdf can be factored as $\frac1a \frac1b$ if the pdf is correct. However, after I found the marginal pdf $f_X=\frac2{a^2}; f_Y=\frac2{b}-\frac{2}{b^2}$, which shows $X, Y$ are not independent. If I can not get correct marginal pdf, I can not finish the question d and e. Could anyone help me out? Thank you!

Note that \begin{align}f_X(x) &= \int_{0}^b f_{X,Y}(x,y) \,dy \\
&= \begin{cases} \int_0^{\frac{b}{a}x} f_{X,Y}(x,y) \, dy  & , 0 \leq x \leq a \\
\int_{\frac{b}{a}x-b}^b f_{X,Y}(x,y) \, dy &,  a < x \leq 2a\end{cases}\end{align}
Recheck your value value for $f_Y$ as well. You should get a simpler expression. Notice that pdf should integrate to $1$ of which both of your proposed density functions have failed the test.
