MathGroup Archive 2005

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

Search the Archive

Re: Mathematica goes Bad

  • To: mathgroup at smc.vnet.net
  • Subject: [mg59465] Re: [mg59422] Mathematica goes Bad
  • From: stephen layland <layland at wolfram.com>
  • Date: Wed, 10 Aug 2005 02:57:10 -0400 (EDT)
  • References: <200508090730.DAA19089@smc.vnet.net>
  • Sender: owner-wri-mathgroup at wolfram.com

and thus spake Igor Touzov [2005.08.09 @ 03:31]:
> I am using Mathematica second year already, and found that each consequative 
> version cuts off something good from what mathematica used to be.
> 
> Contacting technical support only results in open ticket that never gets 
> closed.
> 
> Here some simple example you can run for youself:
> Timing[
> Limit[ (a ^2 k ^2 ArcTan[ ( (-a ^2 ) Cot[ [Theta]] - w y 
> Tan[ [Theta]] ) / (a  @ (a ^2 +  ((w - y) ) ^2 + y ^2 
> Tan[ [Theta]] ^2 ) )]
>  Sin[2  [Theta]] ) / (2 + 2 k ^2 Sin[ [Theta]] ^2 ),  [Theta] -> 0]] )

Perhaps you meant:

(a^2 k^2 ArcTan[(-a^2 Cot[\[Theta]] - w y Tan[\[Theta]])/(
  a (a^2 + ((w - y))^2 + y^2 (Tan[\[Theta]])^2))] Sin[2 \[Theta]])/(2 + 
   2 k^2 (Sin[\[Theta]])^2)

of which the limit _does_ take longer on version 5.1 and 5.2.  This
seems to be because the Direction->Automatic is doing something
different.  You might try experimenting some:

    In[1]:= x=(a^2 k^2 ArcTan[(-a^2 Cot[\[Theta]] - w y Tan[\[Theta]])/(
      a (a^2 + ((w - y))^2 + y^2 (Tan[\[Theta]])^2))] Sin[2
      \[Theta]])/(2 +
         2 k^2 (Sin[\[Theta]])^2);

    In[2]:= Limit[x,\[Theta]->0]//Timing

    Out[2]= {11.69 Second, 0}

    In[3]:= Limit[x,\[Theta]->0,Direction->-1]//Timing

                       -16
    Out[3]= {2.14238 10    Second, 0}

> Timing[
> Limit[ArcTan[ (a  ((a k - w + y) ) Cot[ [Theta]] + k y ^2 Tan[
>  [Theta]] ) / (y  @ (a ^2 +  ((w - y) ) ^2 + y ^2 Tan[ [Theta]] ^2 ) )],
> k ->  (+ [Infinity] ), Direction -> 1]] )
This is also messed up, i presume due to problems with cut and pasting
inline formatted mathematica frontend text and someone else stripping \
characters.  Try resending in InputForm.  It's possible that this Limit
can also be fixed with some tweaking, or it's possible that this is a
bug.

> In version 5.0 computing following
> 
> {Limit[ArcTan[k ], k -> + [Infinity], Direction -> -1],
> Limit[ArcTan[k ], k -> + [Infinity], Direction -> 1]} results in accurate
> 
> {-(Pi/2), Pi/2}

> while doing the same in version 5.2 gives you absurd {(Pi/2), Pi/2}.

I get Pi/2 (wihtout parens) for both directions:

   In[5]:= Limit[ArcTan[k],k->Infinity,Direction->#]&/@{-1,1}

            Pi  Pi
   Out[5]= {--, --}
            2   2

At the risk of showing my mathematical weakness, isn't this correct, though?
Taking the limit as k approaches infinity from the right of infinity, should 
still converge to Pi/2, no?  It's been a while since my epsilon delta proofs,
so i could be wrong.  It works for arbitrary q though:

   In[6]:= Limit[ArcTan[k],k->q,Direction->#]&/@{-1,1}

   Out[6]= {ArcTan[q],ArcTan[q]}

Hardly rigorous, but to my naive mind it would seem like 5.0 was wrong.

> I could continue with list of examples that shows much more. But it only 
> proofs the fact that whoever makes these changes in old good mathematica 
> should be discharged. If some day I will get response from technical support 
> that contains something meaningful I will post an update. Till then I would 
> advise every body not to trust in results you get.

That's quite a broad conclusion you're jumping to on minimal evidence.
All programs have bugs, it looks like you might have found one with
Limit.  You should know that not _any_ computer algebra software can be
100% right all the time.  We're just right more than other people!  :)
I would invest more time to working with other aspects of Mathematica
before prematurely concluding:

    "each consequative[sic] version cuts off something good from 
     what mathematica used to be"

and asking that intelligent people be canned, without whom you would
have had no Mathematica to complain about anyway.

--
/*------------------------------*\
|        stephen layland         |
|    Documentation Programmer    |
| http://members.wri.com/layland |
\*------------------------------*/


  • Prev by Date: Re: PlotVectorField
  • Next by Date: Re: Mathematica goes Bad
  • Previous by thread: Re: Mathematica goes Bad
  • Next by thread: Re: Mathematica goes Bad