Re: Re: Re: Hyperbolic function identity

• To: mathgroup at smc.vnet.net
• Subject: [mg51000] Re: [mg50964] Re: [mg50945] Re: [mg50932] Hyperbolic function identity
• Date: Fri, 1 Oct 2004 04:48:23 -0400 (EDT)
• References: <200409300852.EAA26465@smc.vnet.net> <EC6856EA-12D4-11D9-8846-000A95B4967A@mimuw.edu.pl> <E5587780-12E6-11D9-9AC3-000A95B4967A@mimuw.edu.pl>
• Sender: owner-wri-mathgroup at wolfram.com

```With your complexity function zero has a higher complexity
than the expression returned by FullSimplify.

In[1]:= cf1=(1/(1 + Count[#1, Log, Infinity, Heads -> True]) & );

In[2]:= cf1[2*(Log[2] - Log[z + Sqrt[z^2 + 4]]) +
Log[z^2 + Sqrt[z^2 + 4]*z + 2] - Log[2]]

1
Out[2]= -
5

In[3]:= cf1[0]

Out[3]= 1

If the ComplexityFunction favors transformation of
ArcSinh and ArcCosh to logs, but also takes LeafCount
into account, one call to FullSimplify is enough.

In[4]:= cf2[e_]:=1000 Count[e, _ArcSinh|_ArcCosh,
{0, Infinity}]+LeafCount[e]

In[5]:= FullSimplify[ArcCosh[1 + z^2/2] -
2*ArcSinh[z/2], z>0, ComplexityFunction -> cf2]

Out[5]= 0

Best Regards,

Wolfram Research

Andrzej Kozlowski wrote:
> *This message was transferred with a trial version of CommuniGate(tm) Pro*
> Here is a puzzling observation.
>
>
> FullSimplify[FullSimplify[ArcCosh[1 + z^2/2] -
>     2*ArcSinh[z/2], ComplexityFunction ->
>     (1/(1 + Count[#1, Log, Infinity, Heads ->
>          True]) & )], z > 0]
>
>
> 0
>
>
> I used a silly looking ComplexityFunction whose only purpse was to force
> FullSimplify to choose expressions involving logs in preference to those
> without them. FullSimplify obviously made use of TrigToExp or something
> like that to get the answer. However, the really curious thing is this:
>
>
> FullSimplify[ArcCosh[1 + z^2/2] - 2*ArcSinh[z/2], z > 0,
>   ComplexityFunction ->
>    (1/(1 + Count[#1, Log, Infinity, Heads -> True]) & )]
>
>
> 2*(Log[2] - Log[z + Sqrt[z^2 + 4]]) +
>   Log[z^2 + Sqrt[z^2 + 4]*z + 2] - Log[2]
>
>
> FullSimplify[%, z > 0]
>
> 0
>
> The fact that two applications of FullSimplify were needed seems strange
> to me and it might be a bug. One would have exected that having obtained
> the first expression above FullSimplify would make one more attempt at
> FullSImplifying thus obtaining the answer 0. Somehow it fails to do so.
>
> Andrzej
>
>
>
> On 30 Sep 2004, at 20:36, Andrzej Kozlowski wrote:
>
>> It seems to me that the problem lies elsewhere. Note that
>>
>> FullSimplify[ArcCosh[1 + z^2/2] - 2*ArcSinh[z/2], z > 0,
>>    TransformationFunctions -> {Automatic, TrigToExp}]
>>
>> does not work and you have to use:
>>
>> Simplify[ArcCosh[1+z^2/2]-2*ArcSinh[z/
>>          2],z>0,TransformationFunctions->{Automatic,
>>      FullSimplify[TrigToExp[#],z>0]&}]
>>
>> It looks to me more likely that TrigToExp is actually used as a
>> transformation function by FullSimplify while searching for the
>> "simplest" form, but unless the condition z>0 is also used at the same
>> time the expressions obtained in this way do not actually become
>> "simpler" and are discarded. I don't think this can be helped unless
>> FullSimplify with the condition z>0 is itself included among the
>> transformation functions (which of course seems rather pointless in
>> this case as you can just apply it to the entire expression itself).
>>
>> Andrzej
>>
>> On 30 Sep 2004, at 17:52, Wolf, Hartmut wrote:
>>
>>>
>>> No course to blame Mathematica. We do have TrigToExp and ExpToTrig, but
>>> cannot keep them both at the same time (no confluent ruleset).  So
>>> without
>>> meta-rules, a choice must be made by the user.
>>>
>>> --
>>> Hartmut
>>>
>>>
>>>> -----Original Message-----
>>>> From: Maxim A. Dubinnyi [mailto:maxim at nmr.ru]
To: mathgroup at smc.vnet.net
>>>
>>>
>>>> Sent: Wednesday, September 29, 2004 9:15 AM
>>>> To: mathgroup at smc.vnet.net
>>>> Subject: [mg51000] [mg50964] [mg50945] Re: [mg50932] Hyperbolic function identity
>>>>
>>>>
>>>> This works correctly:
>>>>
>>>> FullSimplify[TrigToExp[ArcCosh[1+(z^2)/2]-2*ArcSinh[z/2]], z > 0]
>>>>
>>>> It looks like that mathematica works better with logarithms and
>>>> exponents then with trigonometric functions.
>>>>
>>>> Carlos Felippa wrote:
>>>>
>>>>> Why
>>>>>
>>>>>   FullSimplify[ArcCosh[1+z^2/2]-2*ArcSinh[z/2],z>0];
>>>>>
>>>>> does not evaluate to 0?
>>>>>
>>>>>
>>>>>
>>>>
>>>>
>>>>
>>>
>>
>

```

• Prev by Date: Re: 3D data set
• Next by Date: Re: Simulating random fields in Mathematica
• Previous by thread: Re: Re: Re: Hyperbolic function identity
• Next by thread: Re: Re: Re: Hyperbolic function identity