diff --git a/symja_android_library/matheclipse-core/src/main/java/org/matheclipse/core/reflection/system/rulesets/SumRules.java b/symja_android_library/matheclipse-core/src/main/java/org/matheclipse/core/reflection/system/rulesets/SumRules.java index 2446f82f5..15b1b43a7 100644 --- a/symja_android_library/matheclipse-core/src/main/java/org/matheclipse/core/reflection/system/rulesets/SumRules.java +++ b/symja_android_library/matheclipse-core/src/main/java/org/matheclipse/core/reflection/system/rulesets/SumRules.java @@ -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))); diff --git a/symja_android_library/matheclipse-core/src/test/java/org/matheclipse/core/system/SumTest.java b/symja_android_library/matheclipse-core/src/test/java/org/matheclipse/core/system/SumTest.java index 33a598689..a4557449b 100644 --- a/symja_android_library/matheclipse-core/src/test/java/org/matheclipse/core/system/SumTest.java +++ b/symja_android_library/matheclipse-core/src/test/java/org/matheclipse/core/system/SumTest.java @@ -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 diff --git a/symja_android_library/rule_sets/SumRules.m b/symja_android_library/rule_sets/SumRules.m index 9eb0337c5..a265867db 100644 --- a/symja_android_library/rule_sets/SumRules.m +++ b/symja_android_library/rule_sets/SumRules.m @@ -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),