Re: L'Hopital's rule contradiction --- what am I messing up?
- To: mathgroup at smc.vnet.net
- Subject: [mg8324] Re: [mg8215] L'Hopital's rule contradiction --- what am I messing up?
- From: Robert Pratt <rpratt at math.unc.edu>
- Date: Sun, 24 Aug 1997 13:24:39 -0400
- Sender: owner-wri-mathgroup at wolfram.com
L'Hospital's Rule doesn't apply to all indeterminate forms, only 0/0 and +-infinity/infinity. Your Limit[p log p, p->0] has the indeterminate form 0*-infinity, which can be rewritten as Limit[(Log p) / (1/p), p->0] with indeterminate form -infinity/infinity. Now L'Hospital's Rule applies, giving Limit[(1/p) / (-1/p^2), p->0], which equals Limit[-p, p->0], which is 0, as you expected. Strictly speaking, this is only a one-sided limit (from the right), since log p is defined only for p>0. Rob Pratt Department of Mathematics The University of North Carolina at Chapel Hill CB# 3250, 331 Phillips Hall Chapel Hill, NC 27599-3250 rpratt at math.unc.edu http://www.math.unc.edu/Grads/rpratt/ On Tue, 19 Aug 1997, Tom Chwastyk wrote: > Yesterday I was writing something dealing with the entropy of a probability > distribution s(p)=sum_i p_i log p_i. I wondered if I had to exclude p_i=0 > from the sum, so I looked at > > limit_(p->0) p log p = 0 (-infinity) . > > This is an indeterminate form, so I tried applying L'Hopital's rule > (limit of an indeterminate form two-factor product is the limit of the > product of the derivatives of the factors) and got > > .... = limit_(p->0) (1) (1/p) = infinity . > > This seemed odd (I didn't see the exclusion all over the literature), so I > asked Mathematica for Limit[p Log[p], p->0] and got back 0. I am confident > that 0 is correct. For one thing, I looked at plots of p and log p; p seems > to go to 0 faster than log p goes to -infinity. Second, I found the MMa > book even includes (with evident pride) the example Limit[x Log[x],x->0] > giving 0 'even though there's not a power series for Log[x] about 0'. > Third, I looked at q=log p, p=e^q with the equivalent > > limit_(q->-infinity) e^q q = 0 (-infinity); > > this is indeterminate again, but now L'Hopital gives > > .... = limit(q->-infinity) (e^q) (1) = (0) (1) = 0. > > Question: what am I messing up or overlooking in the first version? > > Thanks in advance, > > Tom > -- > Tom Chwastyk ["Fosdick". Polish: CH='H, W=F (here), > A=AH, Y=I. Soften strict 'HFAH-stik.... :-) ] > Naval Research Laboratory Code 6383 > Wash. DC 20375-5343 (202) 767 2567 > > >