How does one generally find a joint distribution function (or density) from marginals when there is dependence?

So I know one can go from a joint density function $f(x,y)$ to marginal density functions, like $f_x(x)$ by integrating against the other variables as in $f_x(x) = \int f(x,y) dy$...but given $f_x(x)$ and $f_y(y)$ as densities for dependent random vars..how would one go about finding a joint density or distribution function?

Thanks


For example, suppose the marginal densities for $X$ and $Y$ are both 1 on the interval $[0,1]$, 0 otherwise. One family of possibilities for the joint density is $f(x,y) = 1 + g(x) h(y)$ for $0 < x < 1$, $0 < y < 1$, 0 otherwise, for functions $g$ and $h$ such that $\int_0^1 g(x)\, dx = \int_0^1 h(y)\, dy = 0$, $-1 \le g(x) \le 1$ and $-1 \le h(y) \le 1$. And there are infinitely many other possibilities.


There will be many different distributions with the same marginal distributions, so one needs to select a specific way to aggregate the marginal distributions into joint distributions. Assuming they are independent is essentially making one of these possible choices. The most common way to make the choice, is by working with a copula.