About
Community
Bad Ideas
Drugs
Ego
Erotica
Fringe
Society
Technology
register | bbs | search | rss | faq | about
meet up | add to del.icio.us | digg it
Go Back   Community > Sciences > Mad Scientists
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

Mad Scientists Science and Mathematics discussion-- theories, arguments, citations, proofs and pudding.

Reply
 
Thread Tools Display Modes
  #1   Add TheParkinator to your ignore list  
Old 2007-04-12, 00:04
TheParkinator TheParkinator is offline
Regular
 
TheParkinator is an unknown
Default Cosine, do you know it?

First off I'd like to say all of the sources I've examined over the past... few days between a week that I've looked through to try to learn the concept of cosine;

Googled webpages, didn't understand any explanations.

Cracked open an old math book, no luck.

Asked a friend thats currently working with it, of course he has no idea....

So.. nobody noes. I'd trek egypt and end up in antarctica, and still not find out the mystery of cosine. The closer I get the more it seems like a myth.

Specifically what I'm trying to do is learn how to take any number and cosine it, then get an answer.

I'm a programmer and I think its a very high priority to to learn how cosine works and what it does, it could save or use alot of memory/cpu depending on what I'm doing.

Please, Please somebody help me. I think a few paint examples would be fine, IF you know how. Thank you.
Reply With Quote
  #2   Add z3r0 c001 to your ignore list  
Old 2007-04-12, 03:07
z3r0 c001 z3r0 c001 is offline
Regular
 
Collingwood Ontario Canada. Send a message via MSN to z3r0 c001 z3r0 c001 is an unknown
Default Re: Cosine, do you know it?

http://en.wikipedia.org/wiki/Cosine
Reply With Quote
  #3   Add Sentinel to your ignore list  
Old 2007-04-12, 03:33
Sentinel Sentinel is offline
Regular
 
Planet Earth Sentinel is an unknown
Default Re: Cosine, do you know it?

Simple. Draw a right triangle. Any old one will do.


now pick either angle that isn't the right angle. The cosine of this angle, whatever it is, is the ratio of the adjacent leg to the hypotenuse of the triangle.

if you increase the angle of your triangle at a constant rate, you will find that the value of the ratio will behave a certain way. When plotted on a graph, this is the cosine function.

***

I just had a mathematical epiphany! One explanation for the reason that d(sinx)/dx is cosx is because, if you increase one angle of a triangle at a constant rate, the other one will decrease at a constant rate, and because the ratio of the cosine of one angle IS the sine of the other, they will change proportionally!

wow, that is a terrible explanation. Perhaps I'll play with this tomorrow in class.
Reply With Quote
  #4   Add WannaFuckWannaSex0r to your ignore list  
Old 2007-04-12, 04:52
WannaFuckWannaSex0r WannaFuckWannaSex0r is offline
Regular
 
WannaFuckWannaSex0r is more liked than disliked
Default Re: Cosine, do you know it?

Quote:
Originally Posted by TheParkinator View Post
First off I'd like to say all of the sources I've examined over the past... few days between a week that I've looked through to try to learn the concept of cosine;

Googled webpages, didn't understand any explanations.

Cracked open an old math book, no luck.

Asked a friend thats currently working with it, of course he has no idea....

So.. nobody noes. I'd trek egypt and end up in antarctica, and still not find out the mystery of cosine. The closer I get the more it seems like a myth.

Specifically what I'm trying to do is learn how to take any number and cosine it, then get an answer.

I'm a programmer and I think its a very high priority to to learn how cosine works and what it does, it could save or use alot of memory/cpu depending on what I'm doing.

Please, Please somebody help me. I think a few paint examples would be fine, IF you know how. Thank you.

you dont know what cosine is?
then i woudl assume you dont know what sine, or tangent is. well, there are 2 main ways to look at cosine, one involving a triangle and one involing a circle.

with triangle, the numbers are usually associated with the units of degrees. With the circle, the numbers are usually unitless numbers.

so, lets try a right triangle example (u can only use right triangles)
lets name the 3 angles (yuo do know that a triangle has 3 angles?)
let's name them a, b, and c.
Angle a is 30 degrees, angle b is 60 degrees, and angle c is 90 degrees.
Now, take the cosine of angle a. So, that would be the cosine of 30 degrees. When you are doing this, you are dividing the length of the leg adjacent to angle a by the hypotenuse. This ratio will be the sqare root of 3 divided by 2. What's cool is, with the right triangle, these ratios are always consistent.

Now, lets look at a circle. Okay, fuck it. It's too hard without drawing pictures. BUt basically, the cosine opf an angle can also be seen as the x coordinate of a point on the unit circle for any angle (actually ratio is the more proper term) on the unit circle.

Its hard to believe you are a programmer that doesnt know basic math.
Reply With Quote
  #5   Add DoctorDoom to your ignore list  
Old 2007-04-12, 05:52
DoctorDoom DoctorDoom is offline
Regular
 
Portsmouth, VA 23702 DoctorDoom is an unknown
Default Re: Cosine, do you know it?

Here's how I learned it.

Consider an xy coordinate graph. Now draw a circle with the center at the origin and a radius of one. This is the unit circle. Now, with a radius of 1, the circumference is 2*PI. The formula for the circle is x^2+y^2=1. It's no coincidence that the formula for a circle is the same as the Pythagorean Theorem for right triangles. If we want the coordiantes of any point on the circle, all we need is the length of the arc from (1,0) to the the point. This also corresponds to the angle between the x axis and the point, so you can either locate the point by angular degrees or PI radians.

If you're using trig tables or a calculator, it will give you sin and cos for any value between 0 and 90 degrees or 0 and PI/2 radians. There's an algorithm for calculating the values by hand, but I don't remember it. Consider an arbitrary point, like 45 degrees. When you look it up on the table, the sine is the y coordiate of that point on the unit circle. The cosine is the x cordinate. You can rewrite the formula for the unit circle to sin^2+cos^2=1.

So if you go back to that 45 degree point, (PI/4 radians) and drop a vertical line down to the X axis, you make a right triangle between the line you just drew, the X axis, and the radius (from 0,0 to x,y). In that triangle, the length of the side opposite the angle is the same as the Y coordiante (sin=y cord/radius or sin=opposite/hypotenuse), the cosine is the length of the adjacent side (cos=x cord/radius or cos=adjacent/hypotenuse). When you're doing trig problems, imagine the triangle sitting in the unit circle and you won't get confused about whether to use sine or cosine to solve the problem. Sin - opposite - y coordinate. Cos - adjacent - x coordinate.
Reply With Quote
  #6   Add RAOVQ to your ignore list  
Old 2007-04-12, 06:08
RAOVQ RAOVQ is offline
Regular
 
the happy land of australia RAOVQ is an unknown
Default Re: Cosine, do you know it?

i just think of it as witchcraft; a magic button that solves triangles.
Reply With Quote
  #7   Add Markoni to your ignore list  
Old 2007-04-12, 23:26
Markoni Markoni is offline
Regular
 
Markoni is an unknown
Default Re: Cosine, do you know it?

If you want to take the cosine of something, push the fucking cos button on your calculator! If you don't want to do that, you can expand it in a taylor series.
Reply With Quote
  #8   Add xXPhoenixFireXx to your ignore list  
Old 2007-04-13, 00:11
xXPhoenixFireXx xXPhoenixFireXx is offline
Regular
 
North Charleston xXPhoenixFireXx is an unknown
Default Re: Cosine, do you know it?

As a programmer you would be most interested in looking up the taylor series for the cosine function. This takes the cosine function and approximates it with a polynomial curve. The cool thing is, the more terms you add, the greater the precision you get. Since computers usually don't work wiht arbitrary precision, this is a good thing.

However, approximating cosine over the entire range of an input variable would take a hell of a lot of terms to approximate fully. But the cosine function is periodic. That means although the Taylor approximation gets less accurate the farther away your input gets from zero, you only need to approximate the first period, and then mod the input by 2*pi. Maybe even less if you take into account the fact that the period from pi to 2*pi is a reflection over the y-axis of the period from 0 to pi.

And while the answer you get is technically an approximation, you won't be able to tell.
Reply With Quote
  #9   Add lifejunkie to your ignore list  
Old 2007-04-14, 03:22
lifejunkie lifejunkie is offline
Moderator
 
A dream within a dream. Send a message via ICQ to lifejunkie lifejunkie is worth listening to lifejunkie is worth listening to lifejunkie is worth listening to lifejunkie is worth listening to
Default Re: Cosine, do you know it?

Quote:
Originally Posted by xXPhoenixFireXx View Post
As a programmer you would be most interested in looking up the taylor series for the cosine function. This takes the cosine function and approximates it with a polynomial curve. The cool thing is, the more terms you add, the greater the precision you get. Since computers usually don't work wiht arbitrary precision, this is a good thing.

However, approximating cosine over the entire range of an input variable would take a hell of a lot of terms to approximate fully. But the cosine function is periodic. That means although the Taylor approximation gets less accurate the farther away your input gets from zero, you only need to approximate the first period, and then mod the input by 2*pi. Maybe even less if you take into account the fact that the period from pi to 2*pi is a reflection over the y-axis of the period from 0 to pi.

And while the answer you get is technically an approximation, you won't be able to tell.
You actually only need from 0 to Pi/2. Everything else is mirrored in some fashion.
Reply With Quote
  #10   Add Basik to your ignore list  
Old 2007-04-15, 16:31
Basik Basik is offline
Acolyte
 
Canada Basik is an unknown
Default Re: Cosine, do you know it?

Cosine is really just a symbol that represents an infinite series.

cos(x) = 1 - (x^2)/2! + (x^4)/4! - (x^6)/6! + (x^8)/8! ...
Reply With Quote
This thread continued for 2 pages in the real archive, 17 posts total - only page 1 survived here.
Reply


Thread Tools
Show Printable Version Show Printable Version
Email this Page Email this Page
Display Modes
Linear Mode Linear Mode
Hybrid Mode Switch to Hybrid Mode
Threaded Mode Switch to Threaded Mode

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump

 
To the best of our knowledge, the text on this page may be freely reproduced and distributed.
 

totse.com certificate signatures
 
 
About | Community | Bad Ideas | Drugs | Ego | Erotica | Fringe | Society | Technology
Hot Topics