# All tests should return true.

from jhplot.math import * 
from jhplot import *
from java.awt import Color

j=Symbolic("jscl") # using jscl engine

print j.simplify("log(6)") == "log(2)+log(3)"
print j.simplify("(x + 1)^(1/x)") == "(1+x)^(1/x)"
print j.simplify("(x^2-1)/(x-1)") == "1+x"
print j.simplify(j.elementary("atan(tan(x))")) == "(sqrt(-1)*log(1/exp(sqrt(-1)*x)^2))/2"
print j.simplify(j.elementary("cos(x)")) == "(1+exp(sqrt(-1)*x)^2)/(2*exp(sqrt(-1)*x))"
print j.simplify(j.elementary("tanh(x)")) == "-(1-exp(x)^2)/(1+exp(x)^2)"
