Originally Posted by

**rgep** There's a standard technique for dealing with combinations such as sin(X) + cos(X), or, more generally, A.sin(X) + B.cos(X) for constants A and B (you have A=B=1). The idea is to reverse engineer the simplification sin(X+Y) = sin(X).cos(Y) + cos(X).sin(Y). So your first shot would be that you want A = cos(Y) and B = sin(Y), but that doesn't always happen, since sin^2(Y)+cos^2(Y) = 1, but it might not happen that A^2+B^2 = 1. So take out a factor of C = sqrt(A^2+B^2), and then look for a Y such that C.sin(Y) = A and C.cos(Y) = B. Dividing, tan(Y) = A/B, so that Y is arctan(A/B).

In your case, A=B=1 so Y = arctan(1/1) = pi/4 and C = sqrt(1^2+1^2) = sqrt(2). Thus sin(X) + cos(X) = sqrt(2).sin(X+pi/4).