A Create function which meets slope and point requirements

Jeffack
Messages
14
Reaction score
0
I am trying to create a function of A and x which has the following properties. A is a scaling parameter that determines the shape of the function. I write the function below in f(A,x) form
1) f(A,1)=1 always
2) For all x>1, 0<f ' (x)<1
3) As A approaches some upper bound (which could be infinity), the function approaches f(A,x)=x (i.e. the simple graph y=x)
4) As A approaches some lower bound (which could be infinity), the function approaches f(A,x)=1 (i.e. the simple graph y=1)
5) I only care about the shape of the graph for values of x greater than 1 (so, conditions 2, 3, and 4 don't need to hold for values lower than 1

The closest I've come is y=A*ln(e^(1/A)*x), for A between 0 and 1. This achieves conditions 1, 2 and 4, but not 3.
 
Physics news on Phys.org
The simplest such function is ##f(x)=1+A(x-1)## where the lower and upper bounds for ##A## are 0 and 1.
If instead you want ##A## to be able to take on any real value you can use the logistic function, which smoothly maps the real line to the interval (0,1). That leads to the following suggestion for your function:
$$f(x)=1+\frac{x-1}{1+e^{-A}}$$
 
Thanks for your reply on this.
I realized that I didn't type in one condition (which is the one that really complicates things):
6) ##f''(x)<0##. This combined with (2) means that ##f'(x)## approaches 0 as ##x## approaches ##\infty##.

The goal is to have ##A## determine how long the function stays near the ##y=x## line before it flattens out.
 
For conditions 3 and 4, uniform convergence over A is not possible, but pointwise convergence should be. A family of functions that would satisfy this is one that makes the curve part of the upper-right arm of the hyperbola
$$\left(\frac {x-c}a\right)^2-\left(\frac {y-d}b\right)^2=1$$

That arm is rising and concave down, satisfying (6), and it approaches a rising asymptote whose slope depends on parameters ##a## and ##b## (which are assumed positive). So those two parameters can be expressed as functions of ##A## in order to give a slope that approaches 1 as ##A\to\infty## and 0 as ##A\to-\infty##. That will give us condition (2). IIRC the slope of the asymptote is ##b/a##. If so we can set ##a=1+e^{-A}## and ##b=1##.

The parameters ##c,d## set the location of the hyperbola, respectively horizontally and vertically. These would also be made functions of ##A## in such a way as to
(a) satisfy conditions (1) and (2), and
(b) make the vertical separation of the line from the asymptote at ##x=1## go to zero as ##A## goes to ##\pm\infty##. That will give us pointwise convergence for conditions 3 and 4.

Some messing about with algebra will be needed to find the two functions that express the parameters ##c,d## as functions of ##A## that have the desired characteristics. But it should not be difficult.
 
Last edited:
  • Like
Likes Jeffack

Similar threads

Replies
17
Views
2K
Replies
53
Views
5K
Replies
20
Views
4K
Replies
3
Views
4K
Replies
7
Views
2K
Replies
7
Views
2K
Replies
1
Views
2K
Back
Top