Services & Resources / Wolfram Forums
-----
 /
MathGroup Archive
2007
*January
*February
*March
*April
*May
*June
*July
*August
*September
*October
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 2007

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: question

  • To: mathgroup at smc.vnet.net
  • Subject: [mg74879] Re: [mg74865] question
  • From: Andrzej Kozlowski <akoz at mimuw.edu.pl>
  • Date: Tue, 10 Apr 2007 05:10:37 -0400 (EDT)
  • References: <200704091011.GAA05459@smc.vnet.net>

On 9 Apr 2007, at 19:11, dimitris wrote:

> BesselI[n, x] can be expressed as (x^n*Hypergeometric0F1Regularized[1
> + n, x^2/4])/2^n
>
> Mathematica knows this and simplifies the hypergeometric function
> (applying
> FunctionExpand or FullSimplify)
>
> In[53]:=
> (x^n*Hypergeometric0F1Regularized[1 + n, x^2/4])/2^n//FunctionExpand
>
> Out[53]=
> BesselI[n, x]
>
> The opposite is also possible.
>
> In[54]:=
> FullSimplify[BesselI[n, x], ComplexityFunction -> (Count[{#1},
> _BesselI, Infinity] & )]
>
> Out[54]=
> (x^n*Hypergeometric0F1Regularized[1 + n, x^2/4])/2^n
>
> The same holds true for some special functions I have tried.
>
> Let see a more trivial function: Log[1+x].
>
> Log[1+z] can be expressed as z*Hypergeometric2F1[1, 1, 2, -z]
> and Mathematica automatically simplifies the hypergeometric series
>
> In[55]:=
> z*Hypergeometric2F1[1, 1, 2, -z]
>
> Out[55]=
> Log[1 + z]
>
> Is it possible the opposite through some command(s)?
>
> Something like the following does not look very smart. That's why it
> fails!
>
> In[57]:=
> FullSimplify[Log[x+1],ComplexityFunction\[Rule]
> (Count[{#1},_Log,Infinity]&)]
>
> Out[57]=
> Log[1+x]
>
> Thanks
> Dimitris
>
>

Note that Mathematica's evaluator automatically evaluates:


(z-1)*Hypergeometric2F1[1, 1, 2, -z+1]

log(z)

This happens before one applies Simplify (never mind FullSimplify). 
It is precisely this automatic evaluation that makes doing what you 
wish so hard. Even if FullSimplify finds that an expression involving =

HypergeometricF1 has the lowest value of complexity function the 
evaluator will immediately convert it into an expression in terms of 
log. This brings ones to an issue that used to frequenly appear on 
this list: how much automatic simplification should be performed by 
Mathematica without invoking Simplify? Some people think Mathematica 
should do more and some that it should do less, but there is a price 
to be paid for each choice. Personally I would prefer less, which 
would give more choice to the user but would also require more skill 
and patience in using functions such as Simplify. In your particular 
case there is no alternative but to use HoldForm or some equivalent. 
You could do something like this:

ff[expr_] := expr /. Log[
   z_] :> ((z - 1)*HoldForm[Hypergeometric2F1[1, 1, 2, v]] /. v -> (1 =

- z))

Now you can use:



In[2]:=
FullSimplify[Log[x+1],ComplexityFunction->(Count[{#1},_Log,=B0]&),\
TransformationFunctions->{f,Automatic}]

Out[2]=
x Hypergeometric2F1[1,1,2,-x]

which at least in Standard and Traditional forms looks right, but of 
course:

In[3]:=
ReleaseHold[%]

Out[3]=
Log[x+1]


Andrzej Kozlowski



  • References:
    • question
      • From: "dimitris" <dimmechan@yahoo.com>
  • Prev by Date: ColorFunction help?
  • Next by Date: Re: Showing the points on a surface about a circle in the plane
  • Previous by thread: question
  • Next by thread: Re: Question