How to calculate this infinite sum?

1 view (last 30 days)
Whenever I type in the format
symsum(1/nchoosek(2k,k))),1,inf)
It gives me the error: "Unexpected MatLab Expression". What do I do to fix this problem?
  1 Comment
Youssef  Khmou
Youssef Khmou on 20 Jun 2014
Edited: Youssef Khmou on 20 Jun 2014
the function nchoosek is working with numeric data.

Sign in to comment.

Accepted Answer

Roger Stafford
Roger Stafford on 20 Jun 2014
Thanks to Leonhard Euler we can express atan(z) as the infinite series:
atan(z) = symsum(2^(2*n)*(n!)^2/(2*n+1)!*z^(2*n+1)/(1+z^2)^(n+1),n,0,inf)
See:
http://en.wikipedia.org/wiki/Inverse_trigonometric_functions#Infinite_series
From this is it possible to derive the power series:
4*atan(sqrt(x/(4-x)))/sqrt(x)/(4-x)^(3/2)+1/(4-x) = ...
symsum((n!)^2/(2*n)!*x^(n-1),n,1,inf)
Hence by setting x = 1 in this series we get the answer to your question:
symsum((n!)^2/(2*n)!,n,1,inf) = 2*pi/9/sqrt(3)+1/3
Note: (n!)^2/(2*n)! is equal to 1/nchoosek(2*n,n).
Apparently your symbolic toolbox was unable to go through this line of reasoning. It is possible to verify this result numerically provided an appropriate method is used for computing the sum of the infinite series. Directly computing (2*n)! and n! will fail for large values of n.

More Answers (0)

Categories

Find more on Symbolic Math Toolbox 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!