1. Limited time only! Sign up for a free 30min personal tutor trial with Chegg Tutors
    Dismiss Notice
Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Loss of information in tangents

  1. Aug 19, 2009 #1
    why is there a lack of accuracy in this subsitution?

    [tex] \frac{sin\phi}{cos\phi} = tan\phi [/tex]
  2. jcsd
  3. Aug 19, 2009 #2
    Where is the inaccuracy?
  4. Aug 20, 2009 #3


    User Avatar
    Science Advisor

    Please explain your question more.
    [tex]\frac{sin(\phi)}{cos(\phi)}= tan(\phi)[/tex]
    is exactly true for every [itex]\phi[/itex] for which either side is defined. What makes you think there is an "inaccuracy" and what do you mean by that?
  5. Aug 20, 2009 #4
    sin(x) = a / h

    cos (x) = b / h

    sin(x) / cos(x) = a / b, which gave us the definition of tan(x).

    What is inaccurate here?

  6. Aug 21, 2009 #5


    User Avatar
    Homework Helper

    You'll have to elaborate a bit more. Basically, if you're asking this because you were doing something else with the trig functions such as solving equations and found that you didn't quite get all the solutions right etc. then the problem in what you've done lies elsewhere.

    e.g. solving for x: [tex]sin(x)+1=cos(x)[/tex]

    This equation has solutions [tex]x=0,\frac{3\pi}{2},2\pi[/tex] for [tex]0 \leq x \leq 2\pi[/tex]

    but if you were to divide through by [tex]cos(x)[/tex] to obtain the equation:

    [tex]tan(x)+sec(x)=1[/tex] you've just lost the solutions where [tex]cos(x)=0[/tex]

    So for [tex]0 \leq x \leq 2\pi[/tex] we've lost the solution [tex]\frac{3\pi}{2}[/tex]

    There is no problem in the tangent fuction though.
  7. Aug 21, 2009 #6
    This reminds me of a problem I had back when I was interested in programming games. Given an object at position (x, y) with a velocity (dx, dy), what is the angle the object is moving at with relation to the x-axis?

    What you find out is that arc tangent isn't quite what you need. Because tangent is periodic with a period of pi, the arc tangent function won't distinguish between the correct direction and the direction exactly opposite it.

    Because of this, most computer languages implement a function called atan2. By taking dx and dy as two separate parameters (as opposed to taking their ration, dy/dx as the parameter), atan2 can distinguish between the two cases and can provide you the correct angle of motion for your object.
  8. Aug 22, 2009 #7
    thank you...
Share this great discussion with others via Reddit, Google+, Twitter, or Facebook