The sine and cosine of a sum · Mathematics Class 11–12 | StemPy Lab
Course 2.3·Lesson 1 of 3
The sine and cosine of a sum
The cosine of a sum is not the sum of the cosines. Two equal chords of the unit circle prove that cos(x+y)=cosxcosy−sinxsiny. From this one formula come the formulae for cos(x−y)
about 25 min1 simulation1 practice question1 Python program5 questions to check yourself
This lesson is free to read. Enroll free to keep your place and take the tests.
Lesson 1 of 3Show all lessonsHide
Try the code and the simulations beside the lesson.
A tempting mistake
Is cos(x+y) the same as cosx+cosy? Test it with x=y=3π.
The left side is cos32π=−21.
The right side is cos3π+cos3π=21+21=1.
The two are far apart. A trigonometric function does not split over a sum, as a bracket does. We need the true formula, and the unit circle gives it.
The proof on the unit circle
Take the unit circle, with centre O and radius 1. A point at the angle θ is (cosθ,sinθ). Mark four points:
P1=(cosx,sinx), at the angle x;
P2=(cos(x+y),sin(x+y)), at the angle x+y;
P3=(cos(−y),sin(−y))=(cosy,−siny), at the angle −y;
P4=(1,0), at the angle 0.
A unit circle with centre O and four points on it. P4 is at (1, 0). P1 is at the angle x, P2 at the angle x + y, and P3 at the angle minus y, below the x-axis. A red chord joins P1 and P3, and a blue chord joins P2 and P4. A note says that both chords face an angle of x + y at O, so they are equal.
The angle from P3 round to P1 is x−(−y)=x+y. The angle from P4 round to P2 is also x+y. Equal angles at the centre cut off equal chords, so P1P3=P2P4. Now square both lengths with the distance formula.
Each time, sin2θ+cos2θ=1 turns a pair of squares into 1. Set the two equal, and the key formula appears:
cos(x+y)=cosxcosy−sinxsiny
Notice the minus sign. It is the most common slip in this chapter.
Move both sliders. The two chords keep the same length, and the last two readouts always agree.
Five more formulae from one
Change y to −y. Since cos(−y)=cosy and sin(−y)=−siny, the sign in the middle flips:
cos(x−y)=cosxcosy+sinxsiny
Swap sine and cosine. Put x=2π in that formula. As cos2π=0 and sin2π=1, we get cos(2π−y)=siny. Writing 2π−y for y gives sin(2π−y)=cosy.
The sine of a sum. Now sin(x+y)=cos((2π−x)−y). Expand with the formula for cos(x−y) and use the two swaps:
sin(x+y)=sinxcosy+cosxsiny
sin(x−y)=sinxcosy−cosxsiny
The tangent. Divide sin(x+y) by cos(x+y), and then divide the top and the bottom by cosxcosy:
tan(x+y)=1−tanxtanytanx+tany
tan(x−y)=1+tanxtanytanx−tany
These hold when none of the tangents is undefined and the bottom is not 0.
Allied angles
Put a special angle into the formulae, and the allied angles follow. For example, cos(2π+x)=cos2πcosx−sin2πsinx=−sinx.
sin(2π+x)=cosx and cos(2π+x)=−sinx
sin(π−x)=sinx and cos(π−x)=−cosx
sin(π+x)=−sinx and cos(π+x)=−cosx
sin(23π−x)=−cosx and cos(23π−x)=−sinx
sin(23π+x)=−cosx and cos(23π+x)=sinx
A rule to remember them. With π or 2π, the function stays the same. With 2π or 23π, sine and cosine swap. For the sign, imagine x small and acute, see which quadrant the angle lands in, and use the sign of the first function there.
Exact values
The formulae give exact values for angles made of 30∘, 45∘ and 60∘:
sin15∘=sin(45∘−30∘)=21⋅23−21⋅21=46−2
As 75∘=90∘−15∘, the allied angles give cos75∘=sin15∘, the same number.
A worked example
cosA=1312 with A in the fourth quadrant, and sinB=53 with B in the second quadrant. Find cos(A−B).
The missing ratios.sinA=−135, negative in the fourth quadrant. cosB=−54, negative in the second quadrant.
The formula.cos(A−B)=cosAcosB+sinAsinB.
The numbers.1312⋅(−54)+(−135)⋅53=−6548−6515=−6563.
The signs come from the quadrants, never from the formula alone.
Practise with new numbers
Try it in Python
A formula that is true must hold at every angle. The program tests the formula for cos(x+y) at a thousand random pairs of angles, and also the wrong guess cosx+cosy.
The error of the formula is about 10−15: only the rounding of the computer. The guess misses by almost 3.
Common mistakes
Splitting over a sum.cos(x+y)=cosx+cosy, and sin2x=2sinx.
The sign of the cosine formula.cos(x+y) has a minus sign, and cos(x−y) has a plus sign. The sine formulae keep the sign of the angle.
Forgetting the quadrant.sin2A+cos2A=1 gives the size of the missing ratio. The quadrant gives its sign.
Using the tangent formula at 2π.tan2π is not defined, so tan(2π−x) needs sine and cosine. It equals cotx.
Remember these
cos(x±y)=cosxcosy∓sinxsiny
sin(x±y)=sinxcosy±cosxsiny
tan(x±y)=1∓tanxtanytanx±tany
With 2π or 23π, sine and cosine swap; with π they stay. The quadrant gives the sign.
Check yourself
Try each one on your own first. If you are stuck, open a hint. Then check with Show the answer.
Find the exact value of cos15∘.
Show that sin(x+y)sin(x−y)=sin2x−sin2y.
Write tan(π−x) in terms of tanx.
Ravi says that cos(x+y)=cosx+cosy. Test his rule at x=y=0.
Without a calculator, find sin75∘cos15∘+cos75∘sin15∘.
Enroll free in Sum and Difference Formulae
Every lesson is open to read. Enrolling also lets you:
Mark lessons done and carry on where you stopped.
Take the tests of this lesson and its course.
Count the course towards the certificate for its chapter.