Solving dependent simultaneous equations without recursion

147 Views Asked by At

I have four equations in four unknowns (r1, r2, r3, r4) with four constants c1 through c4 where c1 + c2 + c3 + c4 = 0:

r1 = c1 + (r2 + r3 + r4) / 3

r2 = c2 + (r1 + r3 + r4) / 3

r3 = c4 + (r1 + r2 + r4) / 3

r4 = c4 + (r1 + r2 + r3) / 3

I want to determine the "eventual" r-values given initial values of 0 for all four of them without having to do the recursion. However, if I rewrite the equations as:

3 r1 - r2 - r3 - r4 = 3 c1

-r1 + 3 r2 - r3 - r4 = 3 c2

-r1 - r2 + 3 r3 - r4 = 3 c3

-r1 - r2 - r3 + 3 r4 = 3 c4

then, when I add the first three together and multiply by -1, the result is the fourth equation, so they are not independent. I can get rn = r4 + 3/4 (cn - c4) for n in {1, 2, 3}.

Is there a way to determine the "recursive value" for r4 (which is 3/4 c4) directly from the equations?

1

There are 1 best solutions below

0
On

Adding the $4$ equations sees all the $r_k$ terms cancel out, and reduces to $c_1+c_2+c_3+c_4=0$ so the system is underdetermined, as you noted already.

To solve the equations for $r_1,r_2,r_3$ with $r_4$ as a parameter, rewrite as:

$$ \begin{cases} 3 r_1 - r_2 - r_3 = 3 c_1 + r_4 \\ 3 r_2 - r_3 - r_1 = 3 c_2 + r_4 \\ 3 r_3 - r_1 - r_2 = 3 c_3 + r_4 \end{cases} $$

Adding the $3$ equations results in:

$$ r_1+r_2+r_3 = 3(c_1+c_2+c_3 + r_4) = 3(r_4 - c_4)$$

Adding the latter to each of the original equations gives:

$$r_k = r_4 + \frac{3}{4} (c_k -c_4) \;\;\text{for}\,\,k=1,2,3$$

The above is the complete set of solutions parameterized in $r_4$.

I want to determine the "eventual" r-values given initial values of 0 for all four of them without having to do the recursion. [...] Is there a way to determine the "recursive value" for r4 (which is 3/4 c4) directly from the equations?

Sorry, but this part of the question is unclear to me, and it's hard to guess what recursion this may be about.

However, in case it matters, one thing that can be derived from the solution given above is that $r_4=\frac{3}{4}c_4$ is the only value of $r_4$ such that the solution set satisfies $r_1+r_2+r_3+r_4=0$.