Simulation of non-uniform distribution with uniform distribution
Most programming language (e.g. C, C++ and Java) and statistical software (e.g. Minitab and SAS) provides uniform random number generator. (slides 6 to 12).
If analytic method can solve the equation so that you can get where u is a uniform r.v. and x is a non-uniform r.v.
then you can simulate non-uniform distribution P(x) with uniform distribution.