Date: Wed, 01 Feb 1995 15:21:05 -0400 From: [Permission pending] Subject: Re: HELP NEEDED...PLEASE! To: rusin@math.niu.edu First, thank you for your answer. it's the first time I ask a question in the news, and I'm really surprized how fast I get an answer. concerning the x(i), it's a complicate expression (at least for a biologist...) and are: x(i)=v^(i-1)*Exp(-Lv)*Sum[((v-1)^(j-i)*L^j)/j! ,j=i to Infinity] which can also be written as x(i)=v^(i-1)*(Exp(-L)-Exp(-Lv)*(Sum[((v-1)*L)^j/j! ,j=0 to i-1])/(v-1)^i with 01) x(i) = A B^i Sum[ C^j/j!, j=i to Infinity] > where A = exp(-Lv)/v, B=(v/(v-1)), and C=(v-1)L. >2) S = Sum[ A B^i C^j / (i+1)j!, i=1 to Infinity, j=i to Infinity] >3) = Sum[ A B^i C^j / (i+1)j!, j=1 to Infinity, i=1 to j] >4) = (A/B) Sum[ C^j/j! Sum[B^i/i, i=2 to j+1], j = 1 to Infinity] >5) = (A/B) F(B,C), say. We note the derivative of this F with respect to B is >6) G(B,C) = Sum[ C^j/j! Sum[B^i, i=1 to j], j=1 to infinity] > and the inner sum is just a geometric series, >7) (B^(j+1) - B) / (B-1). So >8) G(B,C) = (B/(B-1)) Sum[ (CB)^j/j! ] - (B/(B-1)) Sum[ C^j/j! ] >9) = (B/(B-1)) [ Exp(BC) - Exp(C) ] So for any fixed C, F(B,C) is a function of B whose derivative is f'(B) = (B/(B-1)) [ Exp(BC) - Exp(C) ]; equivalently, f is the antiderivative of this function of B. This is where the Fundamental Theorem of Calculus comes in. Students always remember this as saying "to compute integral from a to b of g(x) you just let G(x) be an antiderivative of g and evaluate G(b) - G(a)." That's fine, but another way of thinking of the theorem is that it says "if g(x) is given then ' G(u) = integral from 0 to u of g(x) dx ' defines a function of u with two properties: G(0) = 0 and G'(u) = g(u)." So we use that theorem to enable us to write "integral..." instead of "antiderivative..." Indeed, in the problem at hand, f(0) = 0 and f'(B) = blah blah means f(B) must be equal to the function thus created: >10) F(B,C) = Integral[ (x/(x-1)) ( Exp(xC) - Exp(C) ) dx, x=0 to B] [I get my students to try out this notation with examples they already know. For example, what's a function of u whose derivative is 2u? Well, by the theorem, it's integral 0 to u of 2x dx. That integral they always compute by finding an antiderivative of 2x (namely x^2) and then plugging in u and 0 to get u^2. And indeed, d(u^2)/du = 2u, as desired.] Let me now adjust the rest of the steps. Let x = x1+1 in the integral. Then 11) F(B,C) = Exp(C) Integral[ (1+ 1/x1) ( Exp(C x1) - 1 ) dx, x1=-1 to B-1] Break this integral into two parts: the first is just 12) I1 = Exp(C) [ Exp(C x1) /C - x , evaluated at x1 =B-1 and x1=-1], i.e. 13) I1 = Exp(C) [ Exp(C(B-1))/C - (B-1) - Exp( -C) + (-1) ], or simply 14) I1 = Exp(CB)/C - 1 - B.Exp(C) The second part is best done with another substitution, x1 = x2/C. Then it's 15) I2 = Exp(C) Integral[ (C/x2) (Exp(x2) - 1) dx, x2 = -C to C(B-1) ], i.e. 16) I2 = C Exp(C) Integral[ (Exp(x2) - 1)/x2 dx, x2 = -C to C(B-1) ] This integral does not have an elementary antiderivative but (by the Fundamental Theorem of Calculus again, if you like) it does have _some_ antiderivative; call it H (I'll come back to this). Then this integral is 17) I2 = C Exp(C) [ H( C(B-1) ) - H(-C) ] Combining 11), 14), and 17) gives F(B,C) = I1+I2 or in other words 18) F(B,C) = Exp(CB)/C - B.Exp(C) - 1 + C Exp(C) [ H( C(B-1) ) - H(-C) ] so that the original sum is (by (5) ), 19) S = (A/B) F(B,C) (which I won't write out just yet). Using the definitions of our symbols, > ...where A = exp(-Lv)/v, B=(v/(v-1)), and C=(v-1)L... and a little algebra, here's the original sum (I hope I got this right): 20) S = { 1/L - (v)Exp(-L) + (1-v) Exp(-vL) + +(1-v)^2 L Exp(-L) [ H( L ) - H ( (1-v)L ) ] } / v^2 I'm sure you'll agree that this is quite a mouthful. I would guess you don't need the actual value of the sum S, but rather only an estimate. Before I can do that, you'll have to tell me how large v and L are; so far you haven't even told me if they're positive. Now in your last letter you say >...but as 0I feel a bit guilty to see how much time you spent for this problem, without >even knowing what all is about...but I've been told once that mathematician >likes to solve problems like that.! No problem -- sometimes it even helps to be free of the distraction of the origin of the problem. But sometimes not; fortunately it doesn't really matter in this particular problem that I still have no clue what the application is. >I think I now was able to follow and understand all the steps of your second >answer, but before testing the solution, I'd like to be sure what the H are. >you write in the Eqn (20) H(L) and H((1-v)*L). >Acording to your first answer: >H(x)=Integral (1-exp(-w))/w dw,w=1 to x and Uh-oh, I should have been more careful for you. I changed the definition of H between my first and second letters in an attempt to be clear (and to stay with positive numbers). The correct definition in the second letter is H(x) = Integral ( exp(w) - 1 ) / w dw , w = 1 to x which is the same as saying H is an indefinite integral, i.e., H(x) = Integral ( exp(x) - 1 ) / x dx You'll notice it's only used in pairs so you can replace H(L) - H( (1-v)L ) by Integral( ( exp(x) - 1 ) / x dx, x = (1-v)L to L ) >Now you ask me if I simply need an estimate of this...unfortunatly no, as this >is a part of a function I must maximize! But I don't know much of the Ei (I >know nothing, actually) and does the estimated values provided by Maple or >mathematica are realy estimates or exact values? Oh, when I say "estimate" I mean it the way a mathematician does; you'd call it an "actual value". (The distinction is that when all I see is a bunch of decimal digits, I know it's off from the true value. But when it's off by 10^(-8), say, which is what the computer software will offer you, then you can feel comfortable knowing the value is "correct".) But there is a key issue here: you say you need to include the sum, and thus the function H, into a maximization problem. Do you intend to solve that problem by taking a first derivative and setting it equal to zero? If so, you're in luck. The defining property of H(x) is that H'(x) = (exp(x) - 1)/x. Thus for example if you wish to differentiate [H(L) - H((1-v)L)] with respect to L, you'll get [exp(L) - exp((1-v)L)]/L. That should make your life easier. dave ============================================================================== Date: Wed, 22 Feb 1995 22:50:45 -0400 From: [Permission pending] Subject: Re: HELP NEEDED...PLEASE! To: rusin@math.niu.edu Ok, sorry having been so long, but very busy days... Anyways, your solution seems to be working (I think there was a sign error, but still not sure...) and i thank you again for helping... More than that, reading your e-mail I've learn a lot in mathematics...which is good. For the maximizzation, I'm only partly lucky as this expression is on a nominator, which means that the derivative include the expression itself (well not so clear, but my english...it's something like (f/g)'=(f'g-fg')/g^2) Anyway, it's another storry, and I'd like to thank you again, [sig deleted]