# Three linear equations in four integer variables

Hi I have these equations that I wish to know how to reach the variables

for example

A=6 D=A-C B=2C

All I have is the value of A, and A changes from time to time so its not always 6 it can be 8, 20 or anything else.

How can I get the values of each B, C, and D?

Note that, all numbers have to be integer, no floats.

-
Your system of equations is underdetermined. Even if restricting to integers, there can be more than one solution. $(A,B,C,D)=(6,12,6,0)$ is a solution, but so is $(A,B,C,D)=(6,8,4,2)$. You have to provide us a bit more background. Especially about the time dependency, which probably contains extra information. –  Raskolnikov Jan 11 '11 at 15:58

To put it simply, you can't. You have 3 linear equations for 4 variables, so you have an underdetermined linear system which admits infinitely many solutions. To use your example, $D$ and $B$ depend entirely on $A$ and $C$. $A$ is fixed, but $C$ is not. Arbitrary choice of $C$ gets you a different set of solutions in the integers. You need more information if you want a single solution.
You essentially have two equations in three unknowns: \begin{align*} C + D &= A\\ B - 2C &= 0. \end{align*} Given a value of $A$, if you pick any value for $D$, then this will give you a value for $C$, which in turn will give you a value for $B$. Or you can pick any value for $C$, then solve for $D$ and $B$. (You can also pick a value for $B$, so long as it is even, and get a value for $C$ and $D$).
Even if you require all values to be positive integers, there is still no unique solution: $D$ gets restricted to only the values $1$, $2,\ldots,A-1$, but each of those values will give you a valid solution with $C$ and $B$ positive integers; so the only case where you would have a unique solution in positive integers is if $A=2$ (in which case, $B=2$ and $C=D=1$).