# Is there no way to make this function?

I want a function that curves similarly to this graph. Following the one equal to 1.

Basically I want the y axis minimum to be 0.5 and the y maximum to be 3. The x axis minimum to be 0 and the x maximum to be 2,500,000. So when I put 0 in the function it will be 0.5. This could be done linearly but I want a curve like the one in the graph above. I want the y axis to increase fast and then slow done.

I've asked this same question before but I didn't get help on it. I hope this is worded better for solutions. And yes I've looked into Cumulative distribution functions like the one in the picture but have no idea how to implement it like I want to.

• Take your favorite function that has a graph like that on the region $[0,1]\times [0,1]$ (for example $f(x)=\sqrt{x}$). To make the total height occupied by $y$ to be $3-0.5=2.5$ modify the original function to be $2.5f(x)$. That has the effect of "stretching" vertically. To make the $y$ minimum be $0.5$, modify the original function further as $2.5f(x)+0.5$. That has the effect of "shifting" vertically. Then, to make $x$-max be $2.5\cdot 10^6$ modify further as $2.5f(\frac{x}{2.5\cdot 10^6})+0.5$. That has the effect of stretching horizontally. – JMoravitz Dec 20 '17 at 21:20
• I.e. one such function might be $f(x)=0.5+2.5\sqrt{\frac{x}{2.5\cdot 10^6}}$. You can modify other examples similarly. – JMoravitz Dec 20 '17 at 21:21
• This is what I am looking for and I get this. Is there anyway to make it faster and then have it slow down towards the end? – John Doe Dec 20 '17 at 21:31
• By choosing a different original $f(x)$. You say you've looked into cumulative distributions. Well... pick your favorite cumulative distribution whose sample space is $[0,1]$. – JMoravitz Dec 20 '17 at 21:33

Try with: $$y=0.5+2.5\left(\frac{x}{2500000}\right)^{\frac{1}{k\cdot\lambda}}$$

You can adjust the parameter $k\geq1$ in order to have the best fitting you need.

• without adding 0.5 to this it just goes to 0.99999996 when I put in the max number I want for x (2,500,000). And with adding 0.5 it goes to 1.4999996. I want that number for 2,500,000 to be 3. – John Doe Dec 20 '17 at 21:24
• This is exactly what I wanted I can even use k as a scale to accelerate the speed. Thank you JMoravitz and Jacob Classen for teaching me more about graphs and math in general. – John Doe Dec 20 '17 at 21:40
• You are welcome, you can also upvote them to thanks! Bye. – gimusi Dec 20 '17 at 21:43
• I have but it doesn't show up because of my rep. – John Doe Dec 20 '17 at 21:45
• @JohnDoe I'll upvote them for you! – gimusi Dec 20 '17 at 21:47

$f(x)=1-(x+1)^{-\gamma}$, should do the trick as a base, you can use linear transformations to make it your own

• I have no idea how to do linear transformations I guess I'll have to look more into it thank you for the answer. – John Doe Dec 20 '17 at 21:22
• @JohnDoe given an original function $f(x)$ one can construct a related function $v_{\text{shift}}+v_{\text{scale}}f(h_{\text{shift}}+h_{\text{scale}}x)$. The values of $v_{\text{shift}}$ and the rest will modify the function in their own respective ways by shifting or scaling horizontally or vertically. – JMoravitz Dec 20 '17 at 21:27