Problem Using Summation Notation with Euler's Number

1 回表示 (過去 30 日間)
Jonathan Pinko
Jonathan Pinko 2020 年 2 月 5 日
コメント済み: Jonathan Pinko 2020 年 2 月 6 日
Hi all,
I am having a problem using summation notation. My code is as follows:
syms n x
SumFe56 = symsum(1/n^2*exp(-n^2*pi^2*10^-12*(7.50*10^-12)),n,1,Inf)
BulkFe56 = (20*.9175)+((6*.9175*(9-20))/pi^2)*SumFe56
I am thus trying to do define a sum, titled SumFe56, and then put this value into my BulkFe56 equation to generate a single number answer. When I run my code, however, for the first two lines, I receive this output:
SumFe56 =
symsum(exp(-(161205712616447904232271790533*n^2)/2177807148294006166165597487563316553318400000000000)/n^2, n, 1, Inf)
With the answer for BulkFe56 as follows:
BulkFe56 = 367/20 - (6907963692174921*symsum(exp(-(161205712616447904232271790533*n^2)/2177807148294006166165597487563316553318400000000000)/n^2, n, 1, Inf))/1125899906842624
I am assuming that my summation code was written incorrectly, but I am not sure how. I would like my SumFe56 to just be a single value, which I can then easily put into my code for BulkFe56, to generate, yet again, a single numerical value.
Does anybody have any insight into what I'm doing incorrectly?
Thank you.

採用された回答

David Goodmanson
David Goodmanson 2020 年 2 月 5 日
編集済み: David Goodmanson 2020 年 2 月 5 日
Hi Jonathan,
symbolics is just telling you that it can't do the sum explicitly and get an analytic solution. Fortunately the terms fall off plently fast enough so you can just do the sum numerically:
n = 1:1e7;
SumFe56 = sum((1./n.^2).*exp(-n.^2*pi^2*1e-12*(7.5e-12)))
SumFe56 = 1.64493
The argument to the exp function is so small (because of the small multiplicative constants) that the exp function equals almost exactly 1 in the range of n where 1/n^2 is making significant contributions to the sum. It might be worth checking if those constants are correct. The sum is basically what you get by just setting exp = 1
sum{1..inf} 1/N^2 = pi^2/6
format long
SumFe56
S = pi^2/6
SumFe56 = 1.644933966848274
S = 1.644934066848226
  1 件のコメント
Jonathan Pinko
Jonathan Pinko 2020 年 2 月 6 日
Hi David,
This helped a ton, and now it works perfectly.
Thank you.

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeMATLAB についてさらに検索

製品


リリース

R2019b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by