1
$\begingroup$

I'm trying to create a function to smoothly match this line.

Function description:

When 0 is the input, I want 1 to be the output.

The line quickly slopes downward at the beginning and end, and slowly slopes downward in the middle.

When 1 is the input, I want 0 to be the output.

Thanks!

  • 0
    Your picture shows it sloping slowly at the beginning. Based on the verbal description you might consider a rescaling the $\arccos$ function, like $y=\dfrac{\arccos(2x-1)}{\pi}$2017-02-10
  • 0
    This looks like the Cumulative distribution function for the normal distribution but done backwards.2017-02-10
  • 0
    @JonasMeyer The function looks good, but I would like the beginning and end of the line to slope quickly for a little longer, and the middle of the line to not be so sloped. Is there a way to do that?2017-02-10
  • 0
    $y=\dfrac{\arccos\left(1-2\frac{\arccos(2x-1)}{\pi}\right)}{\pi}$?2017-02-10
  • 0
    @JonasMeyer Yes, thanks so much! If you put that in an answer I will accept it and up vote it.2017-02-10

1 Answers 1

0

What you describe sounds somewhat like $\arccos$, which ordinarily takes $[-1,1]$ to $[0,\pi]$, but can be moved to fit the values: $y=f(x)=\dfrac{\arccos(2x-1)}{\pi}$. In order to exaggerate the effect, once you have one good approximation, you can flip it upside down and apply it again, $y=f(1-f(x))=\dfrac{\arccos\left(1-2\frac{\arccos(2x-1)}{\pi}\right)}{\pi}$.

It was commented that that suffices. If wanting it even more exaggerated, we can do the same thing again:

$y=f(1-f(1-f(x)))=\dfrac{\arccos\left(1-2\dfrac{\arccos\left(1-2\frac{\arccos(2x-1)}{\pi}\right)}{\pi}\right)}{\pi}$.

The following Desmos graph shows the first 4 iterations.

enter image description here

  • 0
    Wow, thanks so much!!!! I can't up-vote it because I'm under 15 reputation but I will when I can.2017-02-10