Loss of information in tangents

  • Level: High School 
  • Thread starter Thread starter Maxwellkid
  • Start date Start date
  • Tags Tags
    Information Loss
Join the discussion
Registration is free. Start your own thread to ask a follow-up.
6 replies · 2K views
Maxwellkid
Messages
69
Reaction score
0
why is there a lack of accuracy in this subsitution?

[tex]\frac{sin\phi}{cos\phi} = tan\phi[/tex]
 
Mathematics news on Phys.org
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?
 
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?

Regards.
 
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.
 
Maxwellkid said:
why is there a lack of accuracy in this subsitution?

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.
 
Tac-Tics said:
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.

thank you...