## 2 Materials and Methods
### Data Set and Non-Linear Mathematical Model  
The minimization of the differences between the values determined experimentally for the performance of the process and those calculated using the mathematical model is represented by the principle of analysis of linear regression (the method of least squares) and the method of designing statistical mathematical models [44]. More precisely, in the most complex situation within this research (the one describing the variation of the removal efficiency of Cu and Pb from soil)--for the quantification of the dependence between the removal efficiency value and the two process parameters--we opted for a nonlinear mathematical model with two variables: stirring time (\(X_{2}\)) and S/L ratios (\(X_{1}\)). The form of the model is given by Equation (2):  
\[Y=b_{0}+b_{1}\;X_{1}+b_{2}\;X_{2}+b_{12}\;X_{1}X_{2}+b_{11}\;X_{1}^{2}+b_{22}\;X _{2}^{2} \tag{2}\]  
where \(Y\) is the removal efficiency of heavy metals from soil (%), \(X_{1}\) is the S/L ratios (in decimal fractions), \(X_{2}\) is the stirring time (in hours), and \(b_{0}\), \(b_{1}\), \(b_{2}\), \(b_{12}\), \(b_{11}\), and \(b_{22}\) are the coefficients of the mathematical model. In order to determine the values of the b coefficients, the method of least squares was used [45] which starts from the premise that for a mathematical equation to be considered as a mathematical model of any process, it is necessary that the differences between the performance values calculated using the mathematical model, \(\tilde{y}_{i}\), and the values of the same performance experimentally measured, \(y_{i}\), in a number of \"\(n\)\" points (\(i=1\dots\) \(n\)) be \begin{table}
\begin{tabular}{c c c c c c c} \hline \hline  & & **Cu** & & & **Pb** & \\ \cline{2-7}
**n** & **X1** & **X2** & **Y** & **X1** & **X2** & **Y** \\  & **(dec. fr.)** & **(h)** & **(\%)** & **(dec. fr.)** & **(h)** & **(\%)** \\ \hline  
\hline \hline \end{tabular} Note: regarding the artificial variable \(X_{0}\) (introduced in the system as a requirement of the algorithm), its values \(X_{01}\dots\)\(X_{0n}\) will all be taken as equal to the unit.  
\end{table} 
Table 2: Experimental data obtained during soil washing experiments using a 5% chitosan solution and used in the elaboration of the mathematical models. as small as possible. In other words, the value of the so-called concordance dispersion \(S_{conc}^{2}\)--defined as the arithmetic average of the square values of the deviations of the values calculated using the mathematical model and the ones experimentally measured in all the \"\(n\)\" points of the experiment--must be minimal:  
\[S_{conc}^{2}=\frac{1}{n-m}\sum\limits_{i=1}^{n}(\widetilde{y_{i}}-y_{i})^{2}=min \tag{3}\]  
where \(n\) is the number of determinations or the number of values given to the variables of the process, and \(m\) is the number of variables of the model. From a mathematical point of view, finding the minimum point for a given relation implies its derivation and equalizing the value of the first-order derivative with zero, according to the following equation:  
\[\frac{\partial S_{conc}^{2}}{\partial b_{j}}=0\text{ for j}=0\ldots\text{k} \tag{4}\]  
where \(b_{0}\)... \(b_{\text{k}}\) are the coefficients of Equation (2), their values being able to be determined by means of the system of \"k\" equations with \"k\" unknowns which is formed in (5), mathematically expressed as follows:  
\[ \begin{cases}\frac{\partial S_{conc}^{2}}{\partial b_{0}}=0\\ \frac{\partial S_{conc}^{2}}{\partial b_{1}}=0\\ \ldots\\ \ldots\\ \frac{\partial S_{conc}^{2}}{\partial b_{k}}=0\end{cases}  \tag{5}\]  
By particularizing this system of equations [44] for the analyzed case, a system of 6 equations with 6 unknowns (\(b_{0}\), \(b_{1}\), \(b_{2}\), \(b_{12}\), \(b_{11}\) and \(b_{22}\)) results having the following mathematical form:  
\[\left\{