class Main { public static void main(String[] args) { Variable v = new Variable("x"); Expr t = new Product(v, v); Expr d = t.diff("x"); // Expr s = d.reduce(); System.out.println(t + "/dx = " + d); } }