n=[1:21];
syms x
f=1./(n+x);
int(f,0,1)
积分结果:
[ log(2), log(3)-log(2), log(4)-log(3), log(5)-log(4), log(6)-log(5), log(7)-log(6),
log(8)-log(7), log(9)-log(8), log(10)-log(9), log(11)-log(10), log(12)-log(11),
log(13)-log(12), log(14)-log(13), log(15)-log(14), log(16)-log(15), log(17)-log(16),
log(18)-log(17), log(19)-log(18), log(20)-log(19), log(21)-log(20), log(22)-log(21)]