Consider some function $f(E_{1},E_{2})$, say $$ \tag 1 f(E_{1},E_{2}) = \exp[-E_{1}^{3}+E_{2}^{2}] $$ I want to generate random $n$ points $E_{1}$, $E_{2}$ using this function as weights, with an extra condition for the domain of definition of $E_{1},E_{2}$: $$ \tag 2 E_{1}\ge m_{1},\quad E_{2}\ge m_{2}, \quad E_{3} \equiv m-E_{1}-E_{2} \ge m_{3} $$ $$ \tag 3 -1 <\frac{\sqrt{E_{3}^{2}-m_{3}^{2}}-\sqrt{E_{1}^{2}-m_{1}^{2}}-\sqrt{E_{2}^{2}-m_{2}^{2}}}{2\sqrt{E_{1}^{2}-m_{1}^{2}}\sqrt{E_{2}^{2}-m_{2}^{2}}} < 1, $$ where $m,m_{1-3}$ are real positive constants which are known, $m>m_{1}+m_{2}+m_{3}$.

I expect that this may be done using RandomVariate command. However, I face two complications: first, I don't know syntax allowing to use f as the distribution function in RandomVariate, second, I don't know how to implement the domain of definition $(2),(3)$ in RandomVariate.

The example of parameters is m = 10, m1 =2, m2 = 0.5, m3 = 0.1.

Could you please help me with this?

P.S. The second problem may be avoided if just setting f to be zero outside of the range $(1),(2)$. Then, probably, my question may be rephrased on how to create symbolic distribution using Eqs. $(1)-(3)$.

  • $\begingroup$ What is $E_3$? Are $m, m_1, m_2, m_3$ some known numerical constants? $\endgroup$
    – Domen
    Dec 1 '21 at 20:30
  • $\begingroup$ @Domen : thanks, the question contained typos and had to be expanded by providing more information. I have fixed them, $E_{3} \equiv m - E_{1}-E_{2}$. $m,m_{1-3}$ are real positive constants that are known. $\endgroup$ Dec 1 '21 at 20:33
  • $\begingroup$ Can you provide concrete values for $m,m_1,m_2,m_3$? $\endgroup$
    – Chris K
    Dec 2 '21 at 4:20
  • $\begingroup$ @ChrisK: say, m = 10, m1 =2, m2 = 0.5, m3 = 0.1. $\endgroup$ Dec 2 '21 at 7:45
  • $\begingroup$ Unfortunately, this may not be straightforward given Mathematica's current abilities. See this Q&A for more details, and for a strategy about how to cajole Mathematica into doing what you want. $\endgroup$ Dec 2 '21 at 16:11