DMelt:Symbolic/4 Symja

From jWork.ORG
Jump to: navigation, search
Limitted access. Reguest membership or login to this link first if you are already a member
Contents

Using the SymJa engine

SymJa is a Java computer algebra system which is discussed in more detail in SymJa web page. You should use the interface jhplot.math.Symbolic to initialize this engine. Then you can use in in Python, Groovy, JRuby scripts or within the Java programs. Here is a simple examples how to use it:


from jhplot.math   import *

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

result = util.evaluate("Expand[(AX^2+BX)^2]")
print result

result = util.evaluate("A=2;B=4")
print result

result = util.evaluate("Expand[(A*X^2+B*X)^2]")
print result

result = util.evaluate("Factor[-1+x^16]")
print result

The syntax of the program is described on the SymJa web site. Here are more examples showing how to expand a polynomial, calculate derivatives and work with matrices:

More information on this topic is in DMelt books