Re: maximum of a series
- To: mathgroup at smc.vnet.net
- Subject: [mg114022] Re: maximum of a series
- From: Bob Hanlon <hanlonr at cox.net>
- Date: Sat, 20 Nov 2010 18:26:33 -0500 (EST)
m[i_, n_] == HoldForm[Max[Table[Sum[a[k], {k, i, j}], {j, i, n}]]]; m[i, n] HoldForm[Max[Table[Sum[a[k], {k, i, j}], {j, i, n}]]] m[3, 5] HoldForm[Max[Table[Sum[a[k], {k, 3, j}], {j, 3, 5}]]] % // ReleaseHold Max[a[3], a[3] + a[4], a[3] + a[4] + a[5]] Bob Hanlon ---- olfa mraihi <olfa.mraihi at yahoo.fr> wrote: ========================== Thank you Bob for the reply, =C2 I tried to use Table but the problem is that I need to use it symbolically = (without having values for i and n) which means Max[Table[Sum[a[k], {k, i, j}], {j, i, n}]] but unfortunately=C2 I=C2 get this error :Iterator {j,i,n} does not hav= e appropriate bounds =C2 so how to deal with that? =C2 Regards, --- En date de=C2 : Ven 19.11.10, Bob Hanlon <hanlonr at cox.net> a =C3=A9cr= it=C2 : De: Bob Hanlon <hanlonr at cox.net> Objet: Re: [mg113951] maximum of a series =C3=80: "olfa" <olfa.mraihi at yahoo.fr>, mathgroup at smc.vnet.net Date: Vendredi 19 novembre 2010, 16h22 m[i_Integer, n_Integer] :== Max[Table[Sum[a[k], {k, i, j}], {j, i, n}]] /; n >== i m[3, 5] Max[a[3], a[3] + a[4], a[3] + a[4] + a[5]] Bob Hanlon ---- olfa <olfa.mraihi at yahoo.fr> wrote: ========================== Hi Mathematica Community, how can I represent for example the maximum of the summations :sum[a[k],{k,i,j}] where j varies from i to n? Thank you -- Bob Hanlon