# how do I find the unknown coefficients of coupled equations

How do I find the unknown constants $x, y, z$ interms of a and b, using Mathematica.

\begin{equation} \begin{split} 1&=-x+y+z \\ 0&=y\frac{-4a}{b-\sqrt{b^2+8a^2}}+z\frac{-4a}{b+\sqrt{b^2+8a^2}}\\ 0&=x+y+z \end{split} \end{equation}

1 = -x+y+z
0 = y(-4 a/(b-Sqrt[b^2 + 8 a^2])) + z(-4 a/(b + Sqrt[b^2+8 a^2]))
0 = x+y+z


where $a,b$ are real constants

• see Reduce and Solve in the docs. – kglr Apr 19 '16 at 10:12

You can use LinearSolve. The matrix:

mat = {{-1, 1, 1},
{0, -4 a/(b - Sqrt[b^2 + 8 a^2]), -4 a/(b + Sqrt[b^2 + 8 a^2])},
{1, 1, 1}
};


The vector:

v = {1, 0, 0};


Solving:

LinearSolve[mat, v]


yields:

{-(1/2), (-b + Sqrt[8 a^2 + b^2])/(4 Sqrt[8 a^2 + b^2]), (
b + Sqrt[8 a^2 + b^2])/(4 Sqrt[8 a^2 + b^2])}


You could use Solve for the system of equations (note == instead of =).

Doesn't change much in this particular instance, but you can use Refine to incorporate assumptions on the parameters in your equations. Keep in mind that expressions in inequality assumptions are assumed to be real.

eqns = Refine[{1 == -x + y + z,
0 == y (-4 a/(b - Sqrt[b^2 + 8 a^2])) + z (-4 a/(b + Sqrt[b^2 + 8 a^2])),
0 == x + y + z},
Assumptions -> Element[x, Reals] && Element[y, Reals]]
(* {1 == -x + y + z,
0 == -((4 a y)/(b - Sqrt[8 a^2 + b^2])) - (4 a z)/(b + Sqrt[8 a^2 + b^2]),
0 == x + y + z} *)

Solve[eqns, {x, y, z}]
(* {{x -> -(1/2),
y -> -((b - Sqrt[8 a^2 + b^2])/(4 Sqrt[8 a^2 + b^2])),
z -> -((-b - Sqrt[8 a^2 + b^2])/(4 Sqrt[8 a^2 + b^2]))}} *)

Reduce[eqns, {x, y, z}]
(* 8 a^2 + b^2 != 0 && a != 0 && x == -(1/2) &&
y == (8 a^2 + b^2 - b Sqrt[8 a^2 + b^2])/(4 (8 a^2 + b^2)) &&
z == (8 a^2 + b^2 + b Sqrt[8 a^2 + b^2])/(4 (8 a^2 + b^2)) *)