How do I find a function for a known graph? Is there a reverse grapher?

82 Views Asked by At

I'm trying to find functions to describe relationships that are simply described in english or graphically.

For example, for $x \leq 0$, $f(x) = 1$; and as $x$ gets bigger $f(x)$ approaches $0$ ($y=0$ is an asymptote). The graph looks something like this: sketch of graph.

How do I work backwards to turn this into a mathematical function of the form: $$f(x) = something$$

2

There are 2 best solutions below

2
On

You can write down all functions which may apply to your problem and then sort them out.

For $x\leq0$ you can simply take $f(x)=1$.

For $x>0$ you can take functions in $\mathcal O\big(\frac1x\big)$ because $\frac1x\to 0$ for $x\to\infty$. In order to make the whole function continuous let‘s take $\frac1{x+1}$.

Putting all together we get $$ f(x)= \begin{cases} 1, &\text{for } x<0\\ \frac1{x+1},&\text{for } x\geq0 \end{cases}. $$

0
On

The answer is not unique for example your function could be described as $f( x)=1$ for $x<0$ and $f( x)=e^{-x}$. for $x\ge 0$

In general you can approximate your function by collecting data

and pass a polynomial through your data or using Regression analysis and find a good fit for your graph.

It is all approximation of course but your formula is ok for interpolation .