필터 지우기
필터 지우기

Integration of a Series Sum

조회 수: 4 (최근 30일)
Thomas
Thomas 2012년 12월 12일
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?

채택된 답변

Walter Roberson
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
  댓글 수: 1
Thomas
Thomas 2012년 12월 12일
Unfortunately, the real series is rather more complicated, but thanks to your quick response, I hope Matlab will be able to handle it numerically. Thanks again.

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Numbers and Precision에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by