# Formulas for Adding and Subtracting Arguments

For any real numbers `alpha` and `beta` following formulas are true:

- `cos(alpha+beta)=cos(alpha)cos(beta)-sin(alpha)sin(beta)`,
- `cos(alpha-beta)=cos(alpha)cos(beta)+sin(alpha)sin(beta)`,
- `sin(alpha+beta)=sin(alpha)cos(beta)+cos(alpha)sin(beta)`,
- `sin(alpha-beta)=sin(alpha)cos(beta)-cos(alpha)sin(beta)`,
- `tan(alpha+beta)=(tan(alpha)+tan(beta))/(1-tan(alpha)tan(beta))`,
- `tan(alpha-beta)=(tan(alpha)-tan(beta))/(1+tan(alpha)tan(beta))`.

These formulas are called **formulas for adding and subtracting arguments**.

Fomula (5) holds when `alpha,beta,alpha+beta` are not equal `pi/2+pik,k in ZZ` (in other words when tangent is defined). Formula (6) holds when `alpha,beta,alpha-beta` are not equal `pi/2+pik, k in ZZ`.

**Example 1 **. Find `sin(75^0)`.

We have that `sin(75^0)=sin(30^0+45^0)`.

Using formula (3) with `alpha=30^0,beta=45^0` we obtain that `sin(30^0+45^0)=sin(30^0)cos(45^0)+cos(30^0)sin(45^0)`.

It is known that `sin(30^0)=1/2,cos(30^0)=(sqrt(3))/2,cos(45^0)=sin(45^0)=(sqrt(2))/2`.

Therefore, `sin(75^0)=sin(30^0+45^0)=1/2*(sqrt(2))/2+(sqrt(3))/2*(sqrt(2))/2=(sqrt(2)+sqrt(6))/4`.

**Example 2**. Find `tan(pi/4+alpha)` if `tan(alpha)=3/4`.

Using formula (5) and fact that `tan(pi/4)=1` we have that

`tan(pi/4+alpha)=(tan(pi/4)+tan(alpha))/(1-tan(pi/4)tan(alpha))=(1+tan(alpha))/(1-tan(alpha))=(1+3/4)/(1-3/4)=7`.