= Solution
Independently generate $U$ uniform on $(0,1)$ and $V$ uniform on $(b_1,b_2)$, using the bounds above. Accept the proposal if
$$
U^2\leq\exp\left(-\frac{|V/U-1|}{2}\right);
$$
otherwise generate a fresh pair. On acceptance return $X=V/U$. The bounding rectangle contains the entire ratio region: $U\leq\sqrt{h(X)}\leq a$, and $V=XU$ lies between the extrema of $x\sqrt{h(x)}$. Conditioning a uniform rectangle point on acceptance makes it uniform on $C_h$, so the preceding <marginal distribution> calculation proves that the returned value has the desired <Laplace distribution>.
For this target $H=4$, so the region has area two. The <rejection sampling> acceptance <probability> is
$$
\boxed{\frac{2}{4(e^{-3/4}+e^{-5/4})}=\frac{1}{2(e^{-3/4}+e^{-5/4})}.}
$$
Endpoints have zero <probability> and can be excluded to avoid divisions by zero in implementation.
Back to article page