Are you sure you typed the formula correctly? I don't believe the two sides are equal. I tried values of theta = 0.1 and phi = 0.2 and I get a result of -1.59 for the left side and +1.55 for the right side.
Are you sure you typed the formula correctly? I don't believe the two sides are equal. I tried values of theta = 0.1 and phi = 0.2 and I get a result of -1.59 for the left side and +1.55 for the right side.
Update - the formula is indeed correct. My mistake was in relying on my PC to provide the arctan calculation, and forgetting that it can be plus or minus pi. With that correction the formula does indeed work. Sorry for the earlier post.