MathGroup Archive 2003

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

Search the Archive

Re: Re: Beginner question: operating on piecewise defined functions

  • To: mathgroup at smc.vnet.net
  • Subject: [mg41706] Re: [mg41698] Re: [mg41609] Beginner question: operating on piecewise defined functions
  • From: Andrzej Kozlowski <akoz at mimuw.edu.pl>
  • Date: Mon, 2 Jun 2003 04:35:16 -0400 (EDT)
  • Sender: owner-wri-mathgroup at wolfram.com

Actually is is just by accident that the Limit package works in this 
case. In fact, it will only work in cases when Limit[f[x],x ->a] is 
actually equal to f[a]. So the following fails:

In[1]:=
<< "Calculus`Limit`"
In[2]:=
f[x_] := 1/x^2 /; x >= 1
In[3]:=
f[x_] := Sin[x]/x /; x < 1
In[4]:=
Limit[f[x], x -> 0]
Out[4]=
Limit[f[x], x -> 0]

Andrzej Kozlowski
Yokohama, Japan
http://www.mimuw.edu.pl/~akoz/
http://platon.c.u-tokyo.ac.jp/andrzej/



On Saturday, May 31, 2003, at 07:07  pm, German Buitrago A. wrote:

> Jan,
>
> you can use the Standard Add-On Package Calculus`Limit` and you should 
> keep
> in mind the syntax of the function Limit:
>
> ?Limit
>
> "Limit[expr, x->x0] finds the limiting value of expr when x approaches 
> x0."
>
> (Appreciate that the couple {}  is not required around of  "x -> 
> Infinity")
>
> In[1]:=
> f[x_] := 1/x^2 /; x >= 1
>
> In[2]:=
> f[x_] := 1 /; x < 1
>
> In[5]:=
> << Calculus`Limit`
>
> In[6]:=
> Limit[f[x], x -> Infinity]
>
> Out[6]=
> 0
>
> Greetings,
>
> German Buitrago A.
> Manizales, Colombia
>
>
>
> ----- Original Message -----
> From: "Jan Rychter" <jan at rychter.com>
To: mathgroup at smc.vnet.net
> To: mathgroup at smc.vnet.net
> Subject: [mg41706] [mg41698] [mg41609] Beginner question: operating on piecewise 
> defined
> functions
>
>
>> If I define a piecewise function as, say:
>>
>> f[x_] := 1/x^2 /; x >= 1
>> f[x_] := 1 /; x < 1
>>
>> then how can I get Mathematica to operate on it, as in:
>>
>> Limit[f[x], {x->Infinity}]
>>
>> Just trying that returns the expression unevaluated, even though
>> defining:
>>
>> g[x_] := 1/x^2
>>
>> and trying:
>> Limit[g[x], {x -> Infinity}]
>>
>> Yields, as expected:
>>
>> Out[7]=
>> {0}
>>
>> thanks,
>> --J.
>>
>
>
>


  • Prev by Date: not linear homogeneus differential equation system... too complicated for mathmeatica... maybe only for me! :)
  • Next by Date: Re: RE: Re: More integration/ fullsimplify bugs in Mathematica 4.1
  • Previous by thread: Re: not linear homogeneus differential equation system... too complicated for mathmeatica... maybe only for me! :)
  • Next by thread: Re: RE: Re: More integration/ fullsimplify bugs in Mathematica 4.1