Mathematica 9 is now available
Services & Resources / Wolfram Forums
-----
 /
MathGroup Archive
2005
*January
*February
*March
*April
*May
*June
*July
*August
*September
*October
*November
*December
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 2005

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

Search the Archive

Re: piecewise vs which

  • To: mathgroup at smc.vnet.net
  • Subject: [mg60167] Re: piecewise vs which
  • From: Peter Breitfeld <phbrf at t-online.de>
  • Date: Mon, 5 Sep 2005 22:27:24 -0400 (EDT)
  • References: <df9437$620$1@smc.vnet.net> <dfbfl4$isf$1@smc.vnet.net>
  • Sender: owner-wri-mathgroup at wolfram.com

Helen Read schrieb:
>
> Limit does indeed default to Direction->-1. Try, for example, 
> Limit[Abs[x]/x,x->0]
>
> I don't like this at all. For purposes of teaching calculus students, 
> where we are only concerned with real numbers and are not taking limits 
> in the complex plane, I would like Limit to check from both directions.
>
Why don't you write a little function to test the equality of both
limits, like this:

tsLimit[expr_, limRule_] := 
  Module[{right, left}, 
   left = Limit[expr, limRule, Direction ->1];
   right =Limit[expr, limRule, Direction -> -1]; 
   If[left == right, right, Indeterminate]]

Then tsLimit[g[x],x->2] will return Indeterminate.   

Gruss Peter
-- 
==-==-==-==-==-==-==-==-==-==-==-==-==-==-==-==-==-==-==-==-==-==
Peter Breitfeld, Bad Saulgau, Germany -- http://www.pBreitfeld.de


  • Prev by Date: Latex & Mathematica
  • Next by Date: Re: Would a code generator from dynamic systems be feasible and useful?
  • Previous by thread: Re: Re: piecewise vs which
  • Next by thread: Re: piecewise vs which