Tool to synthesize functions

31 Views Asked by At

Often I need functions with some properties I can describe.

I'm able to plot on paper a function working for my purpose, but I need a formal way to express it. I'm bad at it, and finding a working formula takes me a considerable amount of efforts.

Are there any tools that can aid me in finding a formula, as simple as possible, satisfying my constraints?

I considered using splines and similar interpolation tools, but they have many drawbacks: they're usually not defined in all of $\mathbb R$; can't easily express local minimums and maximums, how fast the function grows in certain intervals or other similar constraints; their expression is also way uglier and with a lot more terms than it could be.


For instance, right now I was looking for a function $f$ such that:

  • $f(0)=0$
  • $f(35)=0$
  • $f(20)=1$ is the maximum
  • to the left, it diverges slowly (e.g. sub-linearly) to $-\infty$
  • to the right, it diverges quickly (e.g. linearly or super-linearly) to $-\infty$
  • it's monotonic in both the intervals $(-\infty, 20]$ and $[20, \infty)$
  • it should be smooth (e.g. continuous first derivative)

In my experience these classes of functions usually have many clean solutions, expressed with nice simple formulas... But how can I find one without spending half an hour going crazy on Wolfram Αlpha?