Differential Equations

Systems of Equations

Systems Diff Equations Logo

Home Heating

Any owner will confirm that the heating of a house is expensive. In addition to the cost, it's also a carbon pollution! It turns out that using a system of differential equations, it is possible to describe the change of the temperature in the house for different heating modes. Such a model can be of real practical value.

Consider a typical two-storey house (Figure 1).

A two floor house
Figure 1.

We will describe the indoor temperature by two functions:

The initial differential equations are based on the Newton's law of cooling, which is written as

\[\frac{{dT}}{{dt}} = \frac{{\alpha A}}{C}\left( {{T_e} - T} \right) = k\left( {{T_e} - T} \right),\]

where \({{T_e}}\) is the temperature of the surrounding environment or adjacent room, \(T\) is the temperature of the room, \(\alpha\) is the heat transfer coefficient, \(C\) is the heat capacity of the body or surface through which the heat passes, \(A\) is the surface area. It is convenient to replace the coefficients \(\alpha,\) \(A\) and \(C\) with one parameter − the coefficient of thermal conductivity \(k,\) which describes the rate of temperature equalization between the two points. Thus, when \(k = 1,\) the initial temperature difference \(\Delta T\) decreases \(e \approx 2.7\) times per unit time. With increasing \(k,\) the relaxation rate also increases.

We introduce the following coefficients \({k_i}\) describing the two-storey house:

Then the system of differential equations for the functions \(x\left( t \right),\) \(y\left( t \right)\) can be represented as follows:

\[\left\{ \begin{array}{l} {\frac{{dx}}{{dt}} = {k_1}\left( {{T_g} - x} \right) + {k_2}\left( {y - x} \right) + {k_3}\left( {{T_e}\left( t \right) - x} \right) + f\left( t \right)}\\ {\frac{{dy}}{{dt}} = {k_4}\left( {{T_e}\left( t \right) - y} \right) + {k_2}\left( {x - y} \right)} \end{array} \right.,\;\; \Rightarrow \left\{ \begin{array}{l} {\frac{{dx}}{{dt}} = - \left( {{k_1} + {k_2} + {k_3}} \right)x + {k_2}y + {k_1}{T_g} + {k_3}{T_e}\left( t \right) + f\left( t \right) }\\ {\frac{{dy}}{{dt}} = {k_2}x - \left( {{k_2} + {k_4}} \right)y + {k_4}{T_e}\left( t \right)} \end{array} \right.,\]

where the term \(f\left( t \right)\) describes the heat source located on the ground floor.

We write this system in vector-matrix form:

\[\mathbf{X'}\left( t \right) = K\mathbf{X}\left( t \right) + \mathbf{F}\left( t \right),\;\; \text{where}\;\;\mathbf{X}\left( t \right) = \left[ {\begin{array}{*{20}{c}} {x\left( t \right)}\\ {y\left( t \right)} \end{array}} \right],\;\; K \text{ = }\left[ {\begin{array}{*{20}{c}} { - {k_1} - {k_2} - {k_3}}&{{k_2}}\\ {{k_2}}&{ - {k_2} - {k_4}} \end{array}} \right],\;\; \mathbf{F}\left( t \right) = {\mathbf{F}_1}\left( t \right) + {\mathbf{F}_2}\left( t \right) = \left[ {\begin{array}{*{20}{c}} {{k_1}{T_g} + {k_3}{T_e}\left( t \right)}\\ {{k_4}{T_e}\left( t \right)} \end{array}} \right] + \left[ {\begin{array}{*{20}{c}} {f\left( t \right)}\\ 0 \end{array}} \right].\]

Here the inhomogeneous part is represented as a sum of two vectors. Since the system is linear, we can apply the principle of superposition to find the solution.

First consider the homogeneous system:

\[\mathbf{X}'\left( t \right) = K\mathbf{X}\left( t \right).\]

Determine the eigenvalues of the matrix \(K:\)

\[\det \left( {K - \lambda I} \right) = 0,\;\;\Rightarrow {\lambda ^2} + {\left( {{k_1} + 2{k_2} + {k_3} + {k_4}} \right)\lambda} + {k_1}{k_2} + {k_2}{k_3} + {k_3}{k_4} + {k_1}{k_4} + {k_2}{k_4} = 0.\]

Note that the coefficients in the resulting auxiliary equation, which is the quadratic equation, are always positive:

\[{k_1} + 2{k_2} + {k_3} + {k_4} \gt 0,\;\; {k_1}{k_2} + {k_2}{k_3} + {k_3}{k_4} + {k_1}{k_4} + {k_2}{k_4} \gt 0.\]

Therefore, according to the Routh-Hurwitz criterion, the solution of the homogeneous system is asymptotically stable. In this case, it is the zero solution, since it is exactly the position of equilibrium of the homogeneous system.

Find the discriminant of the auxiliary equation:

\[D = {b^2} - 4ac = {\left( {{k_1} + 2{k_2} + {k_3} + {k_4}} \right)^2} - 4\big( {{k_1}{k_2} + {k_2}{k_3} + {k_3}{k_4} + {k_1}{k_4} + {k_2}{k_4}} \big) = k_1^2 + 4k_2^2 + k_3^2 + k_4^2 + \cancel{4{k_1}{k_2}} + 2{k_1}{k_3} + \color{blue}{2{k_1}{k_4}} + \color{black}{\cancel{4{k_2}{k_3}}} + \cancel{4{k_2}{k_4}} + \color{red}{2{k_3}{k_4}} - \color{black}{\cancel{4{k_1}{k_2}}} - \cancel{4{k_2}{k_3}} - \color{red}{4{k_3}{k_4}} - \color{blue}{4{k_1}{k_4}} - \color{black}{\cancel{4{k_2}{k_4}}} = k_1^2 + 4k_2^2 + k_3^2 + k_4^2 + 2{k_1}{k_3} - \color{blue}{2{k_1}{k_4}} - \color{red}{2{k_3}{k_4}} = \color{black}{\left( {{k_1} + {k_3}} \right)^2} + 4k_2^2 + k_4^2 - 2{k_1}{k_4} - 2{k_3}{k_4} = {\left( {{k_1} + {k_3}} \right)^2} - 2{k_4}\left( {{k_1} + {k_3}} \right) + k_4^2 + 4k_2^2 = {\left( {{k_1} + {k_3} - {k_4}} \right)^2} + 4k_2^2 \gt 0.\]

Thus, the discriminant of the auxiliary equation is always positive. This means that the point of equilibrium is always a "node". As the stability of the system has been already proven above, this point is always a stable node, i.e. the eigenvalues \({\lambda _1},{\lambda _2}\) are distinct and have real negative values. They are defined by the following equation:

\[{\lambda _{1,2}} = \frac{1}{2}\left\{ { - \left( {{k_1} + 2{k_2} + {k_3} + {k_4}} \right) \pm {{\left[ {{{\left( {{k_1} + {k_3} - {k_4}} \right)}^2} + 4k_2^2} \right]}^{\frac{1}{2}}}} \right\}.\]

Next, to avoid cumbersome expressions, we consider particular values of the thermal conductivity coefficients \({{k_i}}.\) Take, for example, the following values:

\[{k_1} = \frac{1}{{10}},\;\; {k_2} = \frac{1}{5},\;\; {k_3} = \frac{2}{5},\;\; {k_4} = \frac{1}{2}.\]

The higher the value of \({k_i},\) the worse the insulation and the higher the thermal conductivity of the corresponding surface. With this choice of the coefficients \({k_i}\) the discriminant \(D\) of the characteristic equation will be equal to

\[D = {\left( {{k_1} + {k_3} - {k_4}} \right)^2} + 4k_2^2 = {\left( {\frac{1}{{10}} + \frac{2}{5} - \frac{1}{2}} \right)^2} + 4 \cdot {\left( {\frac{1}{5}} \right)^2} = \frac{4}{{25}}.\]

Then the eigenvalues \({\lambda _{1,2}}\) have the following values:

\[{\lambda _{1,2}} = \frac{{ - \left( {{k_1} + 2{k_2} + {k_3} + {k_4}} \right) \pm \sqrt D }}{2} = - \frac{9}{{10}},\; - \frac{1}{2}.\]

Now we compute the eigenvectors associated with the eigenvalues \({\lambda _1},{\lambda _2}.\) Let the eigenvalue \({\lambda _1} = - {\frac{9}{{10}}}\) be related to the vector \({\mathbf{V}_1} = {\left( {{V_{11}},{V_{21}}} \right)^T},\) where the superscript \(^T\) denotes transposition. We obtain:

\[\left( {K - {\lambda _1}I} \right){\mathbf{V}_1} = \mathbf{0},\;\;\Rightarrow \left[ {\begin{array}{*{20}{c}} { -{k_1} - {k_2} - {k_3} - {\lambda _1}}&{{k_2}}\\ {{k_2}}&{ - {k_2} - {k_4} - {\lambda _1}} \end{array}} \right] \left[ {\begin{array}{*{20}{c}} {{V_{11}}}\\ {{V_{21}}} \end{array}} \right] = \mathbf{0},\;\; \Rightarrow \left[ {\begin{array}{*{20}{c}} {\frac{1}{5}}&{\frac{1}{5}}\\ {\frac{1}{5}}&{\frac{1}{5}} \end{array}} \right]\left[ {\begin{array}{*{20}{c}} {{V_{11}}}\\ {{V_{21}}} \end{array}} \right] = \mathbf{0},\;\; \Rightarrow \frac{1}{5}{V_{11}} + \frac{1}{5}{V_{21}} = 0,\;\; \Rightarrow {V_{11}} = - {V_{21}},\;\; \Rightarrow {\mathbf{V}_1} = \left[ {\begin{array}{*{20}{r}} { - 1}\\ 1 \end{array}} \right].\]

Similarly, we find the second eigenvector \({\mathbf{V}_2} = {\left( {{V_{12}},{V_{22}}} \right)^T}\) associated with the eigenvalue \({\lambda _2} = - {\frac{1}{{2}}}:\)

\[\left( {K - {\lambda _2}I} \right){\mathbf{V}_2} = \mathbf{0}, \;\;\Rightarrow \left[ {\begin{array}{*{20}{c}} {-\frac{1}{5}}&{\frac{1}{5}}\\ {\frac{1}{5}}&{-\frac{1}{5}} \end{array}} \right]\left[ {\begin{array}{*{20}{c}} {{V_{12}}}\\ {{V_{22}}} \end{array}} \right] = \mathbf{0},\;\; \Rightarrow -\frac{1}{5}{V_{12}} + \frac{1}{5}{V_{22}} = 0,\;\; \Rightarrow {V_{12}} = {V_{22}},\;\; \Rightarrow {\mathbf{V}_2} = \left[ {\begin{array}{*{20}{r}} 1\\ 1 \end{array}} \right].\]

The general solution of the homogeneous system with the given coefficients \({k_i}\) can be written as

\[{\mathbf{X}_0}\left( t \right) = \left[ {\begin{array}{*{20}{c}} {{x_0}\left( t \right)}\\ {{y_0}\left( t \right)} \end{array}} \right] = {C_1}{e^{ - {\frac{9}{{10}}} t}}\left[ {\begin{array}{*{20}{c}} { - 1}\\ 1 \end{array}} \right] + {C_2}{e^{ - {\frac{1}{2}} t}}\left[ {\begin{array}{*{20}{c}} 1\\ 1 \end{array}} \right],\]

where the constants \({C_1},\) \({C_2}\) depend on the initial conditions.

Now we construct a solution of the nonhomogeneous system. First, consider the nonhomogeneous part \({\mathbf{F}_1},\) which describes the parameters of the external environment:

\[{\mathbf{F}_1}\left( t \right) = \left[ {\begin{array}{*{20}{c}} {{k_1}{T_g} + {k_3}{T_e}\left( t \right)}\\ {{k_4}{T_e}\left( t \right)} \end{array}} \right] = \left[ {\begin{array}{*{20}{c}} {\frac{1}{{10}}{T_g} + \frac{2}{5}{T_e}\left( t \right)}\\ {\frac{1}{2}{T_e}\left( t \right)} \end{array}} \right] = \frac{1}{{10}}\left[ {\begin{array}{*{20}{c}} {{T_g} + 4{T_e}\left( t \right)}\\ {5{T_e}\left( t \right)} \end{array}} \right].\]

Suppose, for example, the temperature of the ground (we will measure it in degrees Celsius) is \({T_g} = 10^\circ\text{C}.\) Assume also that the ambient temperature changes with daily periodicity by the law of

\[{T_e}\left( t \right) = 10 + 10\sin \left( {\frac{{2\pi }}{{24}}t} \right) = 10 + 10\sin \left( {\frac{\pi }{{12}}t} \right),\]

that is, in the range from \(0^\circ\text{C}\) to \(20^\circ\text{C}.\) The time \(t\) and the period of oscillations are expressed in hours. Then we have:

\[{\mathbf{F}_1}\left( t \right) = \frac{1}{{10}}\left[ {\begin{array}{*{20}{c}} {10 + 4\left( {10 + 10\sin \left( {\frac{\pi }{{12}}t} \right)} \right)}\\ {5\left( {10 + 10\sin \left( {\frac{\pi }{{12}}t} \right)} \right)} \end{array}} \right]\; = \left[ {\begin{array}{*{20}{c}} {5 + 4\sin \left( {\frac{\pi }{{12}}t} \right)}\\ {5 + 5\sin \left( {\frac{\pi }{{12}}t} \right)} \end{array}} \right].\]

We seek a particular solution \({\mathbf{X}_1}\left( t \right)\) for this nonhomogeneous part in the form of vector quasipolynomial

\[{\mathbf{X}_1}\left( t \right) = \left[ {\begin{array}{*{20}{c}} {{x_1}\left( t \right)}\\ {{y_1}\left( t \right)} \end{array}} \right] = \left[ {\begin{array}{*{20}{c}} {{D_1} + {A_1}\sin \left( {\frac{\pi }{{12}}t} \right) + {B_1}\cos\left( {\frac{\pi }{{12}}t} \right)}\\ {{D_2} + {A_2}\sin \left( {\frac{\pi }{{12}}t} \right) + {B_2}\cos\left( {\frac{\pi }{{12}}t} \right)} \end{array}} \right].\]

Substitute the trial solution \({\mathbf{X}_1}\left( t \right)\) into the system of equations with the inhomogeneous part \({\mathbf{F}_1}\left( t \right):\)

\[{\mathbf{X'}_1}\left( t \right) = K{\mathbf{X}_1}\left( t \right) + {\mathbf{F}_1}\left( t \right),\]
\[\Rightarrow \left[ {\begin{array}{*{20}{c}} {{x'_1}\left( t \right)}\\ {{y'_1}\left( t \right)} \end{array}} \right] = \left[ {\begin{array}{*{20}{c}} { - {k_1} - {k_2} - {k_3}}&{{k_2}}\\ {{k_2}}&{ - {k_2} - {k_4}} \end{array}} \right] \left[ {\begin{array}{*{20}{c}} {{x_1}\left( t \right)}\\ {{y_1}\left( t \right)} \end{array}} \right] + \left[ {\begin{array}{*{20}{c}} {{k_1}{T_g} + {k_3}{T_e}\left( t \right)}\\ {{k_4}{T_e}\left( t \right)} \end{array}} \right],\]
\[\Rightarrow \left[ {\begin{array}{*{20}{c}} {{x'_1}\left( t \right)}\\ {{y'_1}\left( t \right)} \end{array}} \right] = \left[ {\begin{array}{*{20}{c}} { - \frac{7}{{10}}}&{\frac{2}{{10}}}\\ {\frac{2}{{10}}}&{ - \frac{7}{{10}}} \end{array}} \right]\left[ {\begin{array}{*{20}{c}} {{x_1}\left( t \right)}\\ {{y_1}\left( t \right)} \end{array}} \right] + \left[ {\begin{array}{*{20}{c}} {5 + 4\sin \left( {\frac{\pi }{{12}}t} \right)}\\ {5 + 5\sin \left( {\frac{\pi }{{12}}t} \right)} \end{array}} \right],\]

As a result we have

\[{A_1}\frac{\pi }{{12}}\cos \left( {\frac{\pi }{{12}}t} \right) - {B_1}\frac{\pi }{{12}}\sin\left( {\frac{\pi }{{12}}t} \right) = - \frac{7}{{10}}{D_1} - \frac{7}{{10}}{A_1}\sin\left( {\frac{\pi }{{12}}t} \right) - \frac{7}{{10}}{B_1}\cos\left( {\frac{\pi }{{12}}t} \right) + \frac{2}{{10}}{D_2} + \frac{2}{{10}}{A_2}\sin\left( {\frac{\pi }{{12}}t} \right) + \frac{2}{{10}}{B_2}\cos\left( {\frac{\pi }{{12}}t} \right) + 5 + 4\sin \left( {\frac{\pi }{{12}}t} \right),\]
\[{A_2}\frac{\pi }{{12}}\cos \left( {\frac{\pi }{{12}}t} \right) - {B_2}\frac{\pi }{{12}}\sin\left( {\frac{\pi }{{12}}t} \right) = \frac{2}{{10}}{D_1} + \frac{2}{{10}}{A_1}\sin\left( {\frac{\pi }{{12}}t} \right) + \frac{2}{{10}}{B_1}\cos\left( {\frac{\pi }{{12}}t} \right) - \frac{7}{{10}}{D_2} - \frac{7}{{10}}{A_2}\sin\left( {\frac{\pi }{{12}}t} \right) - \frac{7}{{10}}{B_2}\cos\left( {\frac{\pi }{{12}}t} \right) + 5 + 5\sin \left( {\frac{\pi }{{12}}t} \right).\]

By equating the coefficients of like terms, we obtain the following algebraic system:

\[\left\{ \begin{array}{l} {A_1}\frac{\pi }{{12}} = - \frac{7}{{10}}{B_1} + \frac{2}{{10}}{B_2}\\ { - {B_1}\frac{\pi }{{12}} = - \frac{7}{{10}}{A_1} + \frac{2}{{10}}{A_2} + 4}\\ 0 = - \frac{7}{{10}}{D_1} + \frac{2}{{10}}{D_2} + 5\\ {A_2}\frac{\pi }{{12}} = \frac{2}{{10}}{B_1} - \frac{7}{{10}}{B_2}\\ { - {B_2}\frac{\pi }{{12}} = \frac{2}{{10}}{A_1} - \frac{7}{{10}}{A_2} + 5}\\ 0 = \frac{2}{{10}}{D_1} - \frac{7}{{10}}{D_2} + 5 \end{array} \right..\]

Solving this system, we find the coefficients \({A_1},\) \({B_1},\) \({D_1},\) \({A_2},\) \({B_2},\) \({D_2}:\)

\[{A_1} = 6.55,\;\; {B_1} = - 3.55,\;\; {A_2} = 7.58,\;\; {B_2} = - 3.85,\;\; {D_1} = {D_2} = 10.\]

Thus, the particular solution \({\mathbf{X}_1}\left( t \right)\) can be written as

\[{\mathbf{X}_1}\left( t \right) = \left[ {\begin{array}{*{20}{c}} {{x_1}\left( t \right)}\\ {{y_1}\left( t \right)} \end{array}} \right] = \left[ {\begin{array}{*{20}{c}} {10 + 6.55\sin \left( {\frac{\pi t }{{12}}} \right) - 3.55\cos \left( {\frac{\pi t }{{12}}} \right)}\\ {10 + 7.58\sin \left( {\frac{\pi t }{{12}}} \right) - 3.85\cos \left( {\frac{\pi t }{{12}}} \right)} \end{array}} \right].\]

Similarly, we find a particular solution \({\mathbf{X}_2}\left( t \right)\) corresponding to the inhomogeneous part \({\mathbf{F}_2}\left( t \right):\)

\[{\mathbf{F}_2}\left( t \right) = \left[ {\begin{array}{*{20}{c}} {f\left( t \right)}\\ 0 \end{array}} \right].\]

The heat source \({f\left( t \right)}\) can be programmed to different modes of operation. We restrict ourselves to the simplest case, when the heat source operates on a constant level: \(f\left( t \right) = {f_0}.\) Then we seek a particular solution \({\mathbf{X}_2}\) as a constant vector:

\[{\mathbf{X}_2} = \left[ {\begin{array}{*{20}{c}} G\\ H \end{array}} \right].\]

After substitution of the solution into the system with the inhomogeneous part \({\mathbf{F}_2}\) we obtain:

\[{\mathbf{X'}_2} = K{\mathbf{X}_2} + {\mathbf{F}_2},\;\; \Rightarrow \mathbf{0} = \left[ {\begin{array}{*{20}{c}} { - \frac{7}{{10}}}&{\frac{2}{{10}}}\\ {\frac{2}{{10}}}&{ - \frac{7}{{10}}} \end{array}} \right]\left[ {\begin{array}{*{20}{c}} G\\ H \end{array}} \right] + \left[ {\begin{array}{*{20}{c}} {{f_0}}\\ 0 \end{array}} \right],\;\; \Rightarrow \left\{ {\begin{array}{*{20}{c}} { - \frac{7}{{10}}G + \frac{2}{{10}}H + {f_0} = 0}\\ {\frac{2}{{10}}G - \frac{7}{{10}}H = 0} \end{array}} \right.,\;\; \Rightarrow \left\{ {\begin{array}{*{20}{c}} { - 7G + 2H + 10{f_0} = 0}\\ {2G - 7H = 0} \end{array}} \right.,\;\; \Rightarrow H = \frac{4}{9}{f_0},\;\; \Rightarrow G = \frac{{14}}{9}{f_0}.\]

Thus, the particular solution \({\mathbf{X}_2}\) is represented by the following constant vector:

\[{\mathbf{X}_2} = \left[ {\begin{array}{*{20}{c}} {{x_2}}\\ {{y_2}} \end{array}} \right] = \left[ {\begin{array}{*{20}{c}} G\\ H \end{array}} \right] = \left[ {\begin{array}{*{20}{c}} {\frac{{14}}{9}{f_0}}\\ {\frac{4}{9}{f_0}} \end{array}} \right].\]

According to the principle of superposition, a particular solution of the linear system, the inhomogeneous part of which is the sum of the vectors \({\mathbf{F}_1}\left( t \right) + {\mathbf{F}_2},\) is expressed as the sum of the corresponding particular solutions \({\mathbf{X}_1}\left( t \right) + {\mathbf{X}_2}.\) As a result, the general solution can be written as

\[\mathbf{X}\left( t \right) = \left[ {\begin{array}{*{20}{c}} {x\left( t \right)}\\ {y\left( t \right)} \end{array}} \right] = {\mathbf{X}_0}\left( t \right) + {\mathbf{X}_1}\left( t \right) + {\mathbf{X}_2} = {C_1}{e^{ - {\frac{9}{{10}}} t}}\left[ {\begin{array}{*{20}{r}} { - 1}\\ 1 \end{array}} \right] + {C_2}{e^{ - {\frac{1}{2}} t}}\left[ {\begin{array}{*{20}{c}} 1\\ 1 \end{array}} \right] + \left[ {\begin{array}{*{20}{c}} {10 + 6.55\sin \left( {\frac{\pi t}{{12}}} \right) - 3.55\cos \left( {\frac{\pi t}{{12}}} \right)}\\ {10 + 7.58\sin \left( {\frac{\pi t}{{12}}} \right) - 3.85\cos \left( {\frac{\pi t}{{12}}} \right)} \end{array}} \right] + \left[ {\begin{array}{*{20}{c}} {\frac{{14}}{9}{f_0}}\\ {\frac{4}{9}{f_0}} \end{array}} \right].\]

Find the constants \({C_1},\) \({C_2}\) from the initial conditions. Suppose, for example, \(x\left( 0 \right) = 10^\circ\text{C},\) \(y\left( 0 \right) = 5^\circ\text{C}.\) Consequently,

\[\left\{ \begin{array}{l} {x\left( 0 \right) = - {C_1} + {C_2} + 10 - 3.55 + \frac{{14}}{9}{f_0} = 10}\\ {y\left( 0 \right) = {C_1} + {C_2} + 10 - 3.85 + \frac{4}{9}{f_0} = 5} \end{array} \right.,\;\; \Rightarrow \left\{ {\begin{array}{*{20}{l}} { - {C_1} + {C_2} = 3.55 - 1.56{f_0}}\\ {{C_1} + {C_2} = - 1.55 - 0.44{f_0}} \end{array}} \right.,\;\; \Rightarrow \left\{ {\begin{array}{*{20}{l}} {{C_1} = - 2.35 + 0.56{f_0}}\\ {{C_2} = 1.20 - {f_0}} \end{array}} \right..\]

The final general solution given the initial conditions and for an arbitrary constant heat source is written in the form:

\[\mathbf{X}\left( t \right) = \left[ {\begin{array}{*{20}{c}} {x\left( t \right)}\\ {y\left( t \right)} \end{array}} \right] = \left( { - 2.35 + 0.56{f_0}} \right){e^{ - {\frac{9}{{10}}}t}}\left[ {\begin{array}{*{20}{r}} { - 1}\\ 1 \end{array}} \right] + \left( {1.20 - {f_0}} \right){e^{ - {\frac{1}{2}} t}}\left[ {\begin{array}{*{20}{c}} 1\\ 1 \end{array}} \right] + \left[ {\begin{array}{*{20}{c}} {10 + 6.55\sin \left( {\frac{\pi t}{{12}}} \right) - 3.55\cos \left( {\frac{\pi t}{{12}}} \right)}\\ {10 + 7.58\sin \left( {\frac{\pi t}{{12}}} \right) - 3.85\cos \left( {\frac{\pi t}{{12}}} \right)} \end{array}} \right] + \left[ {\begin{array}{*{20}{c}} {1.56}\\ {0.44} \end{array}} \right]{f_0}.\]

Here, the first two terms are damped and describe the transition process. The third term is related to heat exchange with the environment. Recall that in this problem the following law of the change of the ambient temperature has been chosen:

\[{T_e}\left( t \right) = 10 + 10\sin \left( {\frac{\pi }{{12}}t} \right).\]

Finally, the last term in the formula describes the action of the constant heat source \({f_0}.\) The parameter \({f_0}\) is proportional to the source power. The heat source working for an hour provides an increase in temperature (on the ground floor) by \({f_0}\) degrees.

Consider the graphs of temperature change. Figure \(2\) shows the temperature curves on the lower and upper floor of the house (respectively, the functions \(x\left( t \right)\) and \(y\left( t \right)\)) when the heater is turned off: \({f_0} = 0.\) It can be seen that an increase of the outside temperature \({T_e}\left( t \right)\) causes the temperature rise inside the house with a delay. The inertia of heat transfer also causes the temperature on the ground floor to be changed in the range from \(2.5^\circ\text{C}\) to \(17.5^\circ\text{C},\) and on the top floor − from \(1.5^\circ\text{C}\) to \(18.5^\circ\text{C},\) while the ambient temperature ranges from \(0^\circ\text{C}\) to \(20^\circ\text{C}.\)

Temperature curves on the ground and first floors when the heater is off
Figure 2.

When the heat source \({f_0}\) is turned on, of course, it is getting warmer in the house. Figure \(3\) shows the graphs of \(x\left( t \right),\) \(y\left( t \right)\) for the case \({f_0} = 5\left( {\frac{\text{deg}}{\text{hr}}} \right).\) Now, the temperature on the ground floor ranges from \(10^\circ\text{C}\) to \(25^\circ\text{C},\) and on the upper floor − from \(5^\circ\text{C}\) to \(20.5^\circ\text{C}.\)

Temperature curves on the ground and first floors when the heater is turned on (f0=5)
Figure 3.

As the power of the heat source increases, the ground floor is heated much better than the upper floor (Figure \(4\)).

Temperature curves on the ground and first floors when the heater is turned on (f0=10)
Figure 4.

Exploring the solutions \(x\left( t \right),\) \(y\left( t \right)\) under different operating conditions of the heat source, you can choose the most comfortable and cost effective heating mode.