In [2]:
from sympy import *
# The area of a rectangle is 24 square cm.
# The width is two less than the length.
# What is the length and width of the rectangle?
var('x y')
solve((x * y - 24,x - y - 2),(x,y))
Out[2]:
[(-4, -6), (6, 4)]