[Date Index]
[Thread Index]
[Author Index]
Re: FullSimplify on Hyperbolic Functions
*To*: mathgroup at smc.vnet.net
*Subject*: [mg53394] Re: [mg53383] FullSimplify on Hyperbolic Functions
*From*: Andrzej Kozlowski <akoz at mimuw.edu.pl>
*Date*: Sun, 9 Jan 2005 23:03:52 -0500 (EST)
*References*: <BE06D85D.C981%carlos@titan.colorado.edu>
*Sender*: owner-wri-mathgroup at wolfram.com
On 9 Jan 2005, at 20:47, Carlos Felippa wrote:
> on 1/9/05 1:46 AM, Andrzej Kozlowski at akoz at mimuw.edu.pl wrote:
>
>> The reasons why some of these do not work have already been explained
>> before: basically they are that FullSimplify when using certain
>> transformations functions, cannot use assumptions during the
>> intermediate steps and also that certain transformation functions only
>> "proceed in one direction". In particular this means that you often
>> need to use explicitly ComplexExpand or TrigToExp with FullSimplify.
>> This is one of such cases:
>>
>> In[1]:=
>> r1 = ArcCosh[1 + b^2/2];
>> r2 = 2*ArcSinh[b/2];
>>
>> In[3]:=
>> FullSimplify[ComplexExpand[
>> r1 - r2], b > 0]
>>
>> Out[3]=
>> 0
>>
>> However, this is more tricky:
>>
>> In[4]:=
>> FullSimplify[ComplexExpand[
>> r1^2 - r2^2], b > 0]
>>
>> Out[4]=
>> -4*Log[(1/2)*(b + Sqrt[
>> 4 + b^2])]^2 +
>> Log[(1/2)*(2 +
>> b*(b + Sqrt[4 + b^2]))]^2
>>
>>
>> The problem seems to be again that FullSimplify does not try certain
>> transformations that go in the "opposite direction" to what it
>> normally
>> does, but without which it can't see the cancellations. You can make
>> it
>> see them by forcing expansion of terms:
>>
>>
>> FullSimplify[FunctionExpand[ComplexExpand[r1^2-r2^2],b>0],b>0]
>>
>> 0
>>
>> This is actually an interesting case because it shows a use of
>> FunctionExpand with assumptions in cases where FullSimplify with
>> assumptions is alone not sufficient. Also note that ComplexExpand
>> performs better than TrigToExp here.
>>
>> Of course if you make the expression even more complicated it will get
>> harder and harder for Mathematica to reduce it and at some point it
>> will become completely impossible. This isn't really surprising, is
>> it?
>>
> True. But the expression I sent is fairly trivial. On a scale
> of 0-10, its a 2. Seems like humans have nothing to fear yet.
>>>
>
Certainly. Also it means you should use computers for what computers
are good at and human intelligence for what it is good at.
"Simplification" of expressions is not really algorithmic but requires
judgement and computers are not very good at using judgement.
This is example maybe fairly trivial from the human viewpoint but it is
far from trivial from the algorithmic viewpoint. Before the various
parts of the expression cancel out and thus become simpler they have to
first be made more "complex". In fact the above example can be done
even without FunctionExpand, the simpler ExpandAll (without any
assumptions) works just as well:
FullSimplify[ExpandAll[ComplexExpand[r1^2-r2^2]],b>0]
0
Of course ExpandAll and FunctionExpand do not belong to the usual
transformation functions used by FullSimplify and for good reason,
since expanding generally makes things more complex. In most cases
therefore applying ExpandAll would result in, at best, a substantial
waste of time. But in this kind of case it seems to be the only way to
obtain the required cancellation. In such a situation a human being
will use judgement and intuition that tells one to try expanding the
expression to see if cancellations might occur. But since a computer
program can't use intuition or judgement it has to either to include
ExpandAll always among the transformation functions, which seems like a
very bad idea, or in some other algorithmic way recognize those cases
when expanding is useful and those when it will be counterproductive.
Of course if you can describe such an algorithmic criterion with
acceptable complexity I am sure that Adam Strzebonski will consider
using it in Simplify.
Andrzej Kozlowski
Prev by Date:
**Re: easy question about random numbers**
Next by Date:
**Re: Simplify[expr] bug?**
Previous by thread:
**Re: FullSimplify on Hyperbolic Functions**
Next by thread:
**easy question about random numbers**
| |