Skip to content

Commit

Permalink
rule Sum(i_^k_*c_^(a_.*i_),{i_Symbol,1,Infinity}):=PolyLog(-k, c^a)
Browse files Browse the repository at this point in the history
  • Loading branch information
axkr committed Aug 4, 2024
1 parent 6ebb06f commit 0fe5ac9
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,9 @@ public static Matcher init1() {
// Sum(k_^(a_.*i_),{i_Symbol,1,Infinity}):=-k^a/(-1+k^a)/;FreeQ(k,i)&&a<0&&(k>1||k<-1)
matcher.caseOf(Sum(Power(k_,Times(a_DEFAULT,i_)),list(i_Symbol,C1,oo)),
Condition(Times(CN1,Power(k,a),Power(Plus(CN1,Power(k,a)),CN1)),And(FreeQ(k,i),Less(a,C0),Or(Greater(k,C1),Less(k,CN1)))));
// Sum(i_^k_/c_^i_,{i_Symbol,1,Infinity}):=PolyLog(-k,1/c)/;FreeQ({c,k},i)
matcher.caseOf(Sum(Times(Power(i_,k_),Power(c_,Negate(i_))),list(i_Symbol,C1,oo)),
Condition(PolyLog(Negate(k),Power(c,CN1)),FreeQ(list(c,k),i)));
// Sum(i_^k_*c_^(a_.*i_),{i_Symbol,1,Infinity}):=PolyLog(-k,c^a)/;FreeQ({a,c,k},i)
matcher.caseOf(Sum(Times(Power(i_,k_),Power(c_,Times(a_DEFAULT,i_))),list(i_Symbol,C1,oo)),
Condition(PolyLog(Negate(k),Power(c,a)),FreeQ(list(a,c,k),i)));
// Sum(x_^(2*i_+1)/(2*i_+1)!,{i_Symbol,0,Infinity}):=Sinh(x)/;FreeQ(x,i)
matcher.caseOf(Sum(Times(Power(Factorial(Plus(Times(C2,i_),C1)),CN1),Power(x_,Plus(Times(C2,i_),C1))),list(i_Symbol,C0,oo)),
Condition(Sinh(x),FreeQ(x,i)));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -446,6 +446,8 @@ public void testSumPolyLogInifinity() {
"26");
check("Sum(n^k/c^n,{n, 1, Infinity})", //
"PolyLog(-k,1/c)");
check("Sum(n^k*c^(a*n),{n, 1, Infinity})", //
"PolyLog(-k,c^a)");
}

@Test
Expand Down
4 changes: 2 additions & 2 deletions symja_android_library/rule_sets/SumRules.m
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@

Sum(k_^(a_.*i_), {i_Symbol,1,Infinity}) := -(k^a)/(-1+(k^a))
/; FreeQ(k,i) && a<0 && (k>1 || k<(-1)),
Sum(i_^k_*c_^(-i_), {i_Symbol,1,Infinity}) := PolyLog(-k, 1/c)
/; FreeQ({c,k},i),
Sum(i_^k_*c_^(a_.*i_), {i_Symbol,1,Infinity}) := PolyLog(-k, c^a)
/; FreeQ({a,c,k},i),

Sum(x_^(2*i_+1)/(2*i_+1)!, {i_Symbol,0,Infinity}) := Sinh(x)
/; FreeQ(x,i),
Expand Down

0 comments on commit 0fe5ac9

Please sign in to comment.