MathGroup Archive 2007

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

Search the Archive

Re: Bug with Limit?

  • To: mathgroup at
  • Subject: [mg74258] Re: Bug with Limit?
  • From: "dimitris" <dimmechan at>
  • Date: Thu, 15 Mar 2007 19:11:04 -0500 (EST)
  • References: <><esb4eh$3ql$>

I agree in some level with what you said. But not totally.

I don't believe what commands I used to "dig around"
are exotic to a naive user. Quite the opposite!
May be the way I present them it was not the proper
one for a naive user.

But when someone takes the first steps in Mathematica one of the most
things he know (or he should have known!) is how to get information
about one command.

Apart from the Help Browser there is the following Text-Based


So here we have

?? Limit
Limit[expr, x->x0] finds the limiting value of expr when x approaches
Options[Limit] = {Analytic -> False, Assumptions :> $Assumptions,
Direction -> Automatic}

What now a naive user with a correct attitude will do?
Continue to apply Limit blindly or investigate what are Options
in first step and then what are the Options of Limit in particular?

When you learnt to evaluate a definite integral you don't learn first
WHEN you can apply it?

Like mathematics, Mathematica needs from you to know some things
for it built in functions before aplying them (and no blind
That means, of course, that you don't need to know the implementation
algorithm of
Integrate for example (except you are interested in like me!) but
rather than to know e.g.
(or learn by Mathematica book, this forum and handrends of sources!)
that Mathematica may not
 return an indefinite integral similar with you have evaluated by
hand, or similar to what you have seen to a calculus book.
And moreover it will not return the well known constant of

Let for example

f = 1/Sqrt[s^2 - x^2];


ff = Integrate[1/Sqrt[s^2 - x^2], x]
-ArcTan[(x*Sqrt[s^2 - x^2])/(-s^2 + x^2)]

D[ff, x]
Simplify[%] == f

-((-((2*x^2*Sqrt[s^2 - x^2])/(-s^2 + x^2)^2) - x^2/(Sqrt[s^2 - x^2]*(-
s^2 + x^2)) + Sqrt[s^2 - x^2]/(-s^2 + x^2))/
   (1 + (x^2*(s^2 - x^2))/(-s^2 + x^2)^2))

Note that in order to check you should apply Simplify.

By hand, one could work-say that s is real-(I use Mathenatica to
follow these steps!)

integrand = f*dx /. x -> s*Sin[u] /. dx -> D[s*Sin[u], u]
Integrate[%, u]
fff=% /. u -> ArcSin[x/s]
FullSimplify[D[%, x], Element[s,Reals]&&] == f

(s*Cos[u])/Sqrt[s^2 - s^2*Sin[u]^2]

Note now

ff - fff
D[%, x]
FullSimplify[%, Element[s,Reals]]

-ArcTan[(x*Sqrt[s^2 - x^2])/(-s^2 + x^2)] - ArcSin[x/s]*Sign[s]
-((-((2*x^2*Sqrt[s^2 - x^2])/(-s^2 + x^2)^2) - x^2/(Sqrt[s^2 - x^2]*(-
s^2 + x^2)) + Sqrt[s^2 - x^2]/(-s^2 + x^2))/
    (1 + (x^2*(s^2 - x^2))/(-s^2 + x^2)^2)) - Sign[s]/(s*Sqrt[1 - x^2/

as it should be!

Let return now to Limit. We saw that

?? Limit
Limit[expr, x->x0] finds the limiting value of expr when x approaches
Options[Limit] = {Analytic -> False, Assumptions :> $Assumptions,
Direction -> Automatic}

So what is Options.

Options[symbol] gives the list of default options assigned to a
symbol. \
Options[expr] gives the options explicitly specified in a particular \
expression such as a graphics object. Options[stream] or
Options["sname"] \
gives options associated with a particular stream. Options[object]
gives \
options associated with an external object such as a NotebookObject. \
Options[obj, name] gives the setting for the option name. Options[obj,
{name1, name2, ... }] gives a list of the settings for the options
Attributes[Options] = {Protected}

What do they mean the Options of Limit in particular?


Analytic is an option for Limit and Series. With Analytic -> True, \
unrecognized functions are treated as analytic, and processed using
Taylor \
series expansions; with Analytic -> False, Taylor series are not used
unless \
the function is recognized as analytic.
Attributes[Analytic] = {Protected}

?? Assumptions
Assumptions is an option for functions such as Simplify, Refine and
Integrate \
which specifies default assumptions to be made about symbolic
Attributes[Assumptions] = {Protected}

Direction is an option for Limit. Limit[expr, x -> x0, Direction -> 1]
computes the limit as x approaches x0 from smaller values. Limit[expr,
x -> \
x0, Direction -> -1] computes the limit as x approaches x0 from larger
values. Direction -> Automatic uses Direction -> -1 except for limits
at Infinity, where it is equivalent to Direction -> 1.
Attributes[Direction] = {Protected}

(Note the presence of the hyperlink to the Help Browser by cliking

Now the question is what are the Attributes but that's the end of
lesson 1!

Best Regards

=CE=9F/=CE=97 Eric Smith =CE=AD=CE=B3=CF=81=CE=B1=CF=88=CE=B5:
> I wrote:
> > Making the documentation clear is a problem for the designers
> > of Mathematica.
> "dimitris" <dimmechan at> writes:
> > Everything is clear and "out there"...(at least for me!)
> I went to the Help Browser page for the Limit function, and the
> way the page was written did not suggest that a Limit with no
> direction specified would use a default direction.
> I have no doubt that you can dig around with a much of commands
> like you showed in your posting, and figure it out.  That was
> not my point.  Naive users like me expect the help browser to
> provide this sort of information.  Especially when we've been
> taught (incorrectly, according to some people in this forum)
> that the mathematical definition of a limit is that it has
> the same value from all directions, unless a direction has been
> specified.  Expert mathematicians may know otherwise, but
> many of the common introductory calculus textbooks present it
> that way.  Thus if Mathematica does it differently (undoubtedly
> for very good reasons), the Help Browser should explain it,
> without the user needing to do a lot of extra digging.
> Eric

  • References:
  • Prev by Date: Re: Triangular Distribution in Mathematica
  • Next by Date: Mathematica 4.0
  • Previous by thread: Re: Bug with Limit?
  • Next by thread: Re: Bug with Limit?