Integration of a Series Sum
2 ビュー (過去 30 日間)
古いコメントを表示
I want to write a series sum in terms of a variable that I will integrate numerically:
syms q
fun = @(k) symsum(k*q,q,0,10)
integral(fun,0,1)
How can this be done?
0 件のコメント
採用された回答
Walter Roberson
2012 年 12 月 12 日
編集済み: Walter Roberson
2012 年 12 月 12 日
sum(k*q,q,0,10) is going to be k * sum(q,q,0,10) which is going to be k * (10 * (10+1) / 2) which is going to be 45*k
integral(45*k, k, 0, 1) is going to be 45*k^2/2 evaluated at 1, which will be 45/2 .
Anyhow:
syms k q
fun = matlabFunction( symsum(k*q, q, 1, 10), 'vars', k);
and then integrate fun
その他の回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で Calculus についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!