用Octave判断级数是否收敛
广告
{{v.name}}
判断\(\sum_{n=1}^{\infty}\frac{1}{n(n+1)}\)是否收敛.
求\(\sum_{n=1}^{\infty}\frac{1}{n(n+1)}\),程序代码如下
function [text_result, numeric_result] = func83()
pkg load symbolic;
n = sym('n');
result = 1 / (n * (n + 1));
result = symsum (result, n, 1, inf);
text_result = ["\n", disp(result)];
numeric_result = eval(result);
endfunction
结果如下
>> [text_result, numeric_result] = func83()
text_result =
1
numeric_result = 1
因为\(\displaystyle\lim_{n \to \infty}S_n=1\),所以级数\(\sum_{n=1}^{\infty}\frac{1}{n(n+1)}\)收敛.