MathGroup Archive 2005

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

Search the Archive

Re: Some bugs in Mathematica

  • To: mathgroup at smc.vnet.net
  • Subject: [mg59655] Re: Some bugs in Mathematica
  • From: Bill Rowe <readnewsciv at earthlink.net>
  • Date: Tue, 16 Aug 2005 04:39:41 -0400 (EDT)
  • Sender: owner-wri-mathgroup at wolfram.com

On 8/15/05 at 6:50 AM, akhmel at hotmail.com (Alex) wrote:


>Bill Rowe wrote:

>>Simplfy and FullSiimplfy have a finite set of transforms to apply to
>>achieve >simplification. If none of these result in a simplification,
>>the result is returned in its original form. This is not one bit
>>different than a human who tries to simplify an expression by every
>>means he knows and stops when none of his attempts work.

>This is exactly my point. People who made Mathematica did some very
>sloppy job, when integral clearly expressible in terms of elementary
>functions is given in a super over-complicated form. It is a sloppy
>job and it should be corrected.

Your "logic" doesn't follow. If you agree with the point I was making, then you must realize two different programmers are likely to include different transforms simply because of differences design considerations or programming style. That is, not including a specific transform is not evidence of sloppy programming.


>>Do you really want Mathematica to try every possible gouping of
>>variables in a complex expression that might result in a simpler
>>expression?

>YES.

I believe that to be an unreasonable expectation.

>And even more than that, this is how algorithm of integration
>should look: Mathematica should have a huge computerized table of
>integrals and its first step should be in comparison with the table
>and if the integral is found in the table, the result should be
>printed and that's the end of it. Step 2: if the integral is not
>found in the table, then typical substitution should be tried to
>reduce the integral to the one available in the table and those
>should definitely include such substitutions such as inversion,
>trigonometric or hyperbolic function substitution, etc. Only when
>these 2 steps fail, any internal algorithm of integration should be
>used.

Although I do not work for Wolfram nor do I have access to the source code of Mathematica, I am reasonably confident the process Mathematica goes through is what you've outlined above. Probably the only real difference is how big the "huge ... table of integrals" is which would be a design consideration.

>>For arbitrary expressions, I suspect an attempt to do this would
>>cause the execution time of FullSimplify to increase exponentially
>>with complexity and it would be trivial to come up with examples that
>>would lead to unacceptable >execution times on even the fastest
>>hardware.

>You are wrong.

And your basis for this assertion is ....?

>The system should look at the integrand and by its appearance to
>decide whether is computable in terms of elementary functions. If yes,
>the methods are well developed and results can be achieved in no time.

How is "appearance" of an integrad to be defined for a system like Mathematica? I am confident algorithm needed to define "appearance" will lead to unacceptable performance if every possible grouping of variables in an arbritrary complex expression is considered.

In essence, you've made an unsupported assertion which I suspect indicates a lack of experience with creating complex programs. It is very easy to criticize the programmer for not including what you see as desireable but not very easy to create the tool yourself.

>>Mathematica is simply a very useful tool. Like any tool, it has
>>limitations and isn't perfect. Used intelligently, Mathematica
>>produces useful results in reasonable time. Used blindly, you get
>>pretty much what you deserve.

>It has been my experience that whenever something totally
>inadequate is pointed out, the response is "we are not perfect".
>There is difference between being not perfect and totally
>inadequate. We are talking about elementary integral here.

I agree there is a vast difference between "not perfect" and "inadequate". I strongly disagree that Mathematica is "inadequate". If Mathematica is inadequate for your needs, you are certainly free to use some other software.

>Ok, please help me to use Mathematica intelligently. I have an
>expression:

>y= Integrate[1/(r*Sqrt[r^2-a^2]*Sqrt[r^2-b^2]),{r,a,x}]

>I need to express explicitly x as a function of y. I know how to do
>it with my result through ArcTanh. I do not know how to do it
>through Appel function. Now, please show me how to use Mathematica
>intelligently and get the desired result.

I make no claim to being able to always get a particular result from Mathematica or reduce the result from every "elementary" integral with Mathematica into some specifiec form. Nor do I see any real advantage to having a symbolic result specified in terms of ArcTanh versus some other form. In either case, I can plot the results, evaluate the results to a number once the various parameters are assigned numerical values etc.

The choice to call one function "elementary" and another not is totally arbitrary.

However, for this particular case one way to get closer to what you desire would be as follows:

Start with the denminator

f = r Sqrt[r^2 - a^2] Sqrt[r^2 - b^2]

Square it and expand it to get

g = Expand[f^2]

r^6 - a^2*r^4 - b^2*r^4 + a^2*b^2*r^2

Then integrate 1/Sqrt[g] to get

int=Integrate[Sqrt[1/g], r]

-((1/(2*a*b))*
   (r*Sqrt[a^2 - r^2]* Sqrt[1/(r^2*(a^2 - r^2)*
       (b^2 - r^2))]*Sqrt[b^2 - r^2]*
    Log[-(a/b) + (2*b*a)/ r^2 + 
      (2*Sqrt[a^2 - r^2]*Sqrt[b^2 - r^2])/r^2 - b/a]))
      
Assuming the proper conditions hold on a, b, and r this can be simplified to 

-(Log[-(a/b) + (2*b*a)/r^2 + (2*Sqrt[(a - r)*(a + r)]*
       Sqrt[(b - r)*(b + r)])/r^2 - b/a]/(2*a*b))

using PowerExpand

Alternatively, the singularity at r = a can be removed by taking the limit as r approaches a, i.e.,

lim=Limit[int, r -> a]

-((Sqrt[-a]*Sqrt[b^2 - a^2]*
    Sqrt[1/(a^5 - a^3*b^2)]*
    Log[b/a - a/b])/(2*b))
 
and finally the result you are looking for would be

(int/.r->x)-lim

Although this isn't in terms of ArcTanh, it is in terms of common functions. And there is probably a way to re-write the integrand to get the result in terms of ArcTanh. Perhaps someone else may be interested enough to demonstrate.
--
To reply via email subtract one hundred and four


  • Prev by Date: Re: Re: Re: Re: export import eps | illustrator
  • Next by Date: Re: Unable to obtain value from interpolation function integration
  • Previous by thread: Re: Re: Some bugs in Mathematica
  • Next by thread: Re: Some bugs in Mathematica