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

Finding equation for trigonometric function based on two points

  1. Mar 13, 2009 #1
    Is there any standard way to do this? Specifically, I know the equation I'm looking for is a cosine function, and I know two points. Is there a way to find the equation of the cos function which has been translated and compressed given only these two points?
  2. jcsd
  3. Mar 13, 2009 #2
    Unfortunately there's not a unique cosine function given only two points. A general cosine function is something like A*cos(Bx+C)+D, where all of the capital letters are degrees of freedom. You need at least one point for each degree of freedom to have a unique function.

    If you want to restrict the function to only compression and translation you could consider a function of the form A*cos(x+B), in which case you could determine a unique one. If the two points are (x,y) and (w,z), then you have to solve the system of equations:

    A*cos(x+B) = y ==> A = y*sec (x+B)
    A*cos(w+B) = z ==> B = arccos(z/A) + w
Share this great discussion with others via Reddit, Google+, Twitter, or Facebook