MathGroup Archive 2011

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: Series holding the final sum

  • To: mathgroup at smc.vnet.net
  • Subject: [mg117828] Re: Series holding the final sum
  • From: DrMajorBob <btreat1 at austin.rr.com>
  • Date: Fri, 1 Apr 2011 02:32:39 -0500 (EST)

You can also do this:

ss = Sum[(-1)^(n + 2) x^(2 n + 1)/(2 n + 1), {n, 0, 5}];
CirclePlus @@ Select[-CoefficientList[ss, x], # != 0 &]

or

infix = Infix[Select[-CoefficientList[ss, x], # != 0 &], "+"]

The numerical result can be retrieved with:

Plus @@ First@infix

-(2578/3465)

Bobby

On Thu, 31 Mar 2011 03:58:40 -0500, Harvey P. Dale <hpd1 at nyu.edu> wrote:

> Select[-CoefficientList[ss,x],#!=0&]
>
> 	Best,
> 	Harvey
>
> -----Original Message-----
> From: Jon Joseph [mailto:josco.jon at gmail.com]
> Sent: Wednesday, March 30, 2011 5:10 AM
> To: mathgroup at smc.vnet.net
> Subject: [mg117761] [mg117703] Series holding the final sum
>
> All:  Given the following sum:
>
> Sum[(-1)^(n + 2) x^(2 n + 1)/(2 n + 1), {n, 0, 5}]
>
> which generates:
>
> x - x^3/3 + x^5/5 - x^7/7 + x^9/9 - x^11/11
>
> I would like to replace x with -1 (%/.x->-1) without the sum being
> evaluated so I end up with
>
> -1+1/3-1/5+1/7-1/9+1/11
>
> So far I have not been able to find a way to Hold, HoldForm, Unevaluate,
> or Defer and keep getting -2578/3465.  Thanks. Jon
>
>
> ______________________________________________________________________
> This email has been scanned by the MessageLabs Email Security System.
> For more information please visit http://www.messagelabs.com/email
> ______________________________________________________________________
>


-- 
DrMajorBob at yahoo.com


  • Prev by Date: Re: read CSV)
  • Next by Date: Re: NonlinearFit for specific data
  • Previous by thread: Re: read CSV)
  • Next by thread: Re: Why Mathematica does not issue a warning when the calculations