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

Problem with finding the log function of a graph

  1. Jul 24, 2004 #1
    I have a problem where a graph is drawn, and i am supposed to find the function that would create it. We are only given a part of the graph with certain points. They say it is a log function, and the points given are
    (0, 0.21), (0.5, 0.19), (1, 0.15), (1.5, 0.10), (1.75, 0). It says to choose a starting function and use transformations to create this function, however my knowledge of transformations is not enough to "accurately" do this.

    Any help would be greatly appreciated
  2. jcsd
  3. Jul 24, 2004 #2
    Here are some basic rules for transformations:

    Let [tex]y=f(x)[/tex]
    [tex]y=f(x+c)[/tex] shifts the curve left if [tex]c<0[/tex] and right if [tex]c>o[/tex]
    [tex]y=f(x) + c[/tex] shifts the curve up if [tex]c<0[/tex] and down if [tex]c>o[/tex]
    [tex]y=cf(x)[/tex] stretches the curve out if [tex]c<0[/tex] or compacts it in if [tex]c>0[/tex]

    I don't know if I'm missing any others.

    Anyways, here's what I would do. Start with a general log function like [tex]y=clog(ax + b) + d[/tex]. Then plug in all the given points and you'll get a system of equations, then solve for those parameters.
  4. Jul 25, 2004 #3
    can anyone help me solve for the parameters of my equations:
    [tex]0.21=clog(b) + d[/tex] (1)
    [tex]0.19=clog(0.5a + b) + d[/tex] (2)
    [tex]0.15=clog(a + b) + d[/tex] (3)
    [tex]0.10=clog(1.5a + b) + d[/tex] (4)
    [tex]0=clog(1.75a + b) + d[/tex] (5)

    Also, thanks for your help jin
  5. Jul 25, 2004 #4
    This might not be the right way to go about this problem ... I wouldn't want to extract the solutions from that lot.

    A hint as to why it might not be the right way is that jin's form for the general log function could be simplified to ...

    [tex]y - y_{0}= mlog(x - x_{0})[/tex]

    ... which encapsulates all the transformations that jin described, but only has three unknowns!

    But this does not include rotation, which is also a transformation, but you may not have covered that. You'd best describe what you've actually been taught about transformations before carrying on.
  6. Jul 25, 2004 #5
    well we havent been taught anything about transformations, and we have to find it all ourselves. The graph is flipped compared to the normal log graph (ie when a is a negative number.
  7. Jul 25, 2004 #6
    you could get a polynomial from the data that interpolates at all those points, and if i remember correctly 5 data points means a polynomial of degree 4.

    your interpolating polynomial can be found by
    [tex]l_{i}(x)=\prod_{j=0,j not equal to i}^n(x-x_{j})/(x_{i}-x_{j})[/tex]

    in your case n=4

    throw all these into the cauldron and out pops your polynomial
  8. Jul 26, 2004 #7
    ok, well i havent done polynomials yet so i would absolutely no idea.
  9. Jul 26, 2004 #8
    I think Vladimir is just showing off... :rolleyes: I really don't think this problem requires polynomial interpolation.

    Anyways, take what you have and try putting both sides to the e power (assuming the log refers to natural log, but it really doesn't matter actually).

    So taking the first thing, I would have... [tex]e^{\frac{0.21-d}{c}}=b[/tex]. Do the same for the other equations and play around for a bit.
  10. Jul 26, 2004 #9

    It's really hard to help people who ask 'Answer this for me, please - I don't know anything about this subject!'

    You must have been given some information about how to tackle such a question. If you haven't, all the replies you get will just be gobbledygook to you anyway.

    This could be solved in a number of ways. You have to help us help you.
  11. Jul 27, 2004 #10
    sorry, its just im in year 12 and we havent learnt it, thats why its a homework assignment, we go home and find out bout stuff we never learnt before
  12. Jul 27, 2004 #11
    Hey Maccaman, I read my last post again and it does sound as if I'm being a bit mean, so sorry for that.

    But that's a tough school you go to, to expect to this stuff without any help at all! That's pretty unusual.

    Jin314159 has set out a way to solve the problem. The key things you would need to know to go this route are the general form of a log function and how to solve simultaneous equations (he left you with a set to do). If you don't know these things it's gonna be hard work.

    But a couple of things tell me that's probably not the way to go ... one is that you mentioned solving it using transformations (I don't know what that means, by the way) and, also, in Jin314159's version there are 4 unknowns (a,b,c & d), in my version there are 3 unknowns (x0, y0 & m) but you are given 5 points as initial data, generating 5 equations!! Usually, having 3 (or 4) unknowns means you would only need 3 (or 4) equations. It's pretty unusual to get more information than you need!

    So, we're both probably wrong to go down this route, anyway.

    If you still want/need some help, though, give us an idea of what you've been doing recently in class ... maybe that'll help.

    pnaj :smile:
  13. Aug 3, 2004 #12
    thanks for your responses everybody. A few people in my class like me complained about this problem aswell. The lowdown is, i am now given the graph (has those points i put in here before) and using transformations, eg. compressing, translating and stretching, manipulate log (x) by adding constant values to turn it into the graph we have given. My teacher said it does not have to be exact, but it must be very close (eg have almost the exact same points as the ones i told everyone). Some additional points are (0.25, 0.2), (0.75, 0.17), (1.25, 0.12). The closest function i have "made" is approx [tex] 0.2 log [-0.5(x - 2)] + 0.21 [/tex]. If anyone wants to help me along the way, by trial and error (to two decimal places for any value of a, b, c or d), i gotta get as close as i can to making my log function pass through those points. My general log function is [tex] a log [b (x - c)] + d [/tex].

    P.S. Thankyou everyone for all your responses, it has been very helpful.
    Last edited: Aug 3, 2004
Share this great discussion with others via Reddit, Google+, Twitter, or Facebook