-
-
Notifications
You must be signed in to change notification settings - Fork 81
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Isuue #490 improved ZTransform, HurwitzLerchPhi, PolyLog
- Loading branch information
Showing
8 changed files
with
248 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
44 changes: 44 additions & 0 deletions
44
...core/src/main/java/org/matheclipse/core/reflection/system/rules/HurwitzLerchPhiRules.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
package org.matheclipse.core.reflection.system.rules; | ||
|
||
import static org.matheclipse.core.expression.F.*; | ||
import org.matheclipse.core.interfaces.ISymbol; | ||
import org.matheclipse.core.interfaces.IAST; | ||
import org.matheclipse.core.patternmatching.Matcher; | ||
|
||
/** | ||
* <p>Generated by <code>org.matheclipse.core.preprocessor.RulePreprocessor</code>.</p> | ||
* <p>See GIT repository at: <a href="https://github.com/axkr/symja_android_library">github.com/axkr/symja_android_library under the tools directory</a>.</p> | ||
*/ | ||
public interface HurwitzLerchPhiRules { | ||
/** | ||
* <ul> | ||
* <li>index 0 - number of equal rules in <code>RULES</code></li> | ||
* </ul> | ||
*/ | ||
final public static int[] SIZES = { 1, 3 }; | ||
|
||
final public static IAST RULES = List( | ||
IInit(HurwitzLerchPhi, SIZES), | ||
// HurwitzLerchPhi(0,1,1)=1 | ||
ISet(HurwitzLerchPhi(C0,C1,C1), | ||
C1), | ||
// HurwitzLerchPhi(z_,s_,1):=PolyLog(s,z)/z | ||
ISetDelayed(HurwitzLerchPhi(z_,s_,C1), | ||
Times(Power(z,CN1),PolyLog(s,z))), | ||
// HurwitzLerchPhi(z_,0,a_):=1/(1-z) | ||
ISetDelayed(HurwitzLerchPhi(z_,C0,a_), | ||
Power(Subtract(C1,z),CN1)), | ||
// HurwitzLerchPhi(0,s_,a_):=a^(-s) | ||
ISetDelayed(HurwitzLerchPhi(C0,s_,a_), | ||
Power(a,Negate(s))), | ||
// HurwitzLerchPhi(z_,1,1):=-Log(1-z)/z | ||
ISetDelayed(HurwitzLerchPhi(z_,C1,C1), | ||
Times(CN1,Power(z,CN1),Log(Subtract(C1,z)))), | ||
// HurwitzLerchPhi(-1,s_,1):=(1-2^(1-s))*Zeta(s) | ||
ISetDelayed(HurwitzLerchPhi(CN1,s_,C1), | ||
Times(Subtract(C1,Power(C2,Subtract(C1,s))),Zeta(s))), | ||
// HurwitzLerchPhi(0,1,a_):=1/a | ||
ISetDelayed(HurwitzLerchPhi(C0,C1,a_), | ||
Power(a,CN1)) | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
{ | ||
HurwitzLerchPhi(0, 1, 1) = 1, | ||
|
||
HurwitzLerchPhi(z_, s_, 1) := PolyLog(s,z)/z, | ||
HurwitzLerchPhi(z_, 0, a_) := 1/(1-z), | ||
HurwitzLerchPhi(0, s_, a_) := a^(-s), | ||
HurwitzLerchPhi(z_, 1, 1) := -Log(1-z)/z, | ||
HurwitzLerchPhi(-1, s_, 1) := (1-2^(1-s))*Zeta(s), | ||
HurwitzLerchPhi(0, 1, a_) := 1/a | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,43 @@ | ||
{ | ||
(* see http://www.reduce-algebra.com/docs/ztrans.pdf *) | ||
ZTransform(a_^n_*f_,n_?NotListQ,z_?NotListQ):= ZTransform(f,n,z/a) | ||
/; FreeQ(a,n)&&FreeQ(a,z), | ||
ZTransform(n_*f_,n_?NotListQ,z_?NotListQ):= (-1)*z*D(ZTransform(f,n,z),z), | ||
ZTransform(n_^2*f_,n_?NotListQ,z_?NotListQ):= z*D(ZTransform(f,n,z),z)+z^2*D(ZTransform(f,n,z),{z,2}), | ||
ZTransform(n_^3*f_,n_?NotListQ,z_?NotListQ):= -z*D(ZTransform(f,n,z),z)-3*z^2*D(ZTransform(f,n,z),{z,2})-z^3*D(ZTransform(f,n,z),{z,3}), | ||
(* ZTransform(n_^k_Integer*f_,n_?NotListQ,z_?NotListQ):=(-1)*z*D(ZTransform(n^(k-1)*f,n,z),z) | ||
/; k>0, | ||
*) | ||
|
||
ZTransform(a_^n_ ,n_?NotListQ,z_?NotListQ):=z/(z-a) | ||
/; FreeQ(a,n)&&FreeQ(a,z) | ||
/; FreeQ(a,n)&&FreeQ(a,z), | ||
ZTransform(a_^(f_*n_) ,n_?NotListQ,z_?NotListQ):=z/(z-a^f) | ||
/; FreeQ({a,f},n)&&FreeQ({a,f},z), | ||
ZTransform(f_./(n_+g_),n_?NotListQ,z_?NotListQ):=f*HurwitzLerchPhi(1/z, 1, g) | ||
/; FreeQ({f,g},n)&&FreeQ({f,g},z), | ||
ZTransform((n_!)^(-1),n_?NotListQ,z_?NotListQ):=(E^(1/z)) | ||
/; FreeQ({f,g},n)&&FreeQ({f,g},z) , | ||
ZTransform(f_./(g_.*n_!),n_?NotListQ,z_?NotListQ):=(E^(1/z)*f)/g | ||
/; FreeQ({f,g},n)&&FreeQ({f,g},z), | ||
ZTransform(f_./(2*n_+1)!,n_?NotListQ,z_?NotListQ):=Sqrt(z)*f*Sinh(1/Sqrt(z)) | ||
/; FreeQ(f,n)&&FreeQ(f,z), | ||
ZTransform(Cos(f_.*n_)/(n_)!,n_?NotListQ,z_?NotListQ):=E^(Cos(f)/z)*Cos(Sin(f)/z) | ||
/; FreeQ(f,n)&&FreeQ(f,z), | ||
ZTransform(Sin(f_.*n_)/(n_)!,n_?NotListQ,z_?NotListQ):=E^(Cos(f)/z)*Sin(Sin(f)/z) | ||
/; FreeQ(f,n)&&FreeQ(f,z), | ||
ZTransform(Cos(f_.*(n_+1))/(n_+1),n_?NotListQ,z_?NotListQ):=(1/2)*z*(-Log((E^(I*f)-1/z)/E^(I*f))-Log(1-E^(I*f)/z)) | ||
/; FreeQ(f,n)&&FreeQ(f,z), | ||
ZTransform(Sin(f_.*(n_+1))/(n_+1),n_?NotListQ,z_?NotListQ):=(-(1/2))*I*z*(Log((E^(I*f)-1/z)/E^(I*f))-Log(1 - E^(I*f)/z)) | ||
/; FreeQ(f,n)&&FreeQ(f,z), | ||
|
||
ZTransform(Cos(f_.*n_+t_.),n_?NotListQ,z_?NotListQ):=(z*(-Cos(f-t)+z*Cos(t)))/(1+z^2-2*z*Cos(f)) | ||
/; FreeQ({f,t},n)&&FreeQ({f,t},z), | ||
ZTransform(Cosh(f_.*n_+t_.),n_?NotListQ,z_?NotListQ):=(z*(-Cosh(f-t) + z*Cosh(t)))/(1 + z^2 - 2*z*Cosh(f)) | ||
/; FreeQ({f,t},n)&&FreeQ({f,t},z), | ||
|
||
ZTransform(Sin(f_.*n_+t_.),n_?NotListQ,z_?NotListQ):=(z*(Sin(f-t)+z*Sin(t)))/(1 +z^2-2*z*Cos(f)) | ||
/; FreeQ({f,t},n)&&FreeQ({f,t},z), | ||
ZTransform(Sinh(f_.*n_+t_.),n_?NotListQ,z_?NotListQ):=(z*(Sinh(f-t)+ z*Sinh(t)))/(1+z^2-2*z*Cosh(f)) | ||
/; FreeQ({f,t},n)&&FreeQ({f,t},z) | ||
|
||
} |