Open access peer-reviewed chapter

# Square Matrices Associated to Mixing Problems ODE Systems

By Victor Martinez-Luaces

Submitted: October 23rd 2017Reviewed: January 25th 2018Published: August 29th 2018

DOI: 10.5772/intechopen.74437

## Abstract

In this chapter, mixing problems are considered since they always lead to linear ordinary differential equation (ODE) systems, and the corresponding associated matrices have different structures that deserve to be studied deeply. This structure depends on whether or not there is recirculation of fluids and if the system is open or closed, among other characteristics such as the number of tanks and their internal connections. Several statements about the matrix eigenvalues are analyzed for different structures, and also some questions and conjectures are posed. Finally, qualitative remarks about the differential equation system solutions and their stability or asymptotical stability are included.

### Keywords

• eigenvalues
• Gershgorin circle theorem
• mixing problems
• linear ODE systems
• associated matrices

## 1. Introduction

Mixing problems (MPs), also known as “compartment analysis” [1], in chemistry involve creating a mixture of two or more substances and then determining some quantity (usually concentration) of the resulting mixture. For instance, a typical mixing problem deals with the amount of salt in a mixing tank. Salt and water enter to the tank at a certain rate, they are mixed with what is already in the tank, and the mixture leaves at a certain rate. This process is modeled by an ordinary differential equation (ODE), as Groestch affirms: “The direct problem for one-compartment mixing models is treated in almost all elementary differential equations texts” [2].

Instead of only one tank, there is a group, as it was stated by Groestch: “The multicompartment model is more challenging and requires the use of techniques of linear algebra” [2]. In particular, the ODE system-associated matrix deserves to be studied since it determines the qualitative behavior of the solutions.

In several previous papers and book chapters [3, 4, 5, 6], MPs were studied from different points of view. In the first paper [3], a particular MP with three compartments was proposed, and after applying Laplace transform, this example was connected with important concepts in reactor design, like the transference function. 2 years later, another work [4] analyzed more general MPs in order to obtain characterization results independent of the internal geometry of the tank system. In the third paper [5], the educative potential of MPs was studied, focusing on inverse modeling problems. Finally, in a recent book chapter [6], results for MPs with and without recirculation of fluids were analyzed, and other general results were obtained.

In all these works, a given MP is modeled through an ODE linear system, in which qualitative properties (like stability and asymptotic stability) depend on the eigenvalues and eigenvectors of the associated matrices, so-called MP-matrix.

Taking into account previous results about MP-matrices, and the new ones presented here, two main conjectures can be proposed:

• All the solutions of a given MP are stable.

• If the MP corresponds to an open system, then the solutions are asymptotically stable.

In order to investigate if these conjectures—among others, introduced in the following sections—are true or not, MP-matrices (i.e., square matrices associated to the ODE linear system that models a given MP) should be deeply analyzed.

## 2. Nomenclature

In this section we introduce a specific terminology useful to allow understanding of the terms properly.

In order to analyze MPs and MP-matrices, we begin by studying a problem already considered in a previous book chapter [6], which involves a tank with five compartments, shown in Figure 1.

In this scheme, C0 is the initial concentration (e.g., salt concentration in water at the entrance of the tank system), Ci is the concentration in the ith compartment (i = 1,…,5), and Φ00is the incoming and also outgoing flux.

For instance, if Φ1kis the flux that goes from the left (first) to the kth compartment (being k = 2, 3, 4) and V1is the volume of the first container, then a mass balance gives the following ODE:

E1

The ODEs associated with the central compartments (i = 2, 3, 4) are simpler, since in each case, there is only one incoming flux Φ1k(being k = 2, 3, 4) and a unique outgoing flux Φk5(being k = 2, 3, 4). Once again, if Vkis the volume of the kth container, these equations can be written as.

V2dC2dt=Φ12C1Φ25C2,V3dC3dt=Φ13C1Φ35C3,V4dC4dt=Φ14C1Φ45C4E2

Finally, for the right (fifth) container, we have:

E3

If all these equations are put together, the following ODE system is obtained:

V1dC1dt=Φ0C0Φ12+Φ13+Φ14C1V2dC2dt=Φ12C1Φ25C2V3dC3dt=Φ13C1Φ35C3V4dC4dt=Φ14C1Φ45C4V5dC5dt=Φ25C2+Φ35C3+Φ45C4Φ0C5E4

After some algebraic manipulations, the corresponding mathematical model can be written as, where.

C=C1C2C3C4C5 and B=Φ0/V10000E5

The system-associated matrix (MP-matrix) is

A=Φ12+Φ13+Φ14/V10000Φ12/V2Φ25/V2000Φ13/V30Φ35/V300Φ14/V400Φ45/V400Φ25/V5Φ35/V5Φ45/V5Φ0/V5E6

Hereafter, we will call MP-matrix to any ODE system-associated matrix related to a given MP, like matrix Aof Eq. (6).

In the previous example, the MP-matrix obviously depends on the numbers given to the different containers. In that example it was possible to enumerate the compartments such that the flux always goes from the ith compartment to the jth one, where. For instance, a possible enumeration for this purpose is the one illustrated in Figure 1.

In general, if in a given MP it is possible to enumerate the containers such that the flux always goes from the ith compartment to the jth one, with, then the MP will be considered as a mixing problem without recirculation (MP-WR).

Now, let us analyze a different problem, where a couple of tanks are linked by all possible connections between them, including recirculation from the second tank back to the first one, as in Figure 2. This problem represents an interesting variation of an MP analyzed by Zill [7] in his textbook, where the main difference is that this new MP has no incoming and/or outgoing flux, i.e., it is a closed system.

If in a given MP we have that Φi=0, being Φiall the system incoming fluxes, and Φk=0, being Φkall the system outgoing fluxes, then it will be named MP closed system (MP-CS). Otherwise, it will be an open system (MP-OS).

Taking into account the abovementioned nomenclature, the example considered in Figure 2 corresponds to an MP-CS, while the MP analyzed in Zill’s textbook [7] is an MP-OS, and both are systems with recirculation.

Finally, it is important to observe that in both examples (Figures 1 and 2), we have Φi=Φk, being Φiall the system incoming fluxes and Φkthe corresponding outgoing fluxes. This equation must be satisfied, since the compartments are neither filled up nor emptied with time, at least for the typical MPs’ real-life most interesting situations.

In that case all the compartment volumes remain constant, and so if in an MP the following equation Φi=Φk(being Φiall the system incoming fluxes and Φkthe corresponding outgoing fluxes) is satisfied, it will refer to a mixing problem with constant volumes (MP-CV).

Taking into account all these terms, several previous results can be reformulated, as shown in the next section.

## 3. Previous results revisited

In order to give some general results, it is convenient to consider two different situations: MP without recirculation and MP with recirculation.

Considering again the example in Figure 1, it is possible to enumerate the compartments, such that the flux always goes from the ith container to the jth one, being i<j, shown in brackets.

Analyzing the system (Eq. (4)), it is easy to observe that for the jth container, the ODE right hand side is a linear combination of a subset of, and this result can be extended straightforward. In fact, in a previous book chapter [6], it was proved that if in a given MP the compartments can be enumerated such that there is no recirculation (i.e., ifthere is no flux from compartmentto compartment), then the ODE corresponding to the jth compartment will be of the form:

E7

beingand

As a consequence, under the previous conditions, the corresponding ODE system has an associated upper matrix.

Revisiting the ODE system (Eq. (4)), corresponding to Figure 1, it can be rewritten as

dC1dt=Φ0V1C0Φ12+Φ13+Φ14V1C1dC2dt=Φ12V2C1Φ25V2C2dC3dt=Φ13V3C1Φ35V3C3dC4dt=Φ14V4C1Φ45V4C4dC5dt=Φ25V5C2+Φ35V5C3+Φ45V5C4Φ0V5C5E8

It follows that for the jth compartment, the coefficient corresponding tocan be written as, whererepresents the sum of outgoing fluxes. This situation can be easily generalized, since concentrationonly appears in the right hand side of the corresponding ODE when a certain flux is leaving the tank. Combining this result with the previous one—about the upper matrix—it is easy to observe that the ODE system has only negative eigenvalues of the form, for all

However, not all of these results can be extended to MPs with recirculation as will be analyzed in the following subsection.

In previous works [4, 5], a “black box” system was analyzed (see Figure 3), in order to obtain a necessary condition to be satisfied by any MP-matrix with any number of compartments and unknown internal geometry. In Figure 3andrepresent flux and concentration at the input, andis also the output flux (since tanks neither fill up nor empty with time), andis the final concentration. In this system there arecompartments inside the black box with volumesand concentrations, and recirculation fluxes may exist or not.

If all volumesremain constant, by performing a mass balance, it can be proved that.

E9

Then, Eq. (9) is obtained without any consideration of the internal geometry of the tank system and can be easily verified in the previous example (see Figure 1). In fact, by adding the equations of the ODE system (Eq. (4)), it follows straightforward that the condition given in Eq. (9) is satisfied. The same conclusion can be drawn from other possible examples, corresponding to open or closed MPs, with or without recirculation. For instance, in the case schematized in Figure 2, the ODE system can be written as follows:

dC1dt=Φ12V1C1+Φ21V1C2dC2dt=Φ12V2C1Φ21V2C2E10

Operating with these equations, it can be proved that V1dC1dt+V2dC2dt=0, which satisfies condition Eq. (9) sinceis zero.

The previous result can be generalized as follows: in a given MP—with or without recirculation—with input and output concentrationsand, respectively, and beingthe incoming and outgoing flux, then, independently of the internal geometry, the condition given by Eq. (9)is satisfied.

An analogous condition may be used to know if a given matrix may or may not be an MP-matrix. For this purpose, let us consider the MP-matrix, associated to the ODE system given by Eq. (10):

A=Φ12V1Φ21V1Φ12V2Φ21V2E11

It is easy to observe that

V1V2Φ12V1Φ21V1Φ12V2Φ21V2=00E12

This equation can be written as VTA=0, being Vthe volumes’ vector.

If there exists an incoming (and outgoing) flux, the last result will change. For instance, if we compute VTA, being V=V1V2V3V4V5the volumes’ vector and Athe MP-matrix corresponding to Figure 1, the result will be

VTA=0000Φ0E13

It can be noted that Eq. (12) and Eq. (13) are particular cases of the following result: in a given MP—with or without recirculation—with an incoming and outgoing flux, the condition VTA=00Φ0is satisfied, being V=V1V2Vnthe volumes’ vector and Athe MP-matrix.

Then, independently of the internal geometry of the system, the following condition is satisfied:

VTA=00Φ0E14

Now, let us consider again the MP-matrix, corresponding to the system of Figure 2:

A=Φ12V1Φ21V1Φ12V2Φ21V2E15

Ifis slightly changed only in its first entry, we have the following matrix:

Aε=Φ12V1+εΦ21V1Φ12V2Φ21V2E16

It is easy to observe that this new matrix will not satisfy the condition given by Eq. (14). Moreover, there is no MP associated to this matrix, since this condition must be satisfied independently of the internal geometry of the system.

As a first consequence, not every square matrix is an MP-matrix. A second observation is that if a given MP-matrix is slightly changed, the result is not necessarily a new MP-matrix.

Furthermore, if volumesand fluxesare multiplied by a scale factor, then the MP-matrixEq. (11) remains unchanged, and so, a scale factor in geometry, not in concentrations, produces exactly the same mathematical model.

After interpreting the previous results, we note that when working with MP-matrices, existence, uniqueness, and stability questions for the inverse-modeling problem have negative answers.

The same situation can be observed in many other inverse problems [2], and it is not an exclusive property of compartment analysis.

## 4. Some considerations about terminology

We start this section explaining three simple and intuitive terms.

Firstly, we will consider that an input tank is a tank with one or more incoming fluxes. Secondly, a tank with one or more outgoing fluxes will be called output tank. Finally, we will say that an internal tank is a tank without incoming and/or outgoing fluxes to or from outside the system.

Taking into account the previous nomenclature, if Φkik=1,2,,mrepresent all the ith tank incoming fluxes, then Φki0for an input tank, and in the same way, if Φjkk=1,2,,mrepresent all the jth tank outgoing fluxes, then Φjk0for an output tank.

Input and output tanks are not mutually exclusive. For instance, in Figure 4, the first tank is an input tank, and at same time, it is an output tank, since it has an incoming flux Φ0from outside the system and it also has an outgoing flux Φ0that leaves the tank system. It should be noted that in Figure 4, the second tank is an internal one.

Another interesting example was proposed by Boelkins et al. [8]. The authors considered a three-tank system connected such that each tank contains an independent inflow that drops salt solution to it, each individual tank has a separated outflow, and each one is connected to the rest of them with inflow and outflow pipes. In this case, all tanks are input and output ones, and there is no internal tank.

It is important to mention that those types of tanks or compartments play different roles in the ODE-associated system and also—as a consequence—in the corresponding MP-matrix. In order to show this fact, let us examine a three-tank system with all the possible connections among them, as in Figure 5.

As a first remark, Figure 5 system has recirculation—unless Φ21=Φ32=Φ31=0, which represents a trivial case—and consequently, an associated upper MP-matrix will not be expected for this problem.

In the mass balance for the first tank—which is an input one—a term Φ0C0must be considered. In the same way, in the mass balance of the third tank—which is an output one—a term Φ0C3will appear. These two terms will not be part of the second equation of the ODE system, which can be formulated as follows:

E17

Once again, the ODE system can be written as, where the MP-matrix is:

E18

In the previous ODE system, the independent vector is:

E19

It is easy to observe that the outgoing flux Φ0only appears in the last entry of the MP-matrixand the incoming flux Φ0only is involved in the first entry of vector B. These facts—particularly the first one—are relevant when applying the Gershgorin circle theorem, which will be exposed in the next section.

## 5. The Gershgorin circle theorem

The Gershgorin circle theorem first version was published by S. A. Gershgorin in 1931 [9]. This theorem may be used to bind the spectrum of a complexmatrix, and its statement is the following:

Theorem (Gershgorin)

Ifis anmatrix, with entriesbeing, andis the sum of the non-diagonal entry modules in theth row, then every eigenvalue oflies within at least one of the closed disks, called Gershgorin disks.

This theorem was widely used in previous book chapters [6, 10, 11] in order to obtain new results about matrices corresponding to chemical problems.

Here, the main purpose is to apply this theorem to MP-matrices as a method to bind their eigenvalues, depending on the characteristics of the MP ODE system, and, even more, the compartment considered.

For instance, if we consider the MP corresponding to Figure 5, the first ODE of Eq. (17) can be expressed as dC1dt=Φ0V1C0+Φ21V1C2+Φ31V1C3Φ12+Φ13V1C1

This equation—which obviously corresponds to an input tank—gives the first row of the MP-matrix (Eq. (18)) that can be written as Φ12+Φ13V1Φ21V1Φ31V1.

The Gershgorin disk corresponding to this row is centered at a11=Φ12+Φ13V1<0with radius R1=Φ21+Φ31V1.

Now, if a flux balance is performed in this input tank, we have this equation: Φ0+Φ21+Φ31=Φ12+Φ13, and then Φ21+Φ31<Φ12+Φ13(at least if we consider the nontrivial case Φ0>0). As a consequence of this fact, a11>R1, and the Gershgorin disk will look like the one schematized in Figure 6.

Now, if the second ODE of Eq. (17) is considered, this equation can be written as dC2dt=Φ12V2C1+Φ32V2C3Φ21+Φ23V2C2.

This internal tank equation corresponds to the second row of the MP-matrix (Eq. (18)): Φ12V2Φ21+Φ23V2Φ32V2.

The Gershgorin disk corresponding to this row is centered at a22=Φ21+Φ23V2<0with radius R2=Φ12+Φ32V2.

Now, if a flux balance is performed in this internal tank, we have this equation: Φ12+Φ32=Φ21+Φ23, and then a22=R2, and the corresponding Gershgorin disk will look like the one schematized in Figure 7.

Finally, if the third ODE of Eq. (17) is considered, this equation can be written as dC3dt=Φ13V3C1+Φ23V3C2Φ31+Φ32+Φ0V3C3.

This output tank equation corresponds to the third row of the MP-matrix Eq. (18): Φ13V3Φ23V3Φ31+Φ32+Φ0V3.

The Gershgorin disk corresponding to this row is centered at the point a33=Φ31+Φ32+Φ0V3<0with radius R3=Φ13+Φ23V3.

The flux balance in this case gives Φ13+Φ23=Φ31+Φ32+Φ0, and then a33=R3, and the corresponding Gershgorin disk will look like as the one schematized in Figure 7.

Taking into account all these results, the Gershgorin circles for the MP of Figure 5 are shown in Figure 8.

Since every eigenvalue lies within at least one of the Gershgorin disks, it follows that

In the following section, these results—among others—will be generalized.

## 6. The general form of MP-matrices and new results

As stated in Section 3, if there is no recirculation, then the ODE system has only negative eigenvalues of the form, for allThen, in this case all the corresponding ODE system solutions will be asymptotically stable.

In a previous work [6], it was proved that in an open MP, with three or less compartments, with or without recirculation, all the corresponding ODE system solutions are asymptotically stable.

It is important to analyze if this result can be generalized or not, when closed systems and/or tanks with more than three compartments are considered. For this purpose, we will start with the following theorem.

Theorem 1

In an open system, if the ith tank is an input one, then the diagonal entry of the ith row is aii<0and aii>Ribeingthe sum of the non-diagonal entry modules of that row.

Proof

If Φai,Φbi,,Φniare the incoming fluxes from other tanks of the system, ΦiA,ΦiB,,ΦiJare the outgoing fluxes, and Φ01,Φ02,,Φ0sare the incoming fluxes from outside the system, then the corresponding ODE can be written as

VidCidt=ΦaiCa++ΦniCnΦiA++ΦiJCi+Φ01C0++Φ0sCsE20

This equation gives.

dCidt=ΦaiViCa++ΦniViCnΦijViCi+Φ0pViCpE21

Eq. (20) implies that the ith row of the MP-matrix has entries: ΦkiVifor ki, ΦijVifor k=i, and Φ0pViCpis part of the independent term.

A flux balance gives Φki+Φ0p=Φij, which implies Φki<Φij, and then: aii=ΦijVi<0and also Ri=ΦkiVi<ΦijVi=aii, which proves the theorem.

Corollary 1

In an open system, being the ith tank an input one, the Gershgorin circle corresponding to the ith row looks like the disk in Figure 6.

Corollary 2

If in an open system, all are input tanks, all the eigenvalues satisfy the condition Reλi<0, and the ODE solutions are asymptotically stable.

Theorem 2

In an open system, if the ith tank is not an input one, then the diagonal entry of the ith row is aii<0and aii=Ribeingthe sum of the non-diagonal entry modules of that row.

Proof

If Φai,Φbi,,Φniare the incoming fluxes from other tanks (a,b,,n) of the MP system, ΦiA,ΦiB,,ΦiJare the outgoing fluxes to other tanks (A,B,,J), and Φi1,Φi2,,Φisare the fluxes from the ith tank to outside the system, then the corresponding ODE can be written as

VidCidt=ΦaiCa++ΦniCnΦiA++ΦiJCiΦi1CiΦisCiE22

This equation gives:

dCidt=ΦaiViCa++ΦniViCnΦij+ΦipViCiE23

Eq. (22) implies that the ith row of the MP-matrix has entries ΦkiVifor kiand Φij+ΦipVifor k=i, and this equation does not contribute to the independent term.

In this case a flux balance gives the following equation Φki=Φij+Φip, then aii=Φij+ΦipVi<0, and also Ri=ΦkiVi=Φij+ΦipVi=aii, and the theorem is proved.

Corollary 3

In an open system, if the ith tank is not an input one, the Gershgorin circle corresponding to the ith row looks like the disk in Figure 7.

Corollary 4

In an open system, the Gershgorin disks look like those of Figure 8.

As a consequence of the previous results, the following corollary can be stated.

Corollary 5

In an open system with input and non-input tanks, all the eigenvalues satisfy the condition Reλi0.

Independently of the previous results, it is easy to observe that all the solutions corresponding to the eigenvalues with Reλi<0tend to vanish when t+.

For this purpose, when analyzing eigenvalues with Reλi<0, there are two cases to be considered: λiand λi.

In the first case, the corresponding ODE solutions are a linear combination of the functions expλittexpλitt2expλittqexpλit, where the number qdepends on the algebraic and geometric multiplicity of λi(i.e., AMλiand GMλi). Taking into account that λi<0, it follows that tnexpλitt+0, n=0,1,,q.

In the second case—which really happens, as it will be observed later—we have λi=a+bi(with a<0,b0). The ODE solutions are a linear combination of expatcosbtexpatsinbttqexpatcosbttqexpatsinbt, where the number qdepends on AMλiand GMλias in the other case. It is easy to prove that tnexpatcosbtt+0and tnexpatsinbtt+0, n=0,1,,q, since a<0.

According to the position of the Gershgorin disks for an MP-matrix (see Figure 8), the ODE solutions corresponding to an eigenvalue λi, with Reλi=0, can be analyzed.

For this purpose it is important to observe that if an eigenvalue λisatisfies Reλi=0, then it must be λi=0, since the Gershgorin disks look like those in Figure 8.

In this case the ODE solutions are a linear combination of the following functions: exp0ttexp0tt2exp0ttqexp0t=1tt2tq, where the number qdepends on AM0and GM0. In other words, the corresponding solutions are polynomial, and so, they will not tend to vanish nor remain bounded when t+, unless AM0=MG0, and the polynomial becomes a constant.

Considering all these results, it is obvious that the stability of the ODE system solutions will depend exclusively on AM0and GM0.

## 7. Several questions and a conjecture

In the previous section, some particular cases with λi=0and/or λi=a+bi(with a<0,b0) were considered. A first question to analyze is if there exists an MP that satisfies any of these conditions. For this purpose, let us consider the closed MP of Figure 9, in which ODE system can be written as, and the corresponding MP-matrix is a0abb00cc, being a=ΦV1, b=ΦV2, and c=ΦV3. If Φand Viare chosen such that a=1, b=2, and c=3, it is easy to show that the eigenvalues are λ1=0and λ2,3=3±i2, which prove that null and/or complex eigenvalues are possible.

Other questions are not so simple like the previous one. The next two examples propose challenging problems that deserve to be studied:

Question 1:

Is it possible to find an MP-matrix with an eigenvalue λi=0such that AM0>1?

Question 2:

Is it possible to find an MP-matrix such that AM0>GM0?

Question 3:

Is it possible to find an MP-matrix with complex eigenvalues in an open system?

Finally, it is interesting to observe that all cases analyzed here with λi=0correspond to closed systems. Moreover, in a previous book chapter [6], it was proved that Reλi0,i, in any MP open system with three tanks or less. Taking into account all these facts, it can be conjectured that in an open system, all the MP-matrix eigenvalues have negative real part and as a consequence, all the solutions are asymptotically stable.

## 8. Conclusions

Mixing problems are interesting sources for applied research in mathematical modeling, ODE, and linear algebra, and—as it was shown—their behavior depends on how they are connected. It has been proved that null eigenvalues are not expected in open systems with three or less components, andis a general conclusion for open MP-matrices that can be obtained by applying the Gershgorin circle theorem.

As a final remark, all the MP differential equation systems considered in this chapter have stable or asymptotically stable solutions. Nevertheless, this situation may change depending on the answers to the questions and the conjecture presented in the last section, giving a challenging proposal for further research on this topic.

## Acknowledgments

The author wishes to thank Marjorie Chaves for her assistance and support in this work.

## More

© 2018 The Author(s). Licensee IntechOpen. This chapter is distributed under the terms of the Creative Commons Attribution 3.0 License, which permits unrestricted use, distribution, and reproduction in any medium, provided the original work is properly cited.

## How to cite and reference

### Cite this chapter Copy to clipboard

Victor Martinez-Luaces (August 29th 2018). Square Matrices Associated to Mixing Problems ODE Systems, Matrix Theory - Applications and Theorems, Hassan A. Yasser, IntechOpen, DOI: 10.5772/intechopen.74437. Available from:

### Related Content

Next chapter

#### Nullspace of Compound Magic Squares

By Saleem Al-Ashhab

First chapter

#### 3-Algebras in String Theory

By Matsuo Sato

We are IntechOpen, the world's leading publisher of Open Access books. Built by scientists, for scientists. Our readership spans scientists, professors, researchers, librarians, and students, as well as business professionals. We share our knowledge and peer-reveiwed research papers with libraries, scientific and engineering societies, and also work with corporate R&D departments and government entities.

View all books