Archived

This topic is now archived and is closed to further replies.

curlious

Identity sin(A+B)=sin(A)cos(B)+sin(B)cos(A)

Recommended Posts

Reviewing a little trig I was wandering what are some uses for the identity sin(A+B)=sin(A)cos(B)+sin(B)cos(A) in 2d graphics. [edited by - curlious on October 13, 2003 11:30:10 PM]

Share this post


Link to post
Share on other sites
It comes in handy in simplifying various equations, especially in preparation to integrate them.


How appropriate. You fight like a cow.

Share this post


Link to post
Share on other sites
When was the last time you had to simplify sin(A)cos(B)+sin(B)cos(A)? I can''t even think of any other cases where it would be useful since sin(A)cos(B)+sin(B)cos(A) doesn''t have a factor so it wouldn''t help reducing if you had sin(A+B)/something.

Share this post


Link to post
Share on other sites
quote:
Original post by clum
When was the last time you had to simplify sin(A)cos(B)+sin(B)cos(A)? I can''t even think of any other cases where it would be useful since sin(A)cos(B)+sin(B)cos(A) doesn''t have a factor so it wouldn''t help reducing if you had sin(A+B)/something.

No, you do it the other way around. You change sin(A+B) into sin(A)cos(B)+sin(B)cos(A) while simplifying.

Trust me on this. You often don''t want multiple terms inside transcendental functions when simplifying, and this is one of the tools you have at your disposal in eliminating them. It''s an extremely useful equation.


How appropriate. You fight like a cow.

Share this post


Link to post
Share on other sites
sin(2A) = sin(A+A) = sin(A)cos(A)+sin(A)cos(A) = 2sin(A)cos(A)

I tend to find that variation of it useful, especially in situations like this:

sin(2A) = cos(A)

because of course you can get

2sin(A)cos(A) = cos(A)
2sin(A) = 1
sin(A) = 0.5

and thus solve for A.

Superpig
- saving pigs from untimely fates, and when he''s not doing that, runs The Binary Refinery.
Enginuity1 | Enginuity2 | Enginuity3 | Enginuity4
ry. .ibu cy. .abu ry. dy. "sy. .ubu py. .ebu ry. py. .ibu gy." fy. .ibu ny. .ebu

Share this post


Link to post
Share on other sites
Take a class on ordinary differential equations and you will find all the annoying trig identities come back to haunt you because there are many things that are modeled using either combinations of sin and cos or multiple terms inside a single sin or cos. Take for example the function for an oscillating system which is u(t) = A*sin(w(0)*t+d). That function right there is really obnoxious to integrate but you can expand it and make it some form of u = c1*cos(w(0)*t) + c2*sin(w(0)*t) and make your life a lot easier.

Share this post


Link to post
Share on other sites
You can also use it to figure out the sin of (whatever) by inserting in two degrees of sin that you do know.
For example:
>What is the sin of 135 degrees?
>What two degrees that you do know make up 135... 90 and 45 degrees? sin(90)=1, cos(90)=0, sin(45)=.707, cos(45)=.707
>So... sin(90+45)=sin(90)*cos(45)+cos(90)*sin(45)
> sin(135) == sin(90)*cos(45)+cos(90)*sin(45)

If you have a dad like mine, he will make you memorize all the sin,cos,tangent equations with the unit circle.

Share this post


Link to post
Share on other sites
quote:
Original post by Xiachunyi
If you have a dad like mine, he will make you memorize all the sin,cos,tangent equations with the unit circle.
Thank God, I am not you.

Share this post


Link to post
Share on other sites
quote:

2sin(A)cos(A) = cos(A)
2sin(A) = 1
sin(A) = 0.5

and thus solve for A.



But you missed a solution, when cos(A) = 0... You should be wary of dividing with variable expressions when they can equal 0. Here is a better way of solving the equation:

2sin(a)cos(a) = cos(a)
2sin(a)cos(a) - cos(a) = 0
cos(a)(2sin(a) - 1)) = 0

So either cos(a) = 0 or (2sin(a) - 1) = 0.

Share this post


Link to post
Share on other sites
Using a vector to rotate another vector without storing an angle, thus bypassing using sin and cos as much as possible? (sort of like a matrix, except just for rotation and scaling)

a.x = cos(angle)
a.y = sin(angle)

b = vector2(...);

c.x = a.x*b.x-a.y*b.y; // cos(a+b) = cos(a)cos(b)-sin(a)sin(b)
c.y = a.y*b.x+b.y*a.x; // sin(a+b) = sin(a)cos(b)+sin(b)cos(a)


(I think I messed up the cos(a+b) one, but the idea is the same)

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
I used it several times for physics problems. If you have two sound waves of close frequencies and you add them, you get a new wave with some special properties (modulation,..). This happens with light too and diffraction/interference stuff.

Share this post


Link to post
Share on other sites
quote:
Original post by Muzzafarath
quote:

2sin(A)cos(A) = cos(A)
2sin(A) = 1
sin(A) = 0.5

and thus solve for A.



But you missed a solution, when cos(A) = 0... You should be wary of dividing with variable expressions when they can equal 0. Here is a better way of solving the equation:

2sin(a)cos(a) = cos(a)
2sin(a)cos(a) - cos(a) = 0
cos(a)(2sin(a) - 1)) = 0

So either cos(a) = 0 or (2sin(a) - 1) = 0.


Hey, I never said I was *good* at using it that way.

Richard "Superpig" Fine
- saving pigs from untimely fates, and when he''s not doing that, runs The Binary Refinery.
Enginuity1 | Enginuity2 | Enginuity3 | Enginuity4
ry. .ibu cy. .y''ybu. .abu ry. dy. "sy. .ubu py. .ebu ry. py. .ibu gy." fy. .ibu ny. .ebu
OpenGL is a language

Share this post


Link to post
Share on other sites