Using SymJa for polynomial evaluations
Source code name: "symbolic_sym2.py"
Programming language: Python
Topic: Symbolic/Jasymca
DMelt Version 1.4. Last modified: 02/22/2017. License: Free
https://datamelt.org/code/cache/symbolic_sym2_7105.py
To run this script using the DataMelt IDE, copy the above URL link to the menu [File]→[Read script from URL] of the DMelt IDE.


from jhplot.math   import *

s=Symbolic("symja")
util=s.getEngine()

s="FactorInteger[2^15-5]" #  Factor an integer number 
print util.evaluate(s)

s="D[Sin[x^3],x]"
print util.evaluate(s)    # Derivative of a function

s="Factor[-1+x^16]"
print util.evaluate(s)    # Factor a polynomial

s="Factor[5+x^12,Modulus->7]"
print util.evaluate(s)    # Factor a polynomial modulo an integer


s="Expand[(-1+x)*(1+x)*(1+x^2)*(1+x^4)*(1+x^8)]"
print util.evaluate(s)    # Expand a polynomial

s="Inverse[{{1,2},{3,4}}]"
print util.evaluate(s)    # Inverse of a matrix

s="Det[{{1,2},{3,4}}]"
print util.evaluate(s)    # Determinant of a matrix