Sign in to follow this  

Cosine

This topic is 4395 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I'm trying to understand how cosine works. In all the books I've read, they say it's the adjacent side divided by the hypotenuse: Cos Ө = adjacent side ------------- hypotenuse But lets say the opposite side of a triangle is 3, the adjacent side is 4. Doing the pythagorean theorum: C = Sqr(3² + 4²) = 5 3, 4, and 5. Simple enough. Now when dividing the adjacent side (4) by the hypotenuse (5): Cos Ө = .8 Now what is .8 suppose to represent, an angle of the triangle? Is it an angle in radians, or degrees, or what? Can someone help me understand this. Thanks in advance.

Share this post


Link to post
Share on other sites
Cosine is the horizontal coordinate of a point on the unit circle at angle θ.



I hope MathWorld doesn't mind me leeching their images.

Share this post


Link to post
Share on other sites
So it's the angle that's from the center of the circle in the image in that corner of the triangle? Is it in radians or degrees?

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
The .8 is the ratio between the lengths of the sides of the triangle. If the triangle was a different size but the angles were the same, this ratio would also stay the same (for example, a 6 8 10 triangle).

The angle fully determines the ratio between lengths of the sides. The cosine function is a function from the angle to this ratio.

Share this post


Link to post
Share on other sites
Ok I'm now thinking it was .8 radians, cause I was playing around with the values, and got 36.8698966198457 degrees converted to radians, which gave me .8. Was this right?

Cos(36.8698966198457 * PI / 180) = .8

Share this post


Link to post
Share on other sites
The result of cos is not an angle. It is not in radians. It is just the x-value of the coordinate on the unit circle at the angle you give it.

Share this post


Link to post
Share on other sites
Oh I didn't know that. The book says Cos Ө = .8, so I assumed that it was the angle that it returned. So how would you retrieve the angle from this ratio between the length of the sides?

Share this post


Link to post
Share on other sites
Quote:
Original post by Jacob Roman
Oh I didn't know that. The book says Cos Ө = .8, so I assumed that it was the angle that it returned. So how would you retrieve the angle from this ratio between the length of the sides?


By using the inverse of the functions, cos-1, sin-1, and tan-1 which translate to in C++, asin, acos, atan. Note that the resulting angle is returned in radians, so you need to convert it to degrees. More info here.

Share this post


Link to post
Share on other sites
To find the angle, theta, you need to rearrange cos(theta) = 4/5, to find theta. So, theta = arccos(4/5).

Is this clear enough?

Share this post


Link to post
Share on other sites
To find the angle using asin,acos or atan (Inverse of sin,cos and tan) you first need to picture the triangle shown in the figure by Ra.The angle will be equal to the sin inverse(asin) of opposite side/hypotenuse OR cos inverse(acos) of adjacent side/hypotenuse OR tan inverse(atan) of opposite side/adjacent side.

Share this post


Link to post
Share on other sites
SinX = opposite/hypotenuse
CosX = adjacent/hypotenuse


(Taken from Wikipedia.com)


(taken from Wikipedia.com)
I hope these picture might help you.

Share this post


Link to post
Share on other sites
The way I always remember it is this....

Start at point (1, 0) on a circle (the leftmost point) of radius 1.

Rotate COUNTER-CLOCKWISE x degrees.

After the rotation, your point is at point (cos x, sin x). So cos x really means "how far left or right on the x-axis am I after I rotate around a circle?"

Sin x, similarly, means "how high up on the y-axis am I after the same rotation?"

If you have a value A * cos x or (A * sin x), you interpret that as a rotation around a circle of radius A instead of radius 1.

Share this post


Link to post
Share on other sites
Quote:
I'm trying to understand how cosine works. In all the books I've read, they say it's the adjacent side divided by the hypotenuse:


I think the OP wants the definition of cosine function. The function is actually an approximation function, you may want to look at taylors series. If you have a calculus book look for taylor's series it might be in the table of contents or the index(or both).

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
Quote:
Original post by Four
I think the OP wants the definition of cosine function. The function is actually an approximation function, you may want to look at taylors series. If you have a calculus book look for taylor's series it might be in the table of contents or the index(or both).


The function itself is not approximate. The approximation is from the methods used to evaluate the function.

Share this post


Link to post
Share on other sites
cos(x)=
-x + x^3/3! - x^5/5! + x^7/7! - x^9/9! ...
sum(i=0..infinity, (-1)^i*x^(2i+1)/(2i+1)!)

Remember:
n!:=1*2*3*...*n

Hope that helps :)
Nathan

Share this post


Link to post
Share on other sites
In a slightly related question, how are trig functions usually implemented on a computer? Are they in software, or do modern chips have them hardwired?

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
Quote:
Original post by King of Men
In a slightly related question, how are trig functions usually implemented on a computer? Are they in software, or do modern chips have them hardwired?

In the case of x86, sine, cosine, tangent, and arctangent are hardwired into the processor. There are still cases, however, on x86, programmers still sometimes generate them in software.

Share this post


Link to post
Share on other sites

This topic is 4395 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this