INTERNATIONAL JOURNAL OF RESEARCH IN COMPUTER APPLICATIONS AND ROBOTICS Vol.2 Issue.7, Pg.: 46-57 www.ijrcar.com July 2014

INTERNATIONAL JOURNAL OF RESEARCH IN COMPUTER APPLICATIONS AND ROBOTICS ISSN 2320-7345

AUTO-DEMONSTRATION OF SOLVING THE SYSTEMS OF LINEAR EQUATIONS IN TWO OR THREE UNKNOWNS BASED ON WXMAXIMA

Ching-Sung Kuo

Associate Professor, Department of Construction Engineering, Nan Jeon University of Science and Technology, Taiwan, [email protected]

Abstract

Solving systems of linear equations in two or three variables appeared generally at basic level of mathematics, by adding or subtracting some multiples of one equation from others to delete one or two variables to get an equation of only one variable, and then solved for the left variable, the other variables would be obtained after back substitutions. However, increasing with the number of variables, the process of deletion of variables would be chaos or tedious. This study stressed on the idea of deleting variables in the order no matter what the number of variables or equations is, and there would be finally three cases which are inconsistent, dependent, and independent systems of linear equations which mean that there would be no solution, only one solution, and infinitely many solutions, respectively. The research plans to present an automatic way about the statement of system of linear equation, how to solve for it, and the process of steps used to reduce the number of variables, and hopes to make a new creation on teaching mathematics and to provide some students a tool for self-learning after the class. So the procedures or steps used in the traditional mathematics teaching will now be presented on the automatic demonstration, and such a process likes the class instructed by a mathematics teacher, and then students also could take a self-practice on the topics shown by the automatic demonstration if they enter related parameters needed by the demonstration code.

Keywords: System of linear equations, Symbolic algebraic system, Automatic demonstration, Free software wxMaxima.

1. A brief introduction to wxMaxima

WxMaxima is a document based interface for the system , formerly known as system, which was developed at the Massachusetts Institute of Technology, MIT commissioned by the U.S. Department of Energy DOE in the 1960s. Professor Bill Schelter[1] and many programmers or contributors devoted themselves to spreading the use of the free software wxMxima, it deserves to be mentioned in this article to memorize their great efforts and dedication for the people on the world who are fortunately to share the sweet fruits. Professor Schelter was the midwife of this software wxMaxima. He received his Ph.D. degree at McGill University, Canada in 1972, and afterward taught at the Department of Mathematics, University of Texas, US. He was an excellent programmer on artificial intelligence language LISP. In addition he had also a lot of special devotion to the implementation of GNU . As Professor Schelter strove and struggled for years, the US Department of Energy approved finally to release an open source program for subsequent users to use it in 1998. Because of limit of article lengths, the related information about how to install wxMaxima or to make detailed use of wxMaxima, the interesting readers could refer to homepages of Tsai [2], Wang [3], Hung [4], Chen [5], Shann [6] and others. Besides, wxMaxima official website [7], Hand [8] or writings of Kuo and Chen [9-29] also provide some useful material about wxMaxima.

C h i n g - S u n g K u o Page 46

INTERNATIONAL JOURNAL OF RESEARCH IN COMPUTER APPLICATIONS AND ROBOTICS Vol.2 Issue.7, Pg.: 46-57 www.ijrcar.com July 2014

2. Theory of solving the systems of linear equations

A general system of m linear equations with n unknowns can be written as follows,

{

where the variables , , … , are the unknowns, , , … , are the coefficients of the system, and , , … , are the constant terms. If the numbers of variables and equations are both reduced to 2, there would be a simpler form like the following

y c { , or a common type of { d e y f

where a, b, d, e are the coefficients of the system, c and f are the constant terms, and x and y are the usual variables. In the system of linear equations in three unknowns, there is of the form

3 3 y c z r { 3 3 or { d e y f z s 3 3 33 3 3 g h y i z t

where a, b, c, d, e, f, g, h, i are the coefficients of the system, r, s, t are the constant terms, and x, y, z are the common variables. To explain simply the theory for solving systems of linear equations, the examples given most about systems of linear equations in two, or three unknowns. And for the complicated cases of more equations or unknowns, the deduction or demonstration steps would be similar as cases of systems with 2 linear equations and 2 unknowns, or 3 linear equations and 3 unknowns.

2.1 An independent or dependent equation

For example, the systems of linear equations

− 2 y 3 z 4 . . . … (1) 2 3 y 4 … (1) { and {2 y 5 z 7 … … … (2) 4 6 y 8 … (2) −3 6 y − 9 z −12 … (3)

have dependent equations in them. Because in first system, the two equations are obviously dependent from the fact that the second equation 4 x + 6 y = 8 is two times of the first equation 2 x + 3 y = 4. Although these two equations are distinct in the exterior forms, the second equation doesn’t offer any new information about the variables. The similar inference also applies to the second system of the example for its third equation is -3 times of first equation, certainly, this situation provides no additional condition in seeking the answers of variables x, y and z. Such concept can be concluded that systems with any variables, if dependent equations existed, actually, they can only be treated as an effective one to solve the system. Deducting the dependent equations from the system, the remaining equations are efficacious ones in the solution process adopted, and they can also be called as independent equations in the system.

2.2 An inconsistent or consistent system

Systems of linear equations with the following characteristic would be called as inconsistent if some equation is added to or subtracted from others, and then an absolute contradiction expression like 0 = a (nonzero constant) appears. In such situation there would be no solution to the system, and it is easy to acknowledge that no new solutions will be obtained by finite linear combination of original equations, if the case 0 = a (nonzero constant) really happens, the only affair to be thought over is that the contradiction actually exists in the system, and not any solutions could be solved for. For instance, the following two systems would show the inconsistent cases, 3 y − 2 z 1 … (1) 2 y 1 … (1) { and {2 y 4 z 3 … (2) 3 6 y 2 … (2) 3 4 y 2 z 6 … (3)

C h i n g - S u n g K u o Page 47

INTERNATIONAL JOURNAL OF RESEARCH IN COMPUTER APPLICATIONS AND ROBOTICS Vol.2 Issue.7, Pg.: 46-57 www.ijrcar.com July 2014

for the first system, if triple of the first equation is subtracted from the second one, there would be 0 = -1. Of course, it is not a valid expression. And the first system is an inconsistent one, while in the second system, if the sum of the first and the second equations is subtracted from the third one, the incorrect expression 0 = 2 occurs, and this means that the second system is also an inconsistent one. Furthermore, how to ascertain whether the system is consistent or not? It seems to be tedious to state that if the Gaussian elimination processes are employed, the contradiction expression 0 = a (nonzero constant) would emerge from the steps used to reduce the number of variables. Certainly, there may be another case of the form 0 = 0, which means that the solved system has dependent equations, or the variable is solved to get some value.

2.3 Solution types of systems of linear equations

It is important that what kind of solution types the system of linear equations belongs to, and this can be judged by the numbers of independent equations and variables, m and n, respectively. (a) If m is less than n, there would be (n-m) free variables needed to express the solution type, and the system has infinitely many solutions. (b) If m is equal to n, there would be a unique solution for the system. (c) Is there any possibility for m be greater than n? The answer is absolutely no, because its independent dimension m must be less than or equal to the number of variables, n. So for the system with m equations in n unknowns, and m is greater than n, it would be simplified to the same number of independent equations as variables, i.e., case (b) (one solution), contradiction case (no solution), or case (a)(infinitely many solutions). For example, the systems of linear equations with above three cases are given separately,

Cases of (a) 2 3 y 4 2 3 y 4 (a1)System { can be simplified into{ , and its solution need to use one free 4 6 y 8 0 0 2 3 y 4 variable to express the solution type, for instance,{ has solution y = t (y is set as free variable, and 0 0

(4 − 3 t) t can be any real number) and x = (4 –3 y) = (4 –3 t), i.e., solution of system(a1) is { . y t Alternatively, the solution also can be written as x = t (x is chosen as free variable and t is any real number) and t y= ( 4 – 2 x )= ( 4 – 2 t ), i.e., solution is of the form { , hence, if the system has infinitely 3 3 y (4 − 2t) 3 many solutions, the solution types are not unique as above shown. − 2 y 3 z 4 − 2 y 3 z 4 (a2)System{ 2 y 5 z 7 can be simplified into{ 5 y − z −1 by Gaussian elimination −3 6 y − 9 z −12 0 0 steps, similar as the above statements, the solution can choose x, y, or z as a free variable, and the subsequent

( 18 − 13 z ) ( 18 − 13 t ) 5 5

solution types are not unique and as follows, { y (z − 1) ( t − 1) , 5 5 z t t ( 1 − 13 y ) ( 1 − 13 t ) y ( 1 − ) ( 1 − t ) { y t , or { 3 3 .

z 5 y 1 5 t 1 z ( 18 − 5 ) ( 18 − 5 t ) 3 3

Cases of (b) 2 3 y 4 2 3 y 4 (b1)System { can be simplified into { and further by back substitution, the 2 y 3 y 2 −1 unique solution { obtained. y 2 − y z 2 − y z 2 − y z 2 (b2)System { 2 y z 3 can be simplified into{ 3 y − z −1 , and further{ 3 y − z −1 , 3 y 2 z 2 4 y − z −4 z −8 7 by back substitution, the unique solution { y −3 obtained. z −8 Cases of (c)

C h i n g - S u n g K u o Page 48

INTERNATIONAL JOURNAL OF RESEARCH IN COMPUTER APPLICATIONS AND ROBOTICS Vol.2 Issue.7, Pg.: 46-57 www.ijrcar.com July 2014

− 2 y −1 − 2 y −1 (c1)System { 3 5 y 8 can be simplified into { 3 5 y 8 , so the resulting system has 2 4 3 y 7 0 0 independent equations and 2 variables, it belongs to the case (b), so the subsequent solution processes are omitted without redundancy. 2 y 1 2 y 1 (c2)System { 2 − 3 y 2 can be simplified into { 2 − 3 y 2 , so the resulting system has the 3 − y 5 0 2 contradiction expression 0 = 2, and it doesn’t have any solution. − 2 y 3 z 5 − 2 y 3 z 5 − 2 y 3 z 5 3 5 y − 4 z 2 11 y − 13 z −13 11 y − 13 z −13 (c3)System { can be simplified into{ and { 4 3 y − z 7 11 y − 13 z −13 0 0 2 5 y 2 z 9 9 y − 4 z −1 9 y − 4 z −1 so the resulting system has 3 independent equations and 3 variables, it belongs to the case (b) with one solution (processes omitted). 2 y − z 2 2 y − z 2 2 y − z 2 5 5 y z 0 5 5 3 y 2 z 1 y z 0 (c4)System { can be simplified into and so 4 − 2 y 3 z 2 −4 y 5 z −2 9 z −2 5 5 3 4 y z 8 y z 5 { 0 5 { the resulting system has a contradiction expression 0 = 5, it doesn’t have any solution.

3. Automatic demonstration of solving the systems of linear equations on wxMaxima

The following figures 1 to 9 are the process used on wxMaxima to illustrate the solution steps in solving various systems of linear equations. For simplicity, the above examples will be taken as automatic demonstration ones to validate the program to be useful for mathematics learners. Fig.1 states that a general outline about systems of linear equations, Figs.2 and 3 are about systems (a1) and (a2); Figs.4 and 5 are about systems (b1) and (b2); Figs.6 to 9 are about systems (c1) to (c4), respectively. For simplicity, we omit the repetitive statements to decrease the content of this auto-demonstration.

C h i n g - S u n g K u o Page 49

INTERNATIONAL JOURNAL OF RESEARCH IN COMPUTER APPLICATIONS AND ROBOTICS Vol.2 Issue.7, Pg.: 46-57 www.ijrcar.com July 2014

Figure 1 Auto-Demonstration for solving the system of linear equations on wxMaxima

Figure 2 Auto-Demonstration of system (a1)

C h i n g - S u n g K u o Page 50

INTERNATIONAL JOURNAL OF RESEARCH IN COMPUTER APPLICATIONS AND ROBOTICS Vol.2 Issue.7, Pg.: 46-57 www.ijrcar.com July 2014

Figure 3 Auto-Demonstration of system (a2)

C h i n g - S u n g K u o Page 51

INTERNATIONAL JOURNAL OF RESEARCH IN COMPUTER APPLICATIONS AND ROBOTICS Vol.2 Issue.7, Pg.: 46-57 www.ijrcar.com July 2014

Figure 4 Auto-Demonstration of system (b1)

C h i n g - S u n g K u o Page 52

INTERNATIONAL JOURNAL OF RESEARCH IN COMPUTER APPLICATIONS AND ROBOTICS Vol.2 Issue.7, Pg.: 46-57 www.ijrcar.com July 2014

Figure 5 Auto-Demonstration of system (b2)

Figure 6 Auto-Demonstration of system (c1)

C h i n g - S u n g K u o Page 53

INTERNATIONAL JOURNAL OF RESEARCH IN COMPUTER APPLICATIONS AND ROBOTICS Vol.2 Issue.7, Pg.: 46-57 www.ijrcar.com July 2014

Figure 7 Auto-Demonstration of system (c2)

Figure 8 Auto-Demonstration of system (c3)

C h i n g - S u n g K u o Page 54

INTERNATIONAL JOURNAL OF RESEARCH IN COMPUTER APPLICATIONS AND ROBOTICS Vol.2 Issue.7, Pg.: 46-57 www.ijrcar.com July 2014

Figure 9 Auto-Demonstration of system (c4)

4. Conclusions and Discussion

It is difficult for mathematics learners to understand well just by a few explanations in the classroom, and the demonstration program in wxMaxima would help them to practice again and again by setting new examples of solving the systems of m linear equations in n unknowns, although from point of view of simple demonstration and easy to valid for readers, the minor numbers of m and n like 2, 3, or 4 were adopted. Math learners can check the solving process by entering a real example of system of m equations and n variables, and contrast their results of computing with the demonstrated processes shown by the program. Consequently math learners could find out the differences between their calculating and auto demonstration which respond to their faults in learning. By practicing new examples many times in this way, math learners would realize the mistakes in their exercises, or weaknesses in computing. And finally they could correct their wrong concept and strengthen or improve the ability of calculation. The author believes that it would help learners to enhance their confidence on learning performance. This study stresses that the work of statement of theory, deduction of the content, or computing of real examples including tedious expressions could be processed on wxMaxima, and the core of learning must be put on the strengthening and establishment of conception, i.e., the most important matter is to realize well and clearly the theory. The author reiterates that both understanding and familiarity of theory are more important than just knowing to enter the corresponding parameters such as number of equations, m, or number of variables, n, and coefficients of the system, etc., only familiarity with the operation on wxMaxima and finally forgetting the important conception. It is absolutely not the original purposes of this study. The author also thinks that learners would be full of confidence to face future tedious contents of learning. Because there are disorder of the variables in equations like 2 x + 3 y + 5 z = 7 be shown as 5 z + 3 y + 2 x = 7, the processes of auto demonstration seems to appear some bugs or defects which show the unusual order of terms in the equation as shown in Figures 1 to 9, while it would not affect the result of the solving systems of equations. Maybe, the free software wxMaxima still needs to be modified or updated continuously, but it doesn’t affect its position providing invaluable tools in various fields of computing for people on the world. From a junior/senior high school to a college or a university, even the stage of an institute, there are different degrees of calculation difficulty in learning, more increasingly difficult contents in calculation would appear, for example,

C h i n g - S u n g K u o Page 55

INTERNATIONAL JOURNAL OF RESEARCH IN COMPUTER APPLICATIONS AND ROBOTICS Vol.2 Issue.7, Pg.: 46-57 www.ijrcar.com July 2014

the calculation of Fourier series or Fourier transform, they are higher levels of mathematical computing, if learners are unfamiliar with the calculation of differentials and integrals, it is impossible for them to learn well about the subsequent related mathematical computing. If they want to prevent learning obstacles or puzzle, they have to strengthen their mathematical skills in calculation to cope with computational problems from difficult concepts. Theoretically, any system of arbitrary m equations and n variables cab be solved by the Gaussian elimination process, and their solution types are in three cases:(a) infinitely many solution (b) only one solution and (c) no solution, each of these three cases, can all be solved by step by step procedure. For simplicity, the article cannot provide some complicated system to solve for demonstration, but only states that their similarities in solving procedure, no matter what the numbers of equations and variables are, and no matter which number is bigger, smaller, even the same, the solution to the solved system would be one of the above three cases, (a) infinitely many solution (number of independent equations be less than number of variables) (b) only one solution (number of independent equations be equal to number of variables) and (c) no solution (the contradiction expression 0 = a (nonzero constant) appeared). All the related computations in mathematics learning have their theoretical statements and origins. The detailed deduction with symbolic algebra is inevitable in the statement of theory. If math learners can skillfully use auto demonstration programs on wxMaxima, it would help them not to dread to calculate in courses, and finally recognize that good cognition and mastery of whole theory is the most important thing in learning. The ways of auto solving systems of linear equations on wxMaxima could assist unresponsive math learners in receiving solving processes after school from this demonstration program on wxMaxima.

References

[1] An introduction to Professor Bill Schelter in Wiki web. [Online]. Available: http://en.wikipedia.org/wiki /Bill_Schelter. [2] Yen-Lung Tsai, 2006, An application of Maxima to linear algebra. [Online]. Available: http://math.nccu. edu.tw/~yenlung/mynotes/ maximalinear.pdf. [3] Hui-Ching Wang, 2008, A brief introduction to computer algebraic system, Maxima. [Online]. Available: http://www.amath.nchu. edu.tw /teacher/hcwang/). [4] Hsin-An Hung, 2009, An evolution of free mathematical computing software, Maxima, [Online]. Available: http://lms.ctu.edu.tw/blog/ s0103). [5] Chun-Liang Chen, 2010. (Department of Information Engineering, Tajen university of Technology), [Online]. Available: (http://mail. tajen.edu.tw/~clchen/math.html.) [6] Wei-Chang Shann, 2012, Online mathematical matters for teaching, [Online]. Available: http:// libai.math.ncu.edu.tw/bcc16/B/ maxima/. [7] Maxima, A . [Online]. Available: http:// maxima.sourceforge.net/). [8] Richard H. Hand (2000,July), Introduction to MACSYMA, Department of Theoretical and Applied Mechanics, Cornell University. [9] Ching-Sung Kuo, 2009, “ An automated program demonstration of assisted learning and conception explanation of mathematical courses – based on the use of free mathematical software wxMaxima on internet. 2009 Nan-Jeon General Education Conference, 13 March, 2009. [10] Ching-Sung Kuo (2010), “An automated demonstration of computing process of partial fractions on wxMaxima. 2010 Nan-Jeon General Education Conference, pp. 270~285, 12 March, 2010. [11] Ching-Sung Kuo, 2010, “Functions of algebraic calculation of wxMaxima and its application to assisted learning in calculus course,” Journal of Nan-Jeon, Volume 13, pp.D7-1~14. [12] Ching-Sung Kuo, 2011, “Conception explanations and automated expression practices of integration by parts with wxMaxima,” 2011 Nan-Jeon General Education Conference, pp. 141~155, 3 June, 2011. [13] Ching-Sung Kuo, 2011, “ An application of wxMaxima to mathematical automatic computing - Demonstration of integration by parts,” International Conference on Safety & Security Management and Engineering Technology, ICSSMET 2011 (A7-060), Vol. 2, pp.398~405. [14] Ching-Sung Kuo and Chun-Ming Chen, 2012, “Automation of explanation and deduction in solving linear systems of equations with diagonalizable matrix methods,” 2012 Nan-Jeon General Education Conference, pp. 115 ~ 134, 11 May, 2012. [15] Ching-Sung Kuo and Chun-Ming Chen, 2012, “Automation of explanation and deduction in solving linear systems of equations with integral formula methods,” 2012 Nan-Jeon General Education Conference, pp. 135~156, 11 May, 2012. [16] Ching-Sung Kuo and Chun-Ming Chen, 2012, “Automation of solving linear systems of differential equations with wxMaxima,” Journal of Nan Jeon, Volume 15,B7-1~B7-12,June 2012. [17] Ching-Sung Kuo and Chun-Ming Chen, 2012, “ An automatic demonstration of wxMaxima on solving linear systems of equations with diagonalizable matrix methods,” International Conference on Safety &

C h i n g - S u n g K u o Page 56

INTERNATIONAL JOURNAL OF RESEARCH IN COMPUTER APPLICATIONS AND ROBOTICS Vol.2 Issue.7, Pg.: 46-57 www.ijrcar.com July 2014

Security Management and Engineering Technology, ICSSMET 2012 (A7-061), Vol.2 of 2, pp.307~313. [18] Ching-Sung Kuo and Chun-Ming Chen, 2012, “ An automatic demonstration of wxMaxima on solving linear systems of equations with integral formula methods,” International Conference on Safety & Security Management and Engineering Technology, ICSSMET 2012 (A7-062), Vol.2 of 2, pp. 485~492. [19] Ching-Sung Kuo and Chun-Ming Chen, 2012, “Automation of calculation process of Fourier series with wxMaxima,” 2012 National Ping-Tung University of Technology, 2012 General Education Academic Conference, pp. 15 ~ 30, 13 October, 2012. [20] Ching-Sung Kuo, 2013, “Automation of calculation of Fourier integrals and Fourier transforms,” 2013 Nan-Jeon Institute of Technology, International Intercultural Communication Conference, pp.257~268, 22 Feb, 2013. [21] Ching-Sung Kuo, 2013, “ Automatic applications of free software wxMaxima on mathematics teaching and after-school practice” in Conference Proceedings of 1st innovation and invention, science, remedial teaching Symposium pp.349-360,11 April, 2013. [22] Ching-Sung Kuo, 2013, “ WxMaxima-assisted automatic calculation of exponential forms of Fourier series and spectrums “, National Kaohsiung Normal University, 2013 9th Conference of Research and Development in Technology Education, pp.283-296, 27 April, 2013 [23] Ching-Sung Kuo, 2013, “ WxMaxima-assisted automatic plot demonstration of 2D and 3D vectors, “2013 Nan-Jeon General Education Conference, pp. 111-120, 17 May, 2013. [24] Ching-Sung Kuo, 2013, “ Automatic demonstration of Fourier series and spectrum drawing with wx- Maxima, “ 2013 The 7th Intelligent System Conference on Engineering Application, 30 May,2013. [25] Ching-Sung Kuo, 2013, “WxMaxima-assisted automatic teaching of plotting in scalar field and vector- field.“ 2013 I-Shou University, 2013 Information Technologies, Applications and Management Conference, 31 May,2013. [26] Ching-Sung Kuo and Chun-Ming Chen, 2013, “Automatic deduction of teaching of Fourier series complex exponential forms based on WxMaxima” Journal of Nan-Jeon, Volume 16, B6-1~B6-12, June 2013. [27] Ching-Sung Kuo, 2013, “Automation of Mathematics Teaching - Demonstration by a Method of Completing Square in Solving a Quadratic Equation”, Journal of Shu-Te University, Volume 15, pp.43- 57, July, 2013. [28] Ching-Sung Kuo, 2013, “WxMaxima-assisted automatic deduction of calculation of Fourier Integrals processes,” International Conference on Safety & Security Management and Engineering Technology, ICSSMET 2013 (A7-065), Vol.2 of 2, pp.425~429. [29] Ching-Sung Kuo, 2013, “WxMaxima-assisted automatic demonstration of calculation of Fourier Transform processes,” International Conference on Safety & Security Management and Engineering Technology, ICSSMET 2013 (A7-066), Vol.2 of 2, pp. 470~473.

C h i n g - S u n g K u o Page 57