2
$\begingroup$

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

enter image description here

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

$\endgroup$
6
  • 1
    $\begingroup$ {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]]. $\endgroup$
    – Michael E2
    Jul 4 at 15:06
  • 1
    $\begingroup$ Include a labeled graphic that shows the geometry that you are dealing with. $\endgroup$
    – Bob Hanlon
    Jul 4 at 15:09
  • $\begingroup$ MichaelE2 and Bob Hanlon: Thanks, I think the diagram and edits will clarify. $\endgroup$
    – flyingmind
    Jul 4 at 16:12
  • 2
    $\begingroup$ Tan[disp] // FullSimplify gives the desired result. $\endgroup$
    – yarchik
    Jul 4 at 19:18
  • 1
    $\begingroup$ As @MichaelE2 said, the two expressions are not equivalent for the whole definition domain. Therefore, some transformations involving inverse functions are not even attempted. $\endgroup$
    – yarchik
    Jul 5 at 9:04

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.