MathGroup Archive 2005

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

Search the Archive

Re: Some bugs in Mathematica

  • To: mathgroup at smc.vnet.net
  • Subject: [mg59395] Re: Some bugs in Mathematica
  • From: akhmel at hotmail.com
  • Date: Mon, 8 Aug 2005 03:34:43 -0400 (EDT)
  • References: <200508010505.BAA24522@smc.vnet.net> <1192.12.210.86.190.1123296535.squirrel@webmail.wolfram.com> <BAY106-DAV184D0BD361AEF55157E0CBC9C60@phx.gbl> <42F50087.5050308@wolfram.com> <BAY106-DAV47DC8237BFF1A81020924C9C60@phx.gbl> <dd4fhp$huv$1@smc.vnet.net> posting-account=xXq2jwwAAACHPbMF3D2ViewAYYQLjlYJ
  • Sender: owner-wri-mathgroup at wolfram.com

Regretfully, you mistyped the expression for the antiderivative and
therefore, when you tried to do the differentiation, it didn't work.

The correct expression is:

1/(a*b)*ArcTanh[(b*Sqrt[r^2 - a^2]) / (a*Sqrt[r^2 - b*2])]

In order to avoid misunderstanding, I describe the argument of ArcTanh
verbally: it is a fraction. The numerator is "b" TIMES sqare root of
"r" squared minus "a" squared. The denominator is "a" TIMES sqare root
of "r" squared minus "b" squared. I hope now there will be no
misunderstanding.

What is your position within Wolfram Research? Are you in charge of
public relation?

Sincerely,

Alex


danl at wolfram.com wrote:
> > 1) I have great difficulty understanding your attitude. You are an
> > employee
> > of Mathematica, are you?
>
> I am an employee of Wolfram Research, Inc. Mathematica is our flagship
> product. It is not a corporate entity. If you wish to understand my
> attitude, first begin with yours.
>
>
> > If somebody tells you that your product has a
> > defect, you should tell this person "thank you" and try to correct it.
>
> When warranted by facts and demeanor, that is what I generally do. Your
> track record in this arena is not very good (recall our exchange several
> months ago regarding a different integration that was correct despite
> several unsubstantiated claims by yourself to the contrary). And it is
> recently getting worse (see below analysis of (2)).
>
>
> > I am
> > trying to help you to improve your product.
> >
> > 2) The elementary result is (1/ab) ArcTanh[(b\sqrt(r^2-a^2)) /
> > (a\sqrt(r^2-b^2))]
> >
> > Your Mathematica purports to do more than that. It claims to be able to
> > compute whatever integral is available in any table of integrals. Do you
> > want me to give an exact quotation?
>
> I do not write the documentation.
>
> Now let's look at the case in question. Integrate did give an
> antiderivative, albeit somewhat more complicated than what you indicate
> above.
>
> As to your antiderivative, I cannot verify that it is correct and indeed
> it appears not to be so. I'll show my computations in Mathematica
> InputForm so you can see whether there might be a transcription problem.
>
> ii=1/(r*Sqrt[-a^2 + r^2]*Sqrt[-b^2 + r^2]);
>
> jj1=1/(a*b)*ArcTanh[b/Sqrt[r^2 - a^2]*a/Sqrt[r^2 - b*2]];
>
> In[17]:=
> InputForm[jj2=Integrate[ii,r]]
>
> Here is the antiderivative produced by Mathematica.
>
> Out[17]//InputForm=
> -(Sqrt[1 - a^2/r^2]*Sqrt[1 - b^2/r^2]*AppellF1[1, 1/2, 1/2, 2, a^2/r^2,
> b^2/r^2])/
>  (2*Sqrt[-a^2 + r^2]*Sqrt[-b^2 + r^2])
>
> Here we see that your antiderivative does not differentiate to the integrand.
>
> In[18]:=
> InputForm[kk1=FullSimplify[D[jj1,r]-ii]]
>
> Out[18]//InputForm=
> (-(1/Sqrt[-b^2 + r^2]) + (r^2*(a^2 + 2*b - 2*r^2))/(Sqrt[-2*b + r^2]*
>     (-2*b*r^2 + r^4 - a^2*((-2 + b)*b + r^2))))/(r*Sqrt[-a^2 + r^2])
>
> While the FullSimplify'd result need not give 0, the numerical evaluation
> should, but does not.
>
> In[21]:=
> N[kk1/.{r\[Rule]9,a\[Rule]2,b\[Rule]4}]
>
> Out[21]=
> -0.00481087
>
> The antiderivate produced by Mathematica is a correct one, as seen below.
>
> In[19]:=
> InputForm[kk2=FullSimplify[D[jj2,r]-ii]]
>
> Out[19]//InputForm=
> 0
>
> With the dust settling I fail to see any reason to expect the result you
> indicate above.
>
>
> > 3) It seems to me that your Mathematica does not understand that square
> > root
> > in the denominator can be cancelled out by square root in the numerator,
> > thus eliminating any singularity.
>
> Do you mean in the antiderivative? I would surmise that definite
> integation code has no trouble with that if parameters {a,b} are suitably
> constrained. My guess is the AppellF1 is the issue. In any case I plan to
> look a bit more next week.
>
>
> > In any case, shouldn't your Mathematica,
> > even if I don't specify that certain parameter is real, still give me a
> > conditional integral rather than giving me nothing?
>
> Integrate tries to do this in many cases. Antiderivatives involving
> elliptic and related functions are a frequent exception because we do not
> have a good mechanism for deducing parameter conditions in such cases.
>
>
> >>I notice several people on MathGroup have tried to explain to you how
> >> this
> > sort of thing works, apparently to >no avail.
> >
> > I am user who paid money and when a product does not work, according to
> > the
> > way it is advertised, I don't need to know why it doesn't work, I need it
> > fixed.
>
> Then discuss the problem with Technical Support (support at wolfram.com).
> Unlike MathGroup respondents such as Bill Rowe and Andrzej Kozlowski, they
> are paid by Wolfram Research, Inc. and one of their tasks is to respond to
> claims regarding possible bugs. And unlike myself, they are paid to
> correspond directly with users.
>
> I will add that when it comes to definite integration, there are limits to
> what can be accomplished. Period. It is fine with me if you do not want to
> know why something does not work. But there is no guarantee that a fix
> will ever be available, if the problem is one for which we cannot figure
> out any improvement. Such issues are not unique to Mathematica definite
> integration, by the way.
>
>
> > If you do not realize how ridiculous it looks when your program
> > gives
> > an Appel function where it should give an elementary function, there is
> > little I can do about it.
> >
> > Sincerely,
> >
> > Alex
>
> I would guess you and I have very different notions of "should". Actually
> there are frequent cases where a special function result is vastly
> preferable to one in terms of elementary functions. This can arise, for
> example, when the latter might be hugely unwieldy. More to the point, as a
> practical matter integration via elementary functions involving algebraic
> integrands is a difficult area (all the more so with the unfortunate
> recent passing of the world's leading expert Manuel Bronstein). It is not
> regarded as a very high priority by us at this time.
>
>
> Daniel
>
>
> > ----- Original Message -----
> > From: "Daniel Lichtblau" <danl at wolfram.com>
To: mathgroup at smc.vnet.net
> > To: "Alex Khmelnitsky" <akhmel at hotmail.com>
> > Sent: Saturday, August 06, 2005 2:25 PM
> > Subject: [mg59395] Re:  Some bugs in Mathematica
> >
> >
> >> Alex Khmelnitsky wrote:
> >> > Dear Dr. Lichtblau,
> >> >
> >> > 1) Though I made a misprint in the first example, namely, instead of
> >> > Gamma[n-k-1], there should be \Pi Gamma[n-k], you are right,
> >> Mathematica
> >> > seems to have a bug and I suggest that you inform appropriate people
> > since I
> >> > don't need any support, but Mathematica does need some improvement.
> >>
> >> I am not a conduit for MathGroup posts claiming bugs. Whether you report
> >> it is entirely up to yourself. I notice several people on MathGroup have
> >> tried to explain to you how this sort of thing works, apparently to no
> >> avail.
> >>
> >>
> >> > 2) I thought it was obvious that when you have odd function with 2
> > square
> >> > roots as I indicated, the result is elementary and expressed via
> > logarithm.
> >> > You can look at any table of integrals.
> >>
> >> The example I saw had four square roots if I recall correctly. In any
> >> case I have yet to see a verifiable antiderivative in terms of
> >> elementary functions. When you or someone else provides one I'll look at
> >> it further.
> >>
> >> I will also point out that integration of algebraics in terms of
> >> elementary functions is not something Mathematica purports to do in any
> >> complete way.
> >>
> >>
> >> > 3) There is no elliptic function there and even if you specify that
> >> all
> >> > parameters are real, you still do not get the results.
> >> >
> >> > I would appreciate your further comments.
> >> >
> >> > Thanks,
> >> >
> >> > Alex
> >>
> >> Depends on how you regard Appell functions. In the code that I suspect
> >> tries this via Newton-Leibniz integration, AppellF1 is on the same
> >> footing as EllipticE et al. Offhand I do not know why specifying real
> >> parameters does not help. I'll look at that when I get a chance.
> >>
> >>
> >> Daniel
> >>
> >


  • Prev by Date: Re: Redefining a function with a rule for coefficients
  • Next by Date: Re: Simplify Oddity
  • Previous by thread: Re: Some bugs in Mathematica
  • Next by thread: Re: Re: Some bugs in Mathematica