# Solving a system of equations in Maple

I have a set of equations which I would like to symbolically solve for a defined set of variables using the solve command in Maple. However, being not familiar with the program, it does not give me exactly what I would like. Maybe someone can give me a hing. Here's a simple example to illustrate my issue:

Given the system of equations \begin{align} x+b &=2\cdot y + y - a\\ y-a &= b, \end{align} using the solve(...,{x,y}) command in Maple gives me the result \begin{align} y &=a+b\\ x &= 2\cdot b + 2\cdot a. \end{align} What would be sufficient for me is to have one of the variables to be solved for as a function of the second one, i. e. \begin{align} y &=a+b\\ x &= 2\cdot y. \end{align} How can I do this?

-
I would have expected the second set of results; more or less, what you've told Maple is "solve for $x$ and $y$", and all Maple did was to express $x$ and $y$ in terms of all the other variables you did not indicate in solve()'s second argument... – J. M. Oct 11 '11 at 12:12
Thanks for you comment J.M. I agree with you that one would expect the second set of result posted above. But what can I do in maple to get a representaton of the results as listed at the very end of the posted question? – phj Oct 11 '11 at 13:24

## 1 Answer

If you're looking for a solution where the value of $x$ doesn't involve $a$, you can solve for $a$ and $x$ in terms of $b$ and $y$:

solve(..., [a,x]);

$$[[a = y-b, x = 2 y]]$$

and then rewrite the first equation to give $y$ in terms of $a$ and $b$:

isolate(%[1][1],y);

-