Re: conditional limits
- To: mathgroup at yoda.physics.unc.edu
- Subject: Re: conditional limits
- From: belopols at marie.mit.edu (Alexander Belopolsky)
- Date: Tue, 7 Sep 1993 14:28:58 -0400
> I have a function of two variables, f[x, y], which when evaluated for values of > x=y results in: > 1 > Power::infy: Infinite expression -- encountered. > 0. > > As there is an (x-y) term in the denominator of the function. However, > the Limit[f[x,y], x-y] does exist, and evaluates to a finite number. > > > The question is, how do I construct a rule that conditionally evaluates > the limit of f[x,y] rather than f[x,y] whenever x=y? Here is my solution: In[1]:= f[x_,y_]:=Sin[x-y]/(x-y) In[2]:= f[3,3] 1 Power::infy: Infinite expression - encountered. 0 Infinity::indet: Indeterminate expression 0 ComplexInfinity encountered. Out[2]= Indeterminate In[3]:= f[x_,x_]:=Limit[f[x,y],y->x] In[4]:= f[3,3] Out[4]= 1