MathGroup Archive 2003

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

Search the Archive

Re: Beginner question: operating on piecewise defined functions

  • To: mathgroup at smc.vnet.net
  • Subject: [mg41623] Re: Beginner question: operating on piecewise defined functions
  • From: Peter Breitfeld <phbrf at t-online.de>
  • Date: Thu, 29 May 2003 08:13:48 -0400 (EDT)
  • References: <bb1v7e$9hc$1@smc.vnet.net>
  • Sender: owner-wri-mathgroup at wolfram.com

Jan Rychter schrieb:
> 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
>
[*** snipp ***] 

Try this

f[x_]=1/x^2 UnitStep[x-1]+UnitStep[1-x]

Needs["Calculus`Limit`"]

Lim[f[x],x->Infinity]

returns 0.

Without loading Calculus`Limit` it doesn't work.

Gruß Peter
-- 
=--=--=--=--=--=--=--=--=--=--=--=--=--= http://home.t-online.de/home/phbrf
 Peter Breitfeld, Bad Saulgau, Germany   Meinen GnuPG/PGP-5x Key gibts dort


  • Prev by Date: Plot3D, how to plot only certain regions of a surface...
  • Next by Date: Re: Matrix inverse not evaluating
  • Previous by thread: Re: Beginner question: operating on piecewise defined functions
  • Next by thread: Re: Beginner question: operating on piecewise defined functions