As the title says, I'm confused on what tan and atan are. I'm writing a program in Java and I came across these two mathematical functions. I know tan stands for tangent but if possible could someone please explain this to me. I have not taken triginomotry yet (I've taken up to Algebra 1) so I don't really need a very in depth explanation since i wouldnt understand but just a simple one so i could move on with my program would be great! Thanks in advanced. Also if possible could someone possibly give me a link to an image/example of a tangent and atan.
[Math] What are “tan” and “atan”
notationtrigonometry
Related Solutions
I think this is a great question and you've already made an important step in addressing the problem - realizing that you are not satisfied with your math working process and searching for ways to improve it. Here are some ideas and suggestions which I found helpful:
- Understand well the basic objects of the game. This means that you should be able to give many interesting examples and non-examples of the objects you work on. Make a (mental or physical) list of such examples. What are the most important examples of vector spaces? Of subspaces? Can you give an example of something which is not a subspace? What kind of constructions generate subspaces? What kind of integrable functions are there? What do you know about them? And so on.
- Make sure you understand everything about the statement of the problem first before trying to approach it. If you don't, go back and review what you have learned. There is no point in trying to solve an exercise about nilpotent linear operators if you can't give an example of a nilpotent operator and an example of a non-nilpotent operator. This will only cause you to halt and feel depressed.
Play with simplified models. This is something I really learned in graduate school and I wish I would have been told explicitly much earlier. If you are facing a problem that you have no idea how to approach and you feel paralyzed, try to work on a simplified (even trivial) model. For example, let's say you need to prove some statement about a linear map $T$ on some vector space $V$ and you have no idea what to do. Can you solve the problem if you assume in addition that $V$ is one-dimensional? Even better, if $V$ is zero-dimensional? Can you do it if $T$ is diagonalizable? If you are asked to prove something about a continuous function, can you do it if the function is a particularly simple one? Say a constant one? Or a linear one? Or a polynomial? Or maybe you can do it if you assume in addition it is differentiable?
Applying this idea has two advantages. First, more often than not you'll actually manage to solve the simplified problem (and if not, try to simplify even more!). This will increase your self-confidence and help you feel better so that you won't give up early on the harder problem. In addition, the solution of the simplified problem will often give you some hints on how to tackle the general one. You might be able to perform an induction argument, or identify which properties you needed to use and then realize those properties actually apply in a more general context, etc.
- When working on a problem, try to drop an assumption and see what goes wrong. Often this will help you to identify the crucial property which you need to actually solve the exercise and then you can review the theorems and results you learned to see if it actually holds.
- Try to have some mental image associated to any important object and concept you meet. This way, when you'll work on a problem which involves various objects and concepts, you'll already feel familiar with them and won't halt and feel paralyzed. Review the images as you make progress and make adjustments as necessary. For example, for the notion of a direct sum decomposition you can hold in your head the image of $\mathbb{R}^3$ decomposed as the "sum" of the $xy$-plane and the $z$-axis. This is, of course, a particular example of a direct sum decomposition but it helps you to feel much more at ease with the concept.
- Build a mental (or physical) map of relations between various results and concepts. For example, let's say you want to determine whether a series converges or not. A useful thing to realize is that it is easier to determine whether a series with positive terms converges than an arbitrary series because there are more tests available for this case. Another useful thing to know is that if the series converges absolutely, it also converges; so in some cases even if the series doesn't have positive terms you can reduce it to the easier case. Knowing all those relations and results before you start the problem will help you to decide on a good strategy to attack the problem. Not knowing them in advance will often cause to to go astray.
- Don't be afraid of writing something wrong. Be hesitant of writing something that you don't really understand. It's not that bad if you write something like "All operators are diagonalizable, hence $X$" because once you understand that not all operators are diagonalizable, you'll immediately see the error. But if you write a convoluted argument two pages long which uses somewhere the fact that your operator is diagonalizable, it will be much more difficult to discover and learn from the error.
- Develop decent computational skills. Math is hard enough without being bogged down in computation errors and wrong applications of techniques. For example, when learning how to solve a general linear system of equations, sit down and solve $7$ different systems. If you got a wrong result in $5$ of the $7$ cases, something is fishy. Identify clearly the origin of the mistake in each case (is it an arithmetic error? did you apply the algorithm incorrectly?). Then repeat with $7$ other systems until you get at least $6$ correct.
- Try to work on math problems with other people. By that I don't mean asking other people for solutions to exercises you couldn't solve. Try to find someone which is more or less your level and has good communication and interpersonal skills and work together with them all the way through a few problems. Be active, propose some ideas, listen to the other person's ideas and work together. This way, you'll get exposed to techniques that work for other people, their mental maps and ideas about the concepts involved and you'll be able to adapt and implement what you learn as part of your own skill set if you find it helpful.
I suppose that when you project your line orthographically on the $x,z$ plane and measure the angle in that plane, you are measuring that angle from the $x$ axis; and likewise you measure the angle in the $y,z$ plane from the $y$ axis.
You know the 3D line goes through $(0,0,0).$ You can easily detect if the line is completely in the $x,y$ plane, $90$ degrees from the $z$ axis, and in that case you have a solution.
So let's consider just the case where you have looked at the line and determined it does not lie in the $x,y$ plane. In that case the line passes through a point somewhere with the coordinates $(x_1, y_1, 1).$
Projected on the $x,z$ plane, the line passes through $(0,0)$ and $(x_1,1),$ so by making a right triangle with vertices at those two points and a third vertex at $(x_1,0),$ we can apply the definition of cotangent to this triangle to conclude that if $\theta_{xz}$ is the angle at $(0,0)$ then $\cot \theta_{xz} = x_1.$
Note that $\theta_{xz}$ is the angle you called "xz". So if you know that angle, you can just take its cotangent and you then know $x_1.$
For similar reasons, if $\theta_{yz}$ is the angle you called "yz" in the $y,z$ plane, then $\cot \theta_{yz} = y_1.$
Now that you know the coordinates $x_1$ and $y_1,$ you can construct a right triangle with vertices at $(0,0,0),$ $(x_1, y_1, 1),$ and $(0,0, 1).$ In this triangle, the angle at $(0,0, 1)$ is the right angle, the side from $(0,0,0)$ to $(x_1, y_1, 1)$ lies along your 3D line, and the side from $(0,0,0)$ to $(0,0, 1)$ lies along the $z$-axis. So the angle between your line and the $z$-axis is the angle at $(0,0,0)$ in this triangle.
The two sides of this triangle that meet at $(0,0,0)$ have lengths $1$ (the adjacent side) and $\sqrt{x_1^2 + y_1^2 + 1}$ (the hypotenuse). The opposite side has length $\sqrt{x_1^2 + y_1^2}.$ You have several choices regarding which trigonometric formula to apply, but since you like the inverse tangent, and the tangent is "opposite divided by adjacent", you can say that your angle is $$ \arctan\left(\sqrt{x_1^2 + y_1^2}\right) = \arctan\left(\sqrt{\cot^2(\theta_{xz}) + \cot^2(\theta_{yz})}\right). $$
Best Answer
A quick google search of "java atan" would tell you that it stands for "arctangent", which is the inverse of tangent. Tangent is first understood as a ratio of non-hypotenuse sides of a right triangle. Given a non-right angle $x$ of a right triangle, $\tan(x)$ is the ratio $\frac{o}{a}$ where $o$ is the length of the leg of the triangle opposite $x$ and $a$ is the length of the leg adjacent to $x$. Arctangent takes the ratio as an input and returns the angle.
I don't think any single answer to your post will give you a complete understanding of tangent and arctangent. To get that, I recommend spending some time with sine, cosine, tangent and the unit circle. Here is a link to an image http://www.emanueleferonato.com/images/trigo.png that uses an angle $A$ and triangle sides $a,o,h$. In the context of that photo, $\arctan\left(\frac{\text{opposite}}{\text{adjacent}}\right) = A$