1
$\begingroup$

While working on a problem, I came upon a system of four equations. Namely, $$\begin{align*} & 4+b=d\\ & 4c=4d+36+i\\ & 2c=d+2i+6\\ & 2c=2d+2b+3\end{align*}\tag1$$ And I'm wondering if there are other conventional methods for solving system of $4$ equations without the use of Mathematica, or matrices since I won't be able to have a calculator on the test.


The method that I proposed was to rearrange all the variables to the LHS to get$$\begin{align*} & b-d=-4\\ & 2c-d-2i=6\\ & -2b+2c-2d=3\\ & 4c-4d-i=36\end{align*}\tag{2}$$ And multiply the first three equations by $A,B,C$ respectively and add them together. Thus, getting$$(A-2C)b+(2B+2C+4)c+(-A-B-4)d+(-2B-1)i=-4A+6B+3C+36\tag{3}$$ And to solve for $b$, set the other coefficients equal to zero to find $A,B,C$ and thus, $b$ is found by$$b=\frac{-4A+6B+3C+36}{A-2C}\tag{4}$$


The only problem with that method is how lengthy it gets. You can't reuse $A,B,C$; the values change for each variable you want to find. So my actual questions...

Questions:

  1. How would you solve this system of $4$ equations?
  2. Can this method be generalized to any system of $4$ equations?
  3. Is there an underlying method to solve an $n$ system of equations? (Miscellaneous question; you don't have to answer that!)
$\endgroup$
  • 1
    $\begingroup$ Did you try Gaussian Elimination for the $4 \times 4$ matrix? You can view this as row-reduction. Otherwise, you are stuck with substitution. $\endgroup$ – Moo Dec 8 '16 at 21:51
  • $\begingroup$ @Moo He doesn't want to use matrices. $\endgroup$ – user160738 Dec 8 '16 at 21:52
  • $\begingroup$ @Moo Sorry, but I haven't learned anything "Gaussian". Implying I haven't learned Gaussian Elimination. And I also don't have access to a calculator, nor matrices. The reason why I don't want to use matrices is because I haven't learned how to calculate the inverse of an $n\times n$ matrix yet, and I don't know how to determine the Determinant of an $n$ by $n$ matrix. Sorry! $\endgroup$ – Frank Dec 8 '16 at 21:53
  • $\begingroup$ Row reduction by hand is probably the most efficient way to solve this without a calculator and without making mistakes. $\endgroup$ – kccu Dec 8 '16 at 21:55
  • $\begingroup$ You can use an equation containing $d$ , solve it for $d$ and plug in this expression into the other equations. So, you get $3$ equations containing $a,b,c$. Same procedure with $c$ and finally with $b$. This method is not very efficient, but can be easily done and can be easily generalized $\endgroup$ – Peter Dec 8 '16 at 22:16
1
$\begingroup$

$$\left[\begin{array}{rrrr|r}1&0&-1&0&-4\\ 0&2&-1&-2&6\\ -2&2&-2&0&3\\ 0&4&-4&-1&36 \end{array}\right]$$ This is how you would represent the system of equations to do Gaussian Elimination. Each row represents an equation, and each column represents a coefficient of a variable except the last column, which is a constant in this form: $[b\ c\ d\ i|k]$ ($k$ is just a constant). The first line is then equivalent to $b-d=-4$.

Once you get it in that form, you want to get it in this form:

$$\left[\begin{array}{rrrr|r} 1&0&0&0&k_1\\ 0&1&0&0&k_2\\ 0&0&1&0&k_3\\ 0&0&0&1&k_4 \end{array}\right]$$ which you an then convert back to $$\begin{align} b&=k_1\\ c&=k_2\\ d&=k_3\\ i&=k_4 \end{align}$$ To et it into this form, you can use three row operations:

  1. Multiplying the row by a constant.
  2. Swapping rows
  3. Adding multiples of one row to another.

Note: You cannot do any of these operations to any of these columns.

Generally, you only swap rows to get a row that already has a one in the right column. In this example, if you had The first two rows swapped, you could swap them back. From there, if you don’t have a one in the correct column, you multiply that row by the reciprocal of the number. From there, you add multiples of one row to another until you only have a one in he column. You move to the next column and repeat this proceedure until you get it into the diagonal with ones form I brought up earlier.

This method can be generalized to any number of equations of any number of variables.

$\endgroup$
1
$\begingroup$

This is a method I used as a student for linear and non linear equations.

It can run into problems with linearly dependent equations and non linear equations where a variable cannot be isolated but it's still useful.

Write the equations in the format: EquationNumber(ListOfVariables)

List the variables alphabetically

Your equations from $(2)$ become

$$1(b,d)$$ $$2(c,d,i)$$ $$3(b,c,d)$$ $$4(c,d,i)$$

You want to perform substitutions by combining equations to create new equations and isolate each variable.

I try to get rid of the alphabetically last variable first i.e. $i$ then $d$ then $c$.

Combine equations $2$ and $4$ to get rid of $i$

$$2,4 \to 5(c,d)$$

To get rid of $d$ combine equations $1$ and $3$ , $1$ and $5$

$$1,3 \to 6(b,c)$$

$$1,5 \to 7(b,c)$$

To get rid of $c$ combine equations $6$ and $7$

$$6,7 \to 8(b) $$

So $b$ is isolated, substitute it back up the chain to solve for $c$ then $d$ then $i$.


The actual calculations:

$$2,4 \to 5(6c - 7d = 66)$$

$$1,3 \to 6(4b - 2c = -11)$$

$$1,5 \to 7(7b - 6c = -94)$$

$$6,7 \to 8(5b = 61) $$


from equation $8$ $$b = \frac{61}{5}$$ Substitute $b$ into equation $7$ , $$c = \frac{299}{10}$$

Substitute $c$ into equation $5$ , $$d = \frac{81}{5}$$

Substitute $c$ and $d$ into equation $2$ , $(2c-d-2i=6)$, $$i = \frac{94}{5}$$


sanity check with Maxima

solve([4+b-d,-4*c+4*d+36+i,d + 2*i + 6 - 2*c,2*d + 2*b +3 -2*c],[b,c,d,i]);

$$\left[ b={{61}\over{5}} , c={{299}\over{10}} , d={{81}\over{ 5}} , i={{94}\over{5}} \right] $$

$\endgroup$
  • $\begingroup$ How did you get $2,4\Rightarrow 5(c,d)$ and $1,3\Rightarrow 6(b,c)$? Sorry if this may be obvious. This method is completely new to me... $\endgroup$ – Frank Dec 9 '16 at 0:17
  • $\begingroup$ Frank - To get rid of $i$ use $2 . equation4 - equation2$ and to get rid of $d$ use $2. equation1 - equation3$, match the coefficients of the variable you want to remove. $\endgroup$ – arthur Dec 9 '16 at 0:22
  • $\begingroup$ Frank - for a non linear example of this method see math.stackexchange.com/questions/1883217/… $\endgroup$ – arthur Dec 9 '16 at 3:10
1
$\begingroup$

As long as the equations are linear, you can use substitution. Here the first one lets you eliminate $d$ immediately. The second then becomes $4c=16+4b+36+i=50+4b+i$. Do the same for the other two and you are down to three equations in three unknowns. You can divide either of the last two by $2$ and get a value for $c$ to plug into the others and you are down to two variables. Unless the set is arranged to have some magic cancellation there is a fair amount of work to do.

$\endgroup$
1
$\begingroup$

Since you're uncomfortable with matrices, I'll show you how to do a row reduction while writing everything in the format of ordinary linear equations.

First, rearrange your equations one above the other, putting the constant on the right of each equation and all the variables in the same order of the left side of each equation, and putting spaces between terms in order to make all occurrences of a given variable be in the same "column": \begin{array}{rrrrl} b&&\phantom{+2c}&-&d&&&= -4\\ &&2c&-&d&-&2i&= 6\\ -2b&+&2c&-&2d&&&= 3\\ &&4c&-&4d&-&i&= 36 \end{array}

The idea is to derive a set of equations that is "upper triangular," meaning that there are no terms under any of the terms on the "main diagonal" of the equations. The "main" diagonal consists of the term from the first column in the first equation, the second column from the second equation, and so forth; in the system as written above, it contains the terms $b,$ $2c,$ $-2d,$ and $i.$

Sometimes you have to reorder the equations a bit during this process. You won't be able to eliminate the terms in the first column unless the first equation has a non-zero term there, for example. So if $2c-d-2k=6$ had been the first equation we would either swap it with one of the equations that has a $b$ term, or we would change the order of variables so $b$ was not first.

In your system there is only one equation after the first with a non-zero $b$ term, so we eliminate that first. We take twice the value on each side of the first equation, and add it to each side of the second equation. On the left we get $$ -2b+2c-2d + 2(b-d) = 2c - 4d. $$ On the right we have $3 + 2(-4) = -5$. We then replace $-2b+2c-2d=3$ with the new equation we have just derived, $2c - 4d = -5$: \begin{array}{rrrrl} b&&\phantom{+2c}&-&d&&&= -4\\ &&2c&-&d&-&2i&= 6\\ &&2c&-&4d&&&= -5\\ &&4c&-&4d&-&i&= 36 \end{array} Next we need to eliminate $c$ from the last two equations. We subtract the value of each side of the second equation from each side of the third equation, and subtract $2$ times the value of each side of the second equation from each side of the fourth equation. The result is \begin{array}{rrrrl} b&&\phantom{+2c}&-&d&&&= -4\\ &&2c&-&d&-&2i&= 6\\ &&&-&3d&+&2i&= -11\\ &&&-&2d&+&3i&= 24 \end{array} Then eliminate $d$ from the last equation. You can subtract $\frac23$ of the third equation, or multiply both sides of the last equation by $3$ and then subtract $2$ times the third equation.

The result will be that the last equation lets you solve for the variable $i.$ You then take that solution and plug it into the third equation; the result is an equation whose only variable is $d,$ which you then solve. Then, knowing the values of $d$ and $i,$ you plug them into the second equation, solve for $c,$ then plug the variables you now know into the first equation and solve for $b.$ Done.

You can do the same operations as row operations on a matrix as shown in the answer explaining Gaussian row reduction. It's just a different formalism that many people find easier to work with.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.