# Does Mathematica know about trig identities?

I am calculating some geometry via two different ways in Mathematica. One uses a known trig identity the other doesn't.

We define angles of two right-angle triangles.

angFar = ArcTan[hiod/dist];
angNear = ArcTan[hiod/(dist - depth)];


Then calculate their difference

disp = FullSimplify[angNear - angFar]


This gives

-ArcTan[hiod/dist] + ArcTan[hiod/(-depth + dist)]


We then do the same recognising that beta-alpha == ArcTan[(Tan[beta] - Tan[alpha])/(1 + Tan[beta]*Tan[alpha])]

trigID = ArcTan[(Tan[beta] - Tan[alpha])/(1 + Tan[beta]*Tan[alpha])]


Substituting

dispViaTrigID =
FullSimplify[trigID /. {alpha -> angFar, beta -> angNear}]


Gives

ArcTan[(depth hiod)/(-depth dist + dist^2 + hiod^2)]


How do I show with Mathematica that disp==dispViaTrigID?

Additional Info requested

Diagram of the geometry

All variables are Real and greater than zero. Angles are 0<angle<Pi/2.

• {disp, dispViaTrigID} /. {hiod -> 2., depth -> 2., dist -> 1.} indicates they are not equivalent (which has to do with branch cut discontinuities -- see docs for ArcTan). You might need to use appropriate hypotheses. Or be satisfied with FullSimplify[Tan[disp] == Tan[dispViaTrigID]]. Jul 4 at 15:06
• Include a labeled graphic that shows the geometry that you are dealing with. Jul 4 at 15:09
• MichaelE2 and Bob Hanlon: Thanks, I think the diagram and edits will clarify. Jul 4 at 16:12
• Tan[disp] // FullSimplify gives the desired result. Jul 4 at 19:18
• As @MichaelE2 said, the two expressions are not equivalent for the whole definition domain. Therefore, some transformations involving inverse functions are not even attempted. Jul 5 at 9:04