Re: Limit of an Integer Function
- To: mathgroup at smc.vnet.net
- Subject: [mg18799] Re: [mg18767] Limit of an Integer Function
- From: "Andrzej Kozlowski" <andrzej at tuins.ac.jp>
- Date: Thu, 22 Jul 1999 08:19:21 -0400
- Sender: owner-wri-mathgroup at wolfram.com
What you really want is for Mathematica to find the limit of a sequence of real numbers, i.e. a function f from the integers to the reals. Actually, this ability is built into Mathematica but in a not very explicit way. What you can do is use the fact that Lim[f[n],n->Infinity] as n runs over the integers is equal to Sum[(f[n+1]-f[n],{n,a,Infinity}]+f[a], where a is any integer. Thus you can get your answer as follows: In[2]:= Sum[Sin[(n + 1)*Pi] - Sin[n*Pi], {n, 1, Infinity}] + Sin[Pi] Out[2]= 0 When using this method you should make sure that f[n] is always defined in the range of values over which you are taking the sum. Also Mathematica may sometimes produce a complicated answer even in cases which can be easily solved by using Limit. For example, consider the limit of the function In[1]:= f[n_] := (3n^2 + 1)/(n^2 - 1) as n runs over the integers starting with any n>1. In this case the answer is the same as given by the continuous limit In[2]:= Limit[f[n], n -> Infinity] Out[2]= 3 Using Sum gives a complicated answer: In[3]:= Sum[Evaluate[Simplify[f[n + 1] - f[n]]], {n, 2, Infinity}] + f[2] Out[3]= 13 -- - 4 RootSum[(1 + #1) (2 + #1) (3 + #1) (4 + #1) & , 3 -((PolyGamma[0, -#1] (1 + 2 (2 + #1))) / ((1 + #1) (2 + #1) (3 + #1) + (1 + #1) (2 + #1) (4 + #1) + (1 + #1) (3 + #1) (4 + #1) + (2 + #1) (3 + #1) (4 + #1))) & ] Applying FullSimplify shows that this is indeed correct: In[3]:= FullSimplify[%] Out[3]= 3 -- Andrzej Kozlowski Toyama International University JAPAN http://sigma.tuins.ac.jp http://eri2.tuins.ac.jp ---------- >From: Phil Mendelsohn <mend0070 at tc.umn.edu> To: mathgroup at smc.vnet.net >To: mathgroup at smc.vnet.net >Subject: [mg18799] [mg18767] Limit of an Integer Function >Date: Tue, Jul 20, 1999, 6:33 AM > > I seem to have found a blind spot in my knowledge of how to get > Mathematica to evaluate limits. > > I want to evaluate the limit of a function where the domain is a member > of the Natural numbers, such as infinite series. It seems that Limit > assumes that the function is continuous. > > For example, if I asked > > Limit[Sin[ n Pi ],n-> Infinity], mathematica would return: > Interval[{-1,1}]. This is true if n is a member of the Reals, but not > true if n is a positive integer (in which case the limit would be 0.] > > Is there another function I should use? Or would it be nice to specify > the domain of the function as a feature request? > > > Phil Mendelsohn