I have number x=[0,n], where n>0. I want to construct a function y=f(x) such that the value increase slowly from 0 and increase very fast when approaching n, and when reach n, y is infinity. What is a good function to model this?
Asked
Active
Viewed 3,567 times
5
-
Those are the same function algebraically :) – D Stanley Oct 11 '12 at 02:14
-
1Alright.. How about e^(x/n-x) - 1 ? – krjampani Oct 11 '12 at 02:20
1 Answers
2
1/(n-x) - 1/n
will work.
There are plenty of other functions log, atan, x^(-k),... that goes to infinity at some point.
a^y
is another set of functions with fast grows - maybe more suitable for coding as it can reach arbitrary large (but finite) values.

Alexei Levenkov
- 98,904
- 14
- 127
- 179
-
3at x=0, you get 1/n which is why I subtracted 1/n in my comment above. Here's a graph, too: http://www.wolframalpha.com/input/?i=y%3D1%2F%285-x%29-1%2F5 – sinelaw Oct 11 '12 at 02:05