Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.soft-sys.math.mathematica > #8208 > unrolled thread

Re: Puzzled by Sum

Started byAlexei Boulbitch <Alexei.Boulbitch@iee.lu>
First post2012-01-27 11:08 +0000
Last post2012-01-27 11:08 +0000
Articles 1 — 1 participant

Back to article view | Back to comp.soft-sys.math.mathematica


Contents

  Re: Puzzled by Sum Alexei Boulbitch <Alexei.Boulbitch@iee.lu> - 2012-01-27 11:08 +0000

#8208 — Re: Puzzled by Sum

FromAlexei Boulbitch <Alexei.Boulbitch@iee.lu>
Date2012-01-27 11:08 +0000
SubjectRe: Puzzled by Sum
Message-ID<jfu0il$c36$1@smc.vnet.net>
I am trying to define a function F[X] whose argument is the upper limit in a summation:



A[i_, j_] := i/j + j/i

F[X_] := (Sum[A[i - j, j], {j, 1, i - 1}]) /. i -> X



but when I evaluate, say F[2], I get



-2 DifferenceRoot[{\[FormalY],\[FormalN]}\[Function]{(\[FormalN]-2) \[FormalY](\[FormalN])+(3-2 \[FormalN]) \[FormalY](\[FormalN]+1)+(\[FormalN]-1) \[FormalY](\[FormalN]+2)==0,\[FormalY](0)==0,\[FormalY](1)==-(1/2)}][2]-1



where the result should have been 2:



ii = 2;

Sum[A[ii - j, j], {j, 1, ii - 1}]



2



If I use A[i,j]=i j or other simple functions, everything works as expected.



Themis





Try this:

F[i_] := (Sum[(i - j)/j + j/(i - j), {j, 1, i - 1}]);



F[2]



2



Alexei BOULBITCH, Dr., habil.

IEE S.A.

ZAE Weiergewan,

11, rue Edmond Reuter,

L-5326 Contern, LUXEMBOURG



Office phone :  +352-2454-2566

Office fax:       +352-2454-3566

mobile phone:  +49 151 52 40 66 44



e-mail: alexei.boulbitch@iee.lu<mailto:alexei.boulbitch@iee.lu>





[toc] | [standalone]


Back to top | Article view | comp.soft-sys.math.mathematica


csiph-web