# Revision history [back]

• If you use the f(x,y) syntax, you don't have to declare the variables ahead of time.
• Using results is not too bad, because you can ask for them as a dictionary. There are other examples in the doc, I think, but for example:

sage: B = (x^2-1).solve(x)

sage: G = x^3+3*x

sage: [G.subs(b) for b in B]

[-4, 4]

sage: B = (x^2-1).solve(x,solution_dict=True)

sage: [G.subs(b) for b in B]

[-4, 4]

• The actual first question is hard to find, and maybe should be part of our full simplification...:

sage: f(x,y)=sin(x)cos(y)+sin(y)cos(x)

sage: f.trig_reduce()

(x, y) |--> sin(x + y)

Note to Evgeny: I cannot get code formatted text after a bullet point. What gives? I asked this on the askbot website too.