[Math] Solving a system of equations in Maple

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?

Best 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);

Related Question