From: davef on
I want to evaluate a sum from a series I created using the Array
function.

For example; I specify

Array[((-1)^(# + 1) (x)^#)/# ! &, 3, 1 ]

which gives me the following 3 terms of output:

{x, -(x^2/2), x^3/6}

Can anyone tell if and how I can turn these 3 terms into a sum to be
evaluated?

From: Bill Rowe on
On 5/2/10 at 5:35 AM, davidfrick2003(a)yahoo.com (davef) wrote:

>I want to evaluate a sum from a series I created using the Array
>function.

>For example; I specify

>Array[((-1)^(# + 1) (x)^#)/# ! &, 3, 1 ]

>which gives me the following 3 terms of output:

>{x, -(x^2/2), x^3/6}

>Can anyone tell if and how I can turn these 3 terms into a sum to be
>evaluated?

In[2]:= Plus @@ Array[((-1)^(# + 1) (x)^#)/#! &, 3, 1]

Out[2]= x^3/6 - x^2/2 + x

or

In[3]:= Total(a)Array[((-1)^(# + 1) (x)^#)/#! &, 3, 1]

Out[3]= x^3/6 - x^2/2 + x


From: Nasser M. Abbasi on

"davef" <davidfrick2003(a)yahoo.com> wrote in message
news:hrjh0l$bg8$1(a)smc.vnet.net...
>I want to evaluate a sum from a series I created using the Array
> function.
>
> For example; I specify
>
> Array[((-1)^(# + 1) (x)^#)/# ! &, 3, 1 ]
>
> which gives me the following 3 terms of output:
>
> {x, -(x^2/2), x^3/6}
>
> Can anyone tell if and how I can turn these 3 terms into a sum to be
> evaluated?
>

may be use Total[]?

v = Array[((-1)^(#1 + 1)*x^#1)/#1! & , 3, 1];
Total[v] /. x -> 3.14

3.370057333333333

--Nasser



From: M.Roellig on
On 2 Mai, 11:35, davef <davidfrick2...(a)yahoo.com> wrote:
> I want to evaluate a sum from a series I created using the Array
> function.
>
> For example; I specify
>
> Array[((-1)^(# + 1) (x)^#)/# ! &, 3, 1 ]
>
> which gives me the following 3 terms of output:
>
> {x, -(x^2/2), x^3/6}
>
> Can anyone tell if and how I can turn these 3 terms into a sum to be
> evaluated?

maybe Total ?

Total(a)Array[((-1)^(# + 1) (x)^#)/#! &, 3, 1]

x - x^2/2 + x^3/6


Markus