5
$\begingroup$

I want to simplify the expression $\tan(\arctan(a) - \arctan(b))$ to $\tfrac{a-b}{1+a\cdot b}$ (if $b \neq - \tfrac{1}{a}$). Right now, the output of

FullSimplify[Tan[ArcTan[a] - ArcTan[b]], {a > 0, b > 0, a < Pi/2, b < Pi/2}]    

is the same as the input. The assumptions are to assure that $b \neq -\tfrac{1}{a}$ and to give the right branch for the inverse ArcTan.

Previous answers suggest the use of ComplexityFunction, although I'm not sure how to use that in this case. Is Mathematica able to simplify this?

$\endgroup$
13
$\begingroup$

Here's two possibilities:

Simplify[TrigExpand[Tan[ArcTan[a] - ArcTan[b]]]]
(a - b)/(1 + a b)
FullSimplify[Tan[ArcTan[a] - ArcTan[b]], 
  ComplexityFunction -> (LeafCount[#] + 1000 Count[#, ArcTan[_], Infinity] &)]
(a - b)/(1 + a b)
$\endgroup$

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.