title: Generate Random Mathematical Functions
body: <p>This is kind of a weird question, and might not be entirely appropriate for Stack Overflow, but I couldn't find anything about it online, so here it is...</p>
  
  <p>Is there a way (or what is the best way) to generate random mathematical functions?  By this I don't mean that I want a function that generates a random number (line an RNG), but rather I want to dynamically create some function which which maps one or more real inputs from a domain to a single output using some mutate-able rules.</p>
  
  <p>For example, in the simplest case, I could just generate a function of the form <code>f(x1,x2) -&gt; Y</code> by applying a random operator to x1 and x2.  For example f could be:</p>
  
  <pre><code>   f = x1 + x2
  or f = x1 - x2
  or f = x1 * x2
  etc...
  </code></pre>
  
  <p>However, I would like to be able to include more complex formulas including trigonometry, power functions, pseudorandom constants, possibly some calculus functions, etc...  Obviously, I cant just concatenate different chunks in a completely random way, since these functions always need to always have valid syntax.</p>
  
  <p>This isn't for anything crypto-related so it doesnt have to be perfect, but the more entropy the better.  It would also be great if there is an easy way to keep track of what operations are being preformed and mutate them.</p>
  
  <p>I'm not sure if anyone has any insights on this, or if it even made sense, but thank you anyway</p>