[R] sum to infinity

2010-09-13 Thread tuggi

hello,

can i calculate a sum to infinity in R.
i want to do something like this:

\sum_{i=0}^\infty
\frac{2^{-d-1}}{\Gamma(\frac{d-1}{2})}\left(\frac{\Gamma(2d-3)(2-d)_{i}\Gamma(i+1,-z/2)2^{i+1}}{\Gamma(d-1)(4-2d)_{i}i!}\right)+
\\
\sum_{i=0}^\infty
\frac{2^{-d-1}}{\Gamma(\frac{d-1}{2})}\left(\frac{\Gamma(3-2d)(d-1)_{i}\Gamma(2d-2+i,-z/2)2^{2d-2+i}}{\Gamma(2-d)(2d-2)_{i}}\right),

where (a)_{i}=\Gamma(a+i) / \Gamma(a) .
I hope someone can help me.

Tuggi
-- 
View this message in context: 
http://r.789695.n4.nabble.com/sum-to-infinity-tp2537122p2537122.html
Sent from the R help mailing list archive at Nabble.com.

__
R-help@r-project.org 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.


Re: [R] sum to infinity

2010-09-13 Thread David Winsemius


On Sep 13, 2010, at 5:24 AM, tuggi wrote:



hello,

can i calculate a sum to infinity in R.
i want to do something like this:

\sum_{i=0}^\infty
\frac{2^{-d-1}}{\Gamma(\frac{d-1}{2})}\left(\frac{\Gamma(2d-3)(2- 
d)_{i}\Gamma(i+1,-z/2)2^{i+1}}{\Gamma(d-1)(4-2d)_{i}i!}\right)+

\\
\sum_{i=0}^\infty
\frac{2^{-d-1}}{\Gamma(\frac{d-1}{2})}\left(\frac{\Gamma(3-2d) 
(d-1)_{i}\Gamma(2d-2+i,-z/2)2^{2d-2+i}}{\Gamma(2-d)(2d-2)_{i}}\right),


where (a)_{i}=\Gamma(a+i) / \Gamma(a) .
I hope someone can help me.


Are you aware of the RYacas interface to the symbolic algebra YACAS.  
(I'm not sure I have all the caps set correctly, but your search  
engine probably won't care.)



--
David Winsemius, MD
West Hartford, CT

__
R-help@r-project.org 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.


[R] sum to infinity

2009-03-25 Thread Roslina Zakaria

Hi r-users,

How do we evaluate the summation of (1/m!) from 0 to infinity (for example).

Any help is very much appreciated.

Thank you.

__
R-help@r-project.org 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.


Re: [R] sum to infinity

2009-03-25 Thread Mandro Litt
Well, sum of 1/m! is e--does that answer your question?
Generally, I guess you have to decide how much error you're comfortable
with; then using an error approximation formula, you can back out the M at
which you can stop the sum.  Then you can write a for loop that ends at M.

Hope that helps.


On Wed, Mar 25, 2009 at 8:43 PM, Roslina Zakaria zrosl...@yahoo.com wrote:


 Hi r-users,

 How do we evaluate the summation of (1/m!) from 0 to infinity (for
 example).

 Any help is very much appreciated.

 Thank you.

 __
 R-help@r-project.org 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.


[[alternative HTML version deleted]]

__
R-help@r-project.org 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.


Re: [R] sum to infinity

2009-03-25 Thread Jorge Ivan Velez
Dear Roslina,
For $m \rightarrow  \infty$ that sum is exp(1)-1:

 options(digits=20)
 exp(1)-1
[1] 1.718281828459045
 m-20
 sum(1/factorial(1:20))
[1] 1.718281828459045

HTH,

Jorge


On Wed, Mar 25, 2009 at 8:43 PM, Roslina Zakaria zrosl...@yahoo.com wrote:


 Hi r-users,

 How do we evaluate the summation of (1/m!) from 0 to infinity (for
 example).

 Any help is very much appreciated.

 Thank you.

 __
 R-help@r-project.org 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.


[[alternative HTML version deleted]]

__
R-help@r-project.org 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.