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

Normalizing a function

  1. Nov 24, 2011 #1
    Hi all,

    Say if I had a function for example [itex] p(x) = \beta \cos(\pi x) [/itex]

    And I wanted to alter it such that the max value of [itex] p(x) [/itex] is 1 and its minimum value is 0.

    How would I go about doing this?

    Thanks for your help in advance!
  2. jcsd
  3. Nov 24, 2011 #2


    User Avatar
    Homework Helper

    Do you know the minimum and maximum values of [itex] p(x) = \beta \cos(\pi x)[/itex] (before changing p(x))?
  4. Nov 24, 2011 #3
    Well yes, the maximum value would be [itex] \beta [/itex] and the minimum value would be [itex] - \beta [/itex]..
  5. Nov 24, 2011 #4
    Well a very simple way to do it would be to first "shrink" your range from being -β to β, and making it 1. You can do this by dividing by 2β, and you get p'(x) = 0.5 cos([itex]\pi[/itex]x)
    Now your function covers -0.5 to 0.5 so what you have to do now is move its range "up" by 0.5... so you get p''(x) = 0.5 (cos([itex]\pi[/itex]x) + 1)
Share this great discussion with others via Reddit, Google+, Twitter, or Facebook