Derivation of Sum and Difference of Two Angles
The sum and difference of two angles can be derived from the figure shown below.
Consider triangle AEF:
cosβ=¯AE1;¯AE=cosβ
sinβ=¯EF1;¯EF=sinβ
From triangle EDF:
sinα=¯DE¯EF
sinα=¯DEsinβ
¯DE=sinαsinβ
cosα=¯DF¯EF
cosα=¯DFsinβ
¯DF=cosαsinβ
¯BC=¯DE=sinαsinβ
From Triangle ACE:
sinα=¯CE¯AE
sinα=¯CEcosβ
¯CE=sinαcosβ
cosα=¯AC¯AE
cosα=¯ACcosβ
¯AC=cosαcosβ
¯BD=¯CE=sinαcosβ
The summary of the above solution is shown below:

Sum of two angles
From triangle ABF:
sin(α+β)=¯BD+¯DF
cos(α+β)=¯AC−¯BC
tan(α+β)=sin(α+β)cos(α+β)
tan(α+β)=sinαcosβ+cosαsinβcosαcosβ−sinαsinβ
tan(α+β)=sinαcosβcosαcosβ+cosαsinβcosαcosβcosαcosβcosαcosβ−sinαsinβcosαcosβ
tan(α+β)=sinαcosα+sinβcosβ1−sinαcosαsinβcosβ
Difference of two angles
Let β = -β and note that
sin (-β) = -sin β
cos (-β) = cos β and
tan (-β) = -tan β
sin[α+(−β)]=sinαcos(−β)+cosαsin(−β)
cos[α+(−β)]=cosαcos(−β)−sinαsin(−β)
tan[α+(−β)]=tanα+tan(−β)1−tanαtan(−β)