1
$\begingroup$

I've been trying to come up with a one-variable function that roughly matches this graph:

enter image description here

The closest I've gotten is $ f(d) = \dfrac{\log(c \cdot (1 - \frac{d}{c}))}{\log c} $, but this approaches $y=0$ at $x=c-1$, and steadily declines from $x=0$, instead of sharply.

Are there any functions or tricks I could look into to develop this further?

Thank you.

  • 1
    You could also try doing something in polar coordinates.2012-06-07

2 Answers 2

2

One thing might do is find a function $f$ whose graph is qualitatively the same as yours on the "left part", that is over $[0,C/2]$, say, and relatively constant on the right part, $[C/2, C]$.

Then find a function $g$ whose graph matches yours on the right part and is relatively constant on the left part.

Taking the sum $f+g$, you'll obtain a function whose graph is qualitatively the same as yours. The fact that $f$ and $g$ are nearly constant where they are is important, as this will insure that the sum $f+g$ will still have more or less the right shape.

However, the sum $f+g$ may not be 0 at $x=C$; you may need to vertically shift the function by adding a constant.

Here to get the bell shaped part on the left, you might use $f(x)=\exp(-x^2)$. For the shape of the right, the function $g(x)=.2|C-x|^{1/3}$ seems to work nicely.

So take $h(x)= \exp(-x^2) + .2|C-x|^{1/3}$. Even better would be $h(x)= \exp(-x^2) + .2|C-x|^{1/3} -\exp(-C^2)$, as this will insure that $h(C)=0$.

Well, that's almost right, except $h(0)$ is not $1$. But to ameliorate this, we can vertically scale, take $h(x)=a\bigl( \exp(-x^2) + .2|C-x|^{1/3} -\exp(-C^2)\bigr)$ where $a$ is chosen so that $h(0)=1$.

Actually, my choices of $f$ and $g$ are somewhat unsatisfactory (in particular, the function $g$ isn't nearly constant on the left part; perhaps the choice I made in my comment to your question ($g(x) = -{1\over C-x}$) would be a better choice). But I hope the method described is of help.

1

Let's try it in polar coordinates (as suggested by John).

We will start with a four petals flower getting the polar expression $\rho=\frac{m-1+\cos(4\theta)}m$ $m$ is a parameter and $m\approx 5$ seems appropriate giving :

m=5

In your case the graph will be obtained by $x=C\rho \cos(\theta),\ y=\rho \sin(\theta)$ To rewrite it with just one parameter you may use $\ u:=\cos(\theta)$ getting : $\rho=\frac{m+8(u^4-u^2)}m$ $x=C\;\rho\;u,\ y=\rho \sqrt{1-u^2}$

But $y$ is not a simple function of $x$ and worse the bump at the left is a little too large and the middle part not smooth enough... (but it had to be tried!)