Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

How to map intervals of Real line

  1. Feb 13, 2008 #1
    Can someone explain how to create a function that will map an interval of the real line onto some other interval?

    Is there a general method?

    Can you demonstrate? (30 140) to (200, 260)?

    Thanks,

    Diffy.
     
  2. jcsd
  3. Feb 13, 2008 #2

    arildno

    User Avatar
    Science Advisor
    Homework Helper
    Gold Member
    Dearly Missed

    try with a linear map.
     
  4. Feb 13, 2008 #3
    Let x1 be in (30, 140) and let x2 be in (200, 260)
    then f: x1 -> x2
    f(x) = (6/11)(x-30) + 200

    Something like that?

    Will this always work for (x1, x2) -> (y1, y2)?

    f(x) = (y2 - y1)/(x2 - x1) * (x - x1) + y1
     
  5. Feb 13, 2008 #4

    arildno

    User Avatar
    Science Advisor
    Homework Helper
    Gold Member
    Dearly Missed

    Indeed, let us prove it as follws:

    1. For any X so that x1<=X<=x2, we have y1<=f(X)<=y2
    Proof:
    We clearly have :
    y1=(y2-y1)/(x2-x1)*(x1-x1)+y1<=f(X)<=(y2-y1)/(x2-x1)*(x2-x1)+y1=y2

    2. Similarly, we can show that for any Y so that y1<=Y<=y2, then there exists some X, so that x1<=X<=x2 AND that f(X)=Y.

    We get that X=(Y-y1)/(y2-y1)*(x2-x1)+x1. Since 0<(Y-y1)/(y2-y1)<1, that result follows immediately.
     
  6. Feb 13, 2008 #5
    Thank you.
     
  7. Feb 13, 2008 #6

    Ben Niehoff

    User Avatar
    Science Advisor
    Gold Member

    In most cases, you can use a linear map. Some trickiness results if one of the intervals is infinite or half-infinite. In that case, you might have to use exp(), tan(), or their inverses.
     
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook

Have something to add?



Similar Discussions: How to map intervals of Real line
Loading...