Jump to content
Sign in to follow this  
noz92

sin and cos

Recommended Posts

After studying the functions on my scientific calculator, I came across sin and cos. I've heard people talking about them on NASA TV, but never learned what it was.

 

Could somebody explain them to me?

Share this post


Link to post
Share on other sites

they are ratios of the sides of a right triangle. like the sine of 60degrees is 1/2.

 

sine(sin) is opposite side over hypotenuse

cosecant(csc) is the inverse of sin. it is hypotenuse over opposite side

 

cosine(cos) is the cofunction of sine. it is adjacent side over hypotenuse

secant(sec) is the inverse of cosine. it is hypotenuse over adjacent side

 

tangent(tan) is opposite side over adjacent side.

cotangent(cot) is both the inverse and cofunction of tangent. it is adjacent side over opposite side

 

in the first quadrant, all six trig functions are positive

 

in the second quadrant, sine and cosecant are positive while the rest are negative

 

in the third quadrant, tangent and cotangent are positive while the rest are negative

 

in the forth quadrant, cosine and secant are positive while the rest are negative

Share this post


Link to post
Share on other sites

Erm, I think you'll find that csc, sec and cot are not the inverses of their associated functions. Rather,

 

[math]\csc(x) = \frac{1}{\sin(x)}[/math], [math]\sec(x) = \frac{1}{\cos(x)}[/math], and [math]\cot(x) = \frac{1}{\tan(x)}[/math]

 

Inverse functions are arcsin, arccos and arctan respectively. Totally different things.

Share this post


Link to post
Share on other sites

sorry, wrong word.

 

what are they then? if i hit sin then the inverse button on my calc, i get the csc of what i put in for sin. what was the word for them then? reciprocal functions?

Share this post


Link to post
Share on other sites
if i hit sin then the inverse button on my calc, i get the csc of what i put in for sin. what was the word for them then? reciprocal functions?

The inverse you are thinking of is the "multiplicative inverse," which is the same thing as reciprocal. For a nonzero number x, its multiplicative inverse is 1/x. This is different from an inverse function. For a function f(x), its inverse is a function g(x) such that f(g(x)) = 1 for all x.

Share this post


Link to post
Share on other sites

How is calculation of sine and cosine hardwired ? Do you go about exploiting series expansion or do you use a definate integral ?

Share this post


Link to post
Share on other sites
How is calculation of sine and cosine hardwired ? Do you go about exploiting series expansion or do you use a definate integral ?
I think they use taylor series and such, but I'm not that sure. I don't think that strictly numerical methods would work in general since most of them require the calculation of the function value or its derivative (which defeats the point in this case).

Share this post


Link to post
Share on other sites

I've heard that they will generally use some form of Taylor expansion to give the desired degree of accuracy.

Share this post


Link to post
Share on other sites

So is calculation of sin and cos hardwired or is it computed using simpler operations ?

Share this post


Link to post
Share on other sites
So is calculation of sin and cos hardwired or is it computed using simpler operations ?
Even though I obviously don't know enough about this to justify trying to answer twice, here goes: if by "hardwired" you mean that the calculator simply stores a huge array of ordered pairs corresponding to a sine or cosine function so that the input number is matched with the appropriate output number (rather than it being calculated by the computer upon execution), no, I'm almost positive that it's not done that way. In fact, I believe that sin and cos functions in one of the C math libraries can take a long time to compute (compared to the basic +, -, *, / operators), which would indicate that a calculation (such as a taylor series) is being performed.

 

But when you look at the functions, there's a shockingly small range of values that need be calculated -- all you really need is one quarter of a period (e.g. the part from sin(0) to sin(pi/2)), since the rest of the function, or both, actually, is/are composed of identical curves that have been flipped around. So they may only need a few terms of the Taylor series to get decent accuracy.

 

So yeah, I'd say it's a bunch of simple polynomial operations, like ".4-.4*.4*.4/6+.4*.4*.4*.4*.4/120" or something.

Share this post


Link to post
Share on other sites

heh

 

I'm pretty sure they use the Taylor expansion.

 

It's actually quite funny when I input a large sum of sines & cosines into my scientific calculator, and it returns an "Error 3"

Share this post


Link to post
Share on other sites
Even though I obviously don't know enough about this to justify trying to answer twice' date=' here goes: if by "hardwired" you mean that the calculator simply stores a huge array of ordered pairs corresponding to a sine or cosine function so that the input number is matched with the appropriate output number (rather than it being calculated by the computer upon execution), no, I'm almost positive that it's not done that way. In fact, I believe that sin and cos functions in one of the C math libraries can take a long time to compute (compared to the basic +, -, *, / operators), which would indicate that a calculation (such as a taylor series) is being performed.

 

But when you look at the functions, there's a shockingly small range of values that need be calculated -- all you really need is one quarter of a period (e.g. the part from sin(0) to sin(pi/2)), since the rest of the function, or both, actually, is/are composed of identical curves that have been flipped around. So they may only need a few terms of the Taylor series to get decent accuracy.

 

So yeah, I'd say it's a bunch of simple polynomial operations, like ".4-.4*.4*.4/6+.4*.4*.4*.4*.4/120" or something.[/quote']

 

I did not mean a ROM when I said hardwired.

I meant more of an electronic circuit that does sin/cos calculation. ( Think of adders, dividers, sqare root calculators etc. )

Share this post


Link to post
Share on other sites

I don't think so. You can derive sin/cos quite accurately and quickly without having dedicated circuits. As far as I'm aware, basic calculators usually have only the most basic of operations, namely addition and multiplication and from those you can derive every other function on the calculator.

Share this post


Link to post
Share on other sites

Actually, I recently had a discussion with a graduate student and he was telling me that we calculate sines and cosines with Taylor series, but the calculator does not use this.

 

Calculators use a variable storing system and a program called CORDIC. The explanation he gave was kind of abstract, but at least now I'm sure the calculator does not use approximations or Taylor.

Share this post


Link to post
Share on other sites

Yes, Taylor series is slow and has a limited range. It's much more common to use an iterative algorithm that locates the position of a point x degress from the axis on a circle, and derives the sin and cosine from that, or, as has been mentioned above, the CORDIC algorithm. To generalize, CORDIC is an iterative process that usually uses a tangent table, but can also be done with smaller and smaller vector rotations. You can read about it here: http://www.worldserver.com/turk/computergraphics/FixedPointTrigonometry.pdf

Share this post


Link to post
Share on other sites

As a side note, CORDIC can also be used to calculate functions other that sine and cosine, such as logarithms and square roots.

Share this post


Link to post
Share on other sites

Hahaha only partially--alot of free mathematica-like programs use Taylor series still, such as Maxima

Share this post


Link to post
Share on other sites

How hard is it to make a dedicated square root or sin/cos circuit ?

I intend to make a digital electronics project by the end of the week, I was thinking of building one of the above.

Share this post


Link to post
Share on other sites

I understand that [math]\sin = \frac{opposite}{hypotonuse}[/math], and the other ones, but what do we use to find the leanths of opposite and hypotonuse. [math]\sin 76 \thickaprox 0.929776485[/math], and [math]\cos 76 \thickaprox 0.368124552[/math], I understand that and all the others, but what unit of mesurement do we use to find the leanths of the opposite, hypotonuse, and adjecent sides?

Share this post


Link to post
Share on other sites
I understand that and all the others, but what unit of mesurement do we use to find the leanths of the opposite, hypotonuse, and adjecent sides?

 

whatever you want. m, cm, in., ft, mi, km, ...

 

you don't have enough info with just an angle and it's sine/cosine to find solve the triangle.

Share this post


Link to post
Share on other sites

at least another side.

 

law of sines

[math]\frac{a}{sin\alpha}=\frac{b}{sin\beta}=\frac{c}{sin\gamma}[/math]

 

law of cosines

[math]c_^2=a^2+b^2-2ab(cos\gamma)[/math]

a thing i like about the law of cosines is that if you put a right angle in for [math]\gamma[/math], you get the pythagorean theorem.

Share this post


Link to post
Share on other sites

What are all of the greek letters representing?

 

And what's wrong with the LaTeX?

Share this post


Link to post
Share on other sites

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  

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.