Take the 2-minute tour ×
Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. It's 100% free, no registration required.

I need a function which give 0 for 0 value and 100 for 100 but is a highly curvy curve, like for 0.001 it should give value like 1.2 and for 50 it show give value like 55 and ultimately for 100 it should be 100.

In short it increases rapidly for smaller value of x, and slowly for large value of x. and ultimately same value as input.

share|improve this question

2 Answers 2

Lots of curves can have this property. Here's a simple parameterized family of curves that do what you want:

$$y = 100 \left ( \frac{x}{100} \right )^n$$

Where $n$ is a parameter ranging from $0$ (exclusive) to $+ \infty$, and $x$ is your value, from $0$ to $100$.

For $n = 1$, you just get a straight line (least curvy). Otherwise, the closer $n$ is to $0$, the more "curvy" it is and increases quickly with small values of $x$, then slows down, and for $n > 1$ it's the opposite.

Note that "curviness" is not a linear relationship of $n$, but more an inverse relationship. For instance, $0.05$ is really curvy, but $1.05$ is almost flat - to obtain the same amount of curviness in both directions, you would use $\frac{1}{0.05} = 20$.

As you can see, it always starts at $0$ when $x = 0$, and ends at $100$ when $x = 100$.


Examples:

$$n = 0.1$$

enter image description here

$$n = 0.5$$

enter image description here

$$n = 1$$

enter image description here

$$n = 5$$

enter image description here


This can be generalized a lot, feel free to build on it if you need to tweak it.

share|improve this answer
    
It worked, thanks... –  Sam Aug 8 '13 at 8:51
    
Thanks is fine @Sam, but upvoting is better and more direct. Also, after you've upvoted all the answers you've found helpful, it'd be nice if you also accept the one you consider the best for you. –  DonAntonio Aug 8 '13 at 9:39

For "increases rapidly for smaller value of x, and slowly for large value of x" one possibility would be $$\sqrt{x(200-x)}$$ so the graph of the function looks like a quarter circle.

For $x=0.001$ this gives about $0.44$ and for $x=50$ it gives about $86.6$, but can easily be adjusted.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.