6
$\begingroup$

I run this code:

Simplify[ArcTanh[x] + ArcTanh[y]]

and it keeps returning:

ArcTanh[x] + ArcTanh[y]

How do I direct it to simplify it that way ?

$\endgroup$
13
$\begingroup$

A little bit of trickery:

ArcTanh[x] + ArcTanh[y] // Tanh // TrigExpand // FullSimplify // ArcTanh

   (* ArcTanh[(x + y)/(1 + x y)] *)

Note the parentheses.

$\endgroup$
  • $\begingroup$ TrigToExp in place of TrigExpand works as well. The order of the last two commands also seems not to matter. $\endgroup$ – Semiclassical Aug 18 '16 at 19:02
  • $\begingroup$ The only thing I don't like about TrigToExp[] is that the underlying algebraic function is not returned at once, which makes FullSimplify[] do more work. $\endgroup$ – J. M. is away Aug 19 '16 at 8:50
6
$\begingroup$

Probably, MathematicalFunctionData["ArcTanh"] knows about this.

First let's see what categories of things are known:

MathematicalFunctionData["ArcTanh", "Properties"]

ah well, let's just list them all (this will take a while to download the first time around)

all = DeleteDuplicates@Flatten[MathematicalFunctionData["ArcTanh", #] & /@ 
 MathematicalFunctionData["ArcTanh", "Properties"]];

now let's look whether that fact about ArcTanh[_] + ArcTanh[_] is in there

facts = Cases[all,
  Function[{_, _}, 
   e_ /; Not@FreeQ[e, Inactivate[ArcTanh[_] + ArcTanh[_]]]]
  ];

maybe some of these help. Let's Activate them.

activefacts = Through[facts[x, y]] // Activate  

drop some conditions

activefacts = Assuming[x \[Element] Reals && y \[Element] Reals, FullSimplify@activefacts];

Now

activefacts /. {x -> ..., y -> ...}

should be a list of True, Undefined or Indeterminate == ... for any real x and y.

(However, it seems to break here for exactly one of them being 1, the other not, activefacts /. {x -> 1, y -> 0.9} is {False, Undefined, False})


I think this is a method worth knowing in general.

For example, use

all = MathematicalFunctionData["Sinh", #] & /@ 
   MathematicalFunctionData["Sinh", "Properties"];
all = Flatten@all;
Cases[all,
 Function[{_, _}, e_ /; Not@FreeQ[e, Inactivate@Sinh[_ + _]]]
 ]

to learn everything MathematicalFunctionData knows about $\sinh(x + y)$.

$\endgroup$
5
$\begingroup$

This is just not true for all (x,y):

(ArcTanh[x] + ArcTanh[y] - ArcTanh[x + y/(1 - x y)]) /. x -> 0.23 /.y -> .323

-0.0916564

or

(ArcTanh[x] + ArcTanh[y] - ArcTanh[(x + y)/(1 - x y)]) /.x -> 0.23 /. y -> .323

-0.11988

Solve[ArcTanh[x] + ArcTanh[y] == ArcTanh[x + y/(1 - x)], {x, y}]

{{x -> 0}, {y -> 0}, {y -> -1 - x + x^2}}

$\endgroup$
  • $\begingroup$ The formula originally used by the OP is wrong, but there is a similar one that is true. See my comment on the original question. $\endgroup$ – Michael Seifert Aug 18 '16 at 16:21
4
$\begingroup$

You should define a replacement rule somehow. You can store that rule in a variable and apply it locally.

rule = ArcTanh[x_] + ArcTanh[y_] :> ArcTanh[x + y/(1 - x)];

(* only first two terms are merged *)
ArcTanh[x] + ArcTanh[y] + ArcTanh[z] /. rule

ArcTanh[x + y/(1 - x)] + ArcTanh[z]

(* merging until rule no longer applies *)
ArcTanh[x] + ArcTanh[y] + ArcTanh[z] //. rule

ArcTanh[x + y/(1 - x) + z/(1 - x - y/(1 - x))]

Or you can associate the rule with ArcTanh directly. However, that is a System symbol and System symbols are (without exception I think) Protected, so do Unprotect first.

Unprotect[ArcTanh];
ArcTanh /: ArcTanh[x_] + ArcTanh[y_] := ArcTanh[x + y/(1 - x y)]
Protect[ArcTanh];

If you do this, ArcTanh behaves as desired and defined on its own, every time.

$\endgroup$
1
$\begingroup$

You can visit the documentation center of Mathematica for trigonometric expressions at this address tutorial/TrigonometricExpressions for more info.

In case you need its algebraic simplification you can use this code:

TrigToExp[ArcTanh[x] + ArcTanh[y]]

Which returns this as a result:

-(1/2) Log[1 - x] + 1/2 Log[1 + x] - 1/2 Log[1 - y] + 1/2 Log[1 + y]

$\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.