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

Please help me come up with a function

  1. Aug 18, 2005 #1

    I'm trying to come up with a function, but I have no idea how.

    Here's my idea of f(x):

    f(5000) = 0.07
    f(1000) = 0.25
    f(900) = 0.28
    f(700) = 0.3
    f(500) = 0.5
    f(200) = 0.8
    f(100) = 0.9
    f(50) = 0.97
    f(1) = 0.99
    f(0.5) = 0.999

    where 0 < f(x) < 1

    as f(x) approaches 0/1, the change becomes less and less noticeable, and becomes closer and closer to 0/1 but never become 0/1.

    Last edited: Aug 18, 2005
  2. jcsd
  3. Aug 18, 2005 #2
    Thanks for the input.

    I edited my post right before you posted, so here's a summary of characteristics:

    f(x) can only be a positive real number between 0 and 1 exclusive.
    x can be between 0 exclusive and infinite, but I want f(500) to be around 0.5, and I don't really care what f(x) will be after x = 500.

    I don't need a precise function that fits all my sample values; those are just to illustrate what kind of curve the function takes. As long as it satisfies these conditions, I can take any function.

    I'm no mathmatician, so I hope I explained this well..
  4. Aug 18, 2005 #3
    Looks very roughly exponential, of the form [tex]f(x)=e^{-ax}[/tex], a is some real number. You could graph x against [itex]\ln f(x)[/tex] in a spreadsheet like Excel or OpenOffice, and do a linear regression to find a.
    Last edited by a moderator: Aug 18, 2005
  5. Aug 18, 2005 #4


    User Avatar
    Science Advisor
    Homework Helper

    If you put the data into Excel and graph the points (use the wizard); you can right-click on any of the data points and select Insert Trendline. In the Trendline dialog box, first click on its Type tab and select exponential or power, then go to Options tab and check "Display equation" and "Display R-squared" boxes. You can copy and paste the same graph over and over, then use different functional forms in each. You might want to select the functional form that maximizes the R-squared.
  6. Aug 19, 2005 #5

    matt grime

    User Avatar
    Science Advisor
    Homework Helper

    0/1 would be 0.
  7. Aug 19, 2005 #6
    He was using incorrect notation to describe the point [tex]\left( 0, 1 \right) \in \mathbb{R}^2[/tex].
  8. Aug 21, 2005 #7

    Claude Bile

    User Avatar
    Science Advisor

    I would suggest perhaps an inverse tan curve, centred at x=500 and offset by an appropriate amount.

Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook

Have something to add?

Similar Discussions: Please help me come up with a function
  1. Please Help Me (Replies: 2)

  2. <please help me> (Replies: 1)