[Date Index]
[Thread Index]
[Author Index]
Re: Re: More about l`Hopital`s rule
*To*: mathgroup at smc.vnet.net
*Subject*: [mg24610] Re: [mg24599] Re: More about l`Hopital`s rule
*From*: Otto Linsuain <linsuain+ at andrew.cmu.edu>
*Date*: Fri, 28 Jul 2000 17:23:46 -0400 (EDT)
*References*: <8lgtq8$2i6@smc.vnet.net> <200007250456.AAA08716@smc.vnet.net>
*Sender*: owner-wri-mathgroup at wolfram.com
Excerpts from mail: 25-Jul-100 [mg24599] Re: More about l`.. by John
Hendrickson at hend.ne
> In[]:=Limit[(a^2 - a x)/(a - PowerExpand[Sqrt[a x] ]), x -> a]
> Out[]:=2a
>
> Hmm.. Why? In the help (3.6.8 Finding Limits) we are told that if Limit has
> no information on a symbol (variable or function) it will leave it
> unevaluated (the Mathematica kernel default). Ahh... so probably:
> 0 / Sqrt[a x] == 0
> just as
> 0 / x == 0
> and Limit[] stops there, of course, assuming that 0/x == 0.
>
> Why? "1.5.13 Advanced Topic: Generic and Non-Generic Cases" we are told that
> 0/x ==0 when x is not defined (and the reason is explained).
>
> Ahh... but something else is just as important. Arguements to Mathematica
> functions WILL BE SIMPLIFIED unless you explicitely ask it not to be with
> most Mathematica functions. And that certainly can cause unexpected
> answers. Some Mathematica functions (I think Limit[] is one) hold your
> parameters just so they won't be evaluated. "Limit[ Unevaluated[ expr] ]"
> would ensure that your expr wouldn't be evaluted, per say, before entering
> the function.
>
> In[]:=
> InputForm[Limit[FullSimplify[(a^2 - a*x)/(a - Sqrt[a*x])], x -> a]]
> Out[]=
> a + Sqrt[a^2]
>
> Just out of interest: I unthinkingly tried the following two inputs and
> wondered for a moment how you got your result. Finally, I tried your input,
> of course, and got a 0 just as you did.
>
> In[]:=
> Limit[(a^2 - a x) / (a - (a^(1/2) x^(1/2))), x -> a]
> Out[31]=
>
> 2 a
>
> In[]:=
> InputForm[(D[a^2 - a x, x]) / (D[a - (a^(1/2) x^(1/2)), x])]
> Out[32]//InputForm=
> 2*Sqrt[a]*Sqrt[x]
> In[]:=
> Limit[2*Sqrt[a]*Sqrt[x], x -> a]
> Out[]=
>
> 2 a
>
John, I think what you are seing here, as well as in the rest of the
posting in this thread, is not the surprising results one can get with
Mathematica, but rather, the unexpected effects of extending the
relations we know to be true for real numbers to the entire complex
plane without stopping to think about branch cuts and Reiman sheets. One
could see the same effects with paper and pencil, if one were careful.
When you enter a^(1/2) x^(1/2) or PowerExpand[Sqrt[a x]] you are going
to get different results than what you get when you enter Sqrt[a x]. The
reason is simple:
Sqrt[a x] is not equal to a^(1/2) x^(1/2), but rather it is equal to
(a x)^(1/2). These two expressions are not the same for arbitrary a and x.
As for PowerExpand, the Mathematica documentation is clear:
PowerExpand[(a b)^c] gives a^c b^c, it then explains:
This expansion is correct only if c is an integer and a and b are
positive reals. PowerExpand always gives the expansion, so it
effectively makes those assumptions.
I think Mathematica could give answers that are incorrect or incomplete
in this business, since it is rather tricky. But in all the examples I
have seen it is the human part who is being tricked, rather than
Mathematica. Well, it IS tricky. Otto Linsuain.
Prev by Date:
**Re: Manipulating Slot objects in Compile**
Next by Date:
**Re: Manipulating Slot objects in Compile**
Previous by thread:
**Re: More about l`Hopital`s rule**
Next by thread:
**Re: More about l`Hopital`s rule**
| |