Loss of information in tangents

  • Context: High School 
  • Thread starter Thread starter Maxwellkid
  • Start date Start date
  • Tags Tags
    Information Loss
Click For Summary

Discussion Overview

The discussion revolves around the accuracy of the substitution of sine and cosine functions to define the tangent function, particularly in the context of solving equations and its implications in programming, such as calculating angles in game development.

Discussion Character

  • Debate/contested
  • Technical explanation
  • Mathematical reasoning

Main Points Raised

  • Some participants question the accuracy of the substitution \(\frac{\sin\phi}{\cos\phi} = \tan\phi\) and seek clarification on what is perceived as inaccurate.
  • Others assert that the identity is true for all \(\phi\) where it is defined, challenging the notion of inaccuracy.
  • One participant explains that issues may arise when manipulating trigonometric functions in equations, such as losing solutions when dividing by \(\cos(x)\), which can lead to missing critical values.
  • A participant introduces a programming context, discussing the limitations of the arc tangent function due to its periodic nature and the need for the atan2 function to accurately determine angles based on velocity components.

Areas of Agreement / Disagreement

Participants express differing views on the accuracy of the tangent function substitution, with some asserting its correctness while others highlight potential pitfalls in its application, particularly in solving equations and programming contexts. The discussion remains unresolved regarding the initial claim of inaccuracy.

Contextual Notes

Participants note that the perceived inaccuracies may stem from specific applications or manipulations of the trigonometric functions rather than the definitions themselves. There is also mention of the periodic nature of the tangent function affecting angle calculations.

Maxwellkid
Messages
69
Reaction score
0
why is there a lack of accuracy in this subsitution?

\frac{sin\phi}{cos\phi} = tan\phi
 
Mathematics news on Phys.org
Where is the inaccuracy?
 
Please explain your question more.
\frac{sin(\phi)}{cos(\phi)}= tan(\phi)
is exactly true for every \phi 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: sin(x)+1=cos(x)

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

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

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

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

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...
 

Similar threads

  • · Replies 11 ·
Replies
11
Views
2K
  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 1 ·
Replies
1
Views
3K
Replies
4
Views
1K
  • · Replies 171 ·
6
Replies
171
Views
12K
  • · Replies 6 ·
Replies
6
Views
1K
  • · Replies 12 ·
Replies
12
Views
2K
  • · Replies 5 ·
Replies
5
Views
2K
  • · Replies 1 ·
Replies
1
Views
4K