Page 1 sur 1

sum_riemann

Publié : ven. juil. 19, 2019 7:36 pm
par lukamar
Hello,

I tried to compute the limit of the sum of 1/(sqrt(n)*sqrt(n+k)), where k=1..n, as n->inf. As I understand, this can be done by typing

Code : Tout sélectionner

sum_riemann(1/(sqrt(n)*sqrt(n+k)),[n,k])
However, I obtain 2-2*sqrt(2) which is negative. The actual value of the limit is 2*sqrt(2)-2.
During computation, the following warning was produced:

Code : Tout sélectionner

Warning, choosing root of [1,0,%%%{-2,[1,1]%%%}+%%%{-4,[1,0]%%%},0,%%%{1,[2,2]%%%}] at parameters values [26.265678538,0]

Re: sum_riemann

Publié : sam. juil. 20, 2019 5:38 am
par parisse
Running assume(n>0); assume(k>0) will help the system choose the right branch.

Re: sum_riemann

Publié : sam. juil. 20, 2019 8:08 am
par lukamar
Thanks, I thought these assumptions are made by default.

Re: sum_riemann

Publié : lun. juil. 22, 2019 7:30 am
par parisse
I tried to add auto-assumptions, but I had to revert because of side-effects.