MathGroup Archive 2005

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

Search the Archive

Re: piecewise vs which

  • To: mathgroup at
  • Subject: [mg60167] Re: piecewise vs which
  • From: Peter Breitfeld <phbrf at>
  • Date: Mon, 5 Sep 2005 22:27:24 -0400 (EDT)
  • References: <df9437$620$> <dfbfl4$isf$>
  • Sender: owner-wri-mathgroup at

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 --

  • 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