Quantcast

evaluate sum of sum

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

evaluate sum of sum

Roslina Zakaria
Hi R-users,

Could anybody show me how to write a code to evaluate sum(z[i] + sum(k[j]*(z[i])^(k[j])), i=1 to 4, j=0 to infinity) ?

Thank you so much for any help given.


     
        [[alternative HTML version deleted]]

______________________________________________
[hidden email] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Re: evaluate sum of sum

Rolf Turner

On 16/07/2009, at 2:30 PM, Roslina Zakaria wrote:

> Hi R-users,
>
> Could anybody show me how to write a code to evaluate sum(z[i] + sum
> (k[j]*(z[i])^(k[j])), i=1 to 4, j=0 to infinity) ?

No.  No-one can.  It is conceptually impossible.

(a) Computers cannot do infinite sums; they can only do finite ones.

(b) Attempting to approximate infinite sums by finite ones that  
computers
can do is theoretically possible, but fraught with peril.  E.g. try  
summing
{1/(j+1)} from 0 to infinity that way.  You may, after a long while,  
get a
finite answer .....

(c) What is k[j] equal to?  You must have an expression for it, elsewise
your question makes no sense at all.

If the sequence k[j] is sufficiently nice then you may be able to  
determine
error bounds.  I.e. for a given epsilon, find an M_0 such that the  
sum from
0 to M is within epsilon of the sum to infinity for any M >= M_0.

The sum from 0 to M is easy to calculate.

        cheers,

                Rolf

######################################################################
Attention:\ This e-mail message is privileged and confid...{{dropped:9}}

______________________________________________
[hidden email] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Re: evaluate sum of sum

hafida
In reply to this post by Roslina Zakaria
Hi
can any body please help me to programme this formula:
a[j]= E[j]-sum from l=i  to i-1 (exp{(B0 B1row matrix) (z[l]column matrix) } x[l])  /  sum from l=i to n

it s complicate for me ; hope you can help me
thank you a lot
Loading...