Limit The Range Of A Function Watch

Swayum
Badges: 18
Rep:
?
#1
Report Thread starter 11 years ago
#1
Suppose we have a function y = f(x) which has a domain such that x >= 0 and xER (x is an element of real numbers). Is there any way I can make the range be 0 < y < 1 and that the bigger x is the bigger y is?
0
quote
reply
Chewwy
Badges: 15
Rep:
?
#2
Report 11 years ago
#2
yes. of the top of my head, y = (1+tanhx)/2 would work.

all you need to do is think of a one-to-one function with finite limits, and transform it to suit..
0
quote
reply
generalebriety
Badges: 14
Rep:
?
#3
Report 11 years ago
#3
Or (2/pi)arctan x.

Edit: oh, x in the reals. Erm, ok... (pi/2 + arctan x)/pi. Or something.
0
quote
reply
Swayum
Badges: 18
Rep:
?
#4
Report Thread starter 11 years ago
#4
chewwy, your one reaches 1 too quickly.

generalebriety, your one reaches 1 too quickly as well but if I divide by let's say 3pi then the new problem is that it increases too slowly.

If it helps 0 <= x < infinity.
0
quote
reply
generalebriety
Badges: 14
Rep:
?
#5
Report 11 years ago
#5
(Original post by DeathAwaitsU)
chewwy, your one reaches 1 too quickly.

generalebriety, your one reaches 1 too quickly as well but if I divide by let's say 3pi then the new problem is that it increases too slowly.

If it helps 0 <= x < infinity.
What are you on about, "too quickly"?
0
quote
reply
Chewwy
Badges: 15
Rep:
?
#6
Report 11 years ago
#6
i don't understand... too quickly?

y = (x + (1+x^2)^0.5 - 1)/2x is a fine answer too.
0
quote
reply
Swayum
Badges: 18
Rep:
?
#7
Report Thread starter 11 years ago
#7
What I mean is, if I let x = 100, it's too close to 1. I need it to sort of increase a bit slower. I know that there an infinite number of numbers so what I'm saying is stupid out of context but is there a way I could multiply a part of your function by a constant to make it work in context? The constant would sort of control the speed of increase.
0
quote
reply
SsEe
Badges: 13
Rep:
?
#8
Report 11 years ago
#8
y = (1+tanh(x/10000))/2
0
quote
reply
Swayum
Badges: 18
Rep:
?
#9
Report Thread starter 11 years ago
#9
(Original post by SsEe)
y = (1+tanh(x/10000))/2
I like that but, I know I've now changed the conditions from what I initially posted, at x = 0 it's outputting 0.5 when I'd want it to output 0.
0
quote
reply
Mathmoid
Badges: 0
Rep:
?
#10
Report 11 years ago
#10
x \rightarrow 1 - \frac{k}{x + k}

You can then choose k to be where the function hits 0.5 as an easy to compute measure of how "fast" the function approaches 1. It's probably a faster function to calculate than some of the other suggestions if that matters.
0
quote
reply
Swayum
Badges: 18
Rep:
?
#11
Report Thread starter 11 years ago
#11
Thanks, that should work I think.
0
quote
reply
generalebriety
Badges: 14
Rep:
?
#12
Report 11 years ago
#12
(Original post by DeathAwaitsU)
I like that but, I know I've now changed the conditions from what I initially posted, at x = 0 it's outputting 0.5 when I'd want it to output 0.
You said the domain of this function was R. Of course it's outputting 0.5, we all expected that you wanted it to tend to 0 as x tended to -infinity. :p: Otherwise, my original answer of (2/pi)arctan x works fine. If you want to scale it, (2/pi)arctan(x/10) or whatever.
0
quote
reply
Swayum
Badges: 18
Rep:
?
#13
Report Thread starter 11 years ago
#13
Yeah I know, generale, I forgot I x>=0 when I first posted this. To the person who neg repped me for changing the conditions, I think that was a bit extreme....
0
quote
reply
generalebriety
Badges: 14
Rep:
?
#14
Report 11 years ago
#14
(Original post by DeathAwaitsU)
Yeah I know, generale, I forgot I x>=0 when I first posted this. To the person who neg repped me for changing the conditions, I think that was a bit extreme but ok....
*shrugs* People will neg rep for all sorts. To be fair to them though, it's very annoying to be asked a question sometimes and then get told you've answered the wrong one.
0
quote
reply
X

Quick Reply

Attached files
Write a reply...
Reply
new posts
Latest
My Feed

See more of what you like on
The Student Room

You can personalise what you see on TSR. Tell us a little about yourself to get started.

Personalise

University open days

  • University of Lincoln
    Mini Open Day at the Brayford Campus Undergraduate
    Wed, 19 Dec '18
  • University of East Anglia
    UEA Mini Open Day Undergraduate
    Fri, 4 Jan '19
  • Bournemouth University
    Undergraduate Mini Open Day Undergraduate
    Wed, 9 Jan '19

Were you ever put in isolation at school?

Yes (157)
27.3%
No (418)
72.7%

Watched Threads

View All