The following Mathematica code will solve the simultaneous equations: 5x + y = 4 x + 2y = 5 Solve[{5 x + 1 y == 4, 1 x + 2 y == 5}, {x, y}]