If A = 600 and B = 300, verify that
(i) sin (A + B) = sin A cos B + cos A sin B
(ii) cos (A + B) = cos A cos B – sin A sin B
(iii) sin (A – B) = sin A cos B – cos A sin B
(iv) tan (A – B) = (tan A – tan B)/ (1 + tan A tan B).
Don't Spam
Answers
This will check conditions 2 and 3, even if 1 is already true. As your conditions can be quite expensive functions, you can get a good performance boost by using them.
There is one big caveat, NullReferences or similar problems. For example:
if(class != null && class.someVar < 20)
If class is null, the if-statement will stop after class != null is false. If you only use &, it will try to check class.someVar and you get a nice NullReferenceException. With the Or-Operator that may not be that much of a trap as it's unlikely that you trigger something bad, but it's something to keep in mind.
No one ever uses the single & or | operators though, unless you have a design where each condition is a function that HAS to be executed. Sounds like a design smell, but sometimes (rarely) it's a clean way to do stuff. The & operator does "run these 3 functions, and if one of them returns false, execute the else block", while the | does "only run the else block if none return false" - can be useful, but as said, often it's a design smell.
Answer:
Verified.
Step-by-step explanation:
600 can be written as 540° + 60°
= 180°* 3 + 60°
= 180° + 60° (3 times 180 will lie on 180)
= 60° ( multiple of π)
This will lie in the 3rd quadrant
In this question, we require sin 600° and cos 600°
Therefore sin (600°) = sin(180° + 60°)
In the third quadrant, sin is negative
Therefore, sin(180° + 60°) = - sin 60° = -√3/2
Similarly, cos (600°) = cos(180° + 60°)
In the third quadrant, cos is negative
Therefore, cos(180° + 60°) = - cos 60° = -1/2
Therefore, sin 600° = -√3/2 and cos 600° = -1/2 and tan 600° = √3
Similarly, sin 300° = -√3/2 and cos 300° = 1/2 and tan 300° = -√3
Similarly, sin 900° = 0 and cos 900° = -1 and tan 900° = 0
Here, directly substituting the value of A=600°, B = 300° and A+B = 900°
(i) LHS = 0
RHS = -√3/2 * 1/2 + -1/2 * -√3/2 = 0
(ii) LHS = -1
RHS = -1/2 * 1/2 - (-√3/2 * -√3/2) = -1
(iii) LHS = -√3/2
RHS = -√3/2 * 1/2 - (-1/2 * -√3/2) = -√3/2
(iii) LHS = -√3
RHS = [√3 - (-√3)]/ [ 1+ √3*(-√3)]= -√3
Hence verified.