how do i write a matlab script to sum this expression?
6 views (last 30 days)
Show older comments
0 Comments
Accepted Answer
More Answers (1)
Stephan
on 24 Nov 2020
Symbolic:
syms n positive integer
N = 10000;
eq = 1/n + 1/((n+2)*(n+3));
pretty(eq)
sol = symsum(eq,n,1,N)
sol_num = double(sol)
results in:
>> Untitled
1 1
--------------- + -
(n + 2) (n + 3) n
sol =
eulergamma + psi(10001) + 10000/30009
sol_num =
10.1208
See Also
Categories
Find more on Number Theory in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!