# 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 on other sites

Sine and Cosine are trigonometry (trigonomitrical?) functions.

sorry, having trouble making the definitions and latex, so try Wikipedia:

http://en.wikipedia.org/wiki/Sine

##### 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 on other sites

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

$\csc(x) = \frac{1}{\sin(x)}$, $\sec(x) = \frac{1}{\cos(x)}$, and $\cot(x) = \frac{1}{\tan(x)}$

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

##### 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 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 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 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 on other sites

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

##### Share on other sites

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

##### 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 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 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 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 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 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 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 on other sites

Looks like I was wrong then

##### Share on other sites

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

##### 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 on other sites

• 2 months later...

I understand that $\sin = \frac{opposite}{hypotonuse}$, and the other ones, but what do we use to find the leanths of opposite and hypotonuse. $\sin 76 \thickaprox 0.929776485$, and $\cos 76 \thickaprox 0.368124552$, 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 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 on other sites

at least another side.

law of sines

$\frac{a}{sin\alpha}=\frac{b}{sin\beta}=\frac{c}{sin\gamma}$

law of cosines

$c_^2=a^2+b^2-2ab(cos\gamma)$

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

##### Share on other sites

What are all of the greek letters representing?

And what's wrong with the LaTeX?

## Create an account

Register a new account