I used some graphing for a much clear explanation.
The first function is an identity as it always yields unity. You got that? Great! Now the sum is a peace of cake.
Apply a little geometry (thanks physics for keeping you employed there) and you will easily get the req angle.