2
$\begingroup$

Quite simply, I need a function that will produce a graph similar to the one below. Important to note:

1) Y switches from negative to positive at X=1/3

2) Y ranges from -0.1 to +0.1, not to and from infinity

3) Y should be very close to 0 by X=1/6 and X=3/6.

4) It should have curves similar to those in the picture (Mod note: the original image link is dead, for context I'm replacing it with the graph of the function given in the accepted answer.)

enter image description here

A massive thank-you to whomever can figure this one out.

3 Answers 3

4

I would suggest

$\frac1{5\pi}\mathrm{arccot}\left(c\left(x-\frac13\right)\right)$

and adjust the value of $c$ to speed up or slow the rate of decrease.


Yet another alternative:

$\frac1{10}\tanh\left(\frac1{c\left(x-\frac13\right)}\right)$

  • 0
    The tanh one worked even better. Thank you very much.2011-01-03
3

Do you need continuity when you go through $x=\frac{1}{3}$? If not, you can use $y=0.1 \exp(-a(x-1/3))$ for $x \gt \frac{1}{3}$

$y=-0.1 \exp(a(x-1/3))$ for $x \lt \frac{1}{3}$

Pick $a$ to make it fall as fast as you want

  • 0
    That was very close, and led me to a useable function - thank you! What I ended up with was: (n<1/3 and -.1^(-(n-1/3)) or .1^(n-1/3))/10)2011-01-03
0

Using the Heaviside step function $H$, the following seems to be the simplest choice

$y=H(x-\frac13)(1-H(x-\frac12))(x-\frac12)^2-(1-H(x-\frac13))H(x-\frac16)(x-\frac16)^2$