Help me how to calculate sum of series ?
71 次查看(过去 30 天)
显示 更早的评论
help me how to calculate the sum of a series in Matlab. (for example 2 series in the picture)
1 个评论
chadi cream
2017-12-22
编辑:Walter Roberson
2017-12-22
symsum((sqrt(n+1) - sqrt(n-1))/n^(3/4),n,1,inf)
vpa(ans)
=5.0311555338624769245497524622442
回答(4 个)
rifat
2014-5-27
编辑:rifat
2014-5-27
You can not add infinite number of terms. If the sum is a converging sum, then you can add a large number of terms (e.g. n=5000) to get a satisfactory result.
n=5000;
series1=0;
series2=0;
for i=1:n
p=(((i+1)/i)^i)/(i^2);
series1=series1+p;
p=(sqrt(i+1)-sqrt(n-1))/(i^.75);
series2=series2+p;
end
2 个评论
Sandie Nhatien Vu
2016-8-5
@Rifat ahmed is it possible to write a script using vectorized computation instead of the for-loop for that sum of series?
Roger Wohlwend
2014-5-27
n = 1 : 10^6;
sum(((n+1)./n).^n./n.^2)
sum((sqrt(n+1) - sqrt(n-1))./n.^(3/4))
2 个评论
chadi cream
2017-12-22
编辑:Walter Roberson
2021-6-5
syms n;
f=1/n^2*((n+1)/n)^n
symsum(f,n,1,inf)
vpa(ans) = 3.550777333936337795612455939406
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Calculus 的更多信息
产品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!