This trig identity shows that a combination of sine and cosine functions can be written as a single sine function with a phase shift.

$$a \cos{t} + b \sin{t} = \sqrt{a^2 + b^2} \; \sin(t + \tan^{-1} \frac{a}{b}) $$

for *b* ≠ 0 and − ^{π}⁄_{2} < tan^{−1} ^{a}⁄_{b} < ^{π}⁄_{2}

(Note that
tan^{−1}
means
arctan
.) The phase shift is the quantity
tan^{−1} ^{a}⁄_{b}
, it has the effect of shifting the graph of the sine function to the left or right.

To derive this trig identity, we presume that the combination
*a* cos(*t*) + *b* sin(*t*)
can be written in the form
*c* sin(*K* + *t*)
for unknown constants
*c*, *K*
.

*a* cos(*t*) + *b* sin(*t*) = *c* sin(*K* + *t*)

*a* cos(*t*) + *b* sin(*t*) = *c* sin(*K*) cos(*t*) + *c* cos(*K*) sin(*t*)

We used the formula for sine of a sum of angles to expand the right hand side above. To have equality for any value of
*t*
, the coefficients of
cos(*t*)
and
sin(*t*)
must be equal on the left and right sides of the equation.

*a* = *c* sin(*K*)

*b* = *c* cos(*K*)

Solving this system of simultaneous equations leads us to

*c* = ± √(*a*^{2} + *b*^{2})

*K* = tan^{−1} ^{a}⁄_{b}

So the trig identity for
*b* ≠ 0
is

*a* cos(*t*) + *b* sin(*t*) = ± √(*a*^{2}+*b*^{2}) sin(*t* + tan^{−1} ^{a}⁄_{b})

If we limit the arctan to be within

− ^{π}⁄_{2} < tan^{−1} ^{a}⁄_{b} < ^{π}⁄_{2}

then we can always choose the + in front of the square root.