Partial sums of powers

버전 1.0.1 (1.12 KB) 작성자: Ryan Black
Function computes exact or approximate solutions to partial sums of real non-negative powers via power series.
다운로드 수: 7
업데이트 날짜: 2020/4/21

라이선스 보기

The sequence S_k(n) = 1^k + 2^k + 3^k ... + n^k is computed via power series by the function call

Skn = partial_sum(k,n,R)

with input constraints:
real, non-negative k
real n>=1
integer R between 1-20 specifies approximation depth

Output is necessarily an approximation for non-integer k. Output is exact for integer k, assuming R>=k+1.

Example: approximate 1^(pi/4) + 2^(pi/4) + 3^(pi/4) ... + 27^(pi/4) using a depth of 3.
Skn = Skn(pi/4,27,3)
Answer: Skn = 207.8504...

인용 양식

Ryan Black (2024). Partial sums of powers (https://www.mathworks.com/matlabcentral/fileexchange/75122-partial-sums-of-powers), MATLAB Central File Exchange. 검색됨 .

MATLAB 릴리스 호환 정보
개발 환경: R2020a
모든 릴리스와 호환
플랫폼 호환성
Windows macOS Linux

Community Treasure Hunt

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

Start Hunting!
버전 게시됨 릴리스 정보
1.0.1

changed to symbolic computation.

1.0.0