**7. Validation and solution of the differential equation**

This step has a double purpose: to prove that the approximation of rate, given by Eq. (2), is sufficiently accurate and to compute the concentration from the rate, without performing any measurement. We want to solve the two-point boundary value problems Eq. (1) and boundary conditions:

$$\begin{cases} \mathbf{C}\_{\{\mathbf{z}\_{\text{total}}\}} = \mathbf{C}\_{\mathbf{0}} \\ \mathbf{C}\_{\{\mathbf{z}\_{\text{final}}\}} = \mathbf{C}\_{\mathbf{n}}. \end{cases} \tag{5}$$

and due to the complexity of the biological system that is modeled. For this reason the existence of implemented models in this area is very scarce, if not almost inexistent. Most existing models from the literature refer to models which are applied to a micro-scale fragment from a biological system (intercellular models) and less for globalized macro-scales that integrate

Numerical Modeling of Chemical Compounds' Fate and Kinetics in Living Organisms: An Inverse…

http://dx.doi.org/10.5772/intechopen.76611

In this chapter we tried to overcome this challenge, trying to model the accumulation rate for a chemical compound based on experimental data obtained in the laboratory after analysis conducted on numerous mushroom specimen analyses of *Macrolepiota procera*. Our first approach was on the anatomical compartments of the mushroom body, but the results were not satisfactory. Initially, the independent variable *z* was the height of the same compartment. Because compartments as cap and lamellae had an insufficient number of data (since the length of cap and lamellae is 1.2 cm and the minimal width for sample collection was from the section taken from 2 and 2 mm), we obtained large deviations between measured concentrations and com-

Thus, because in chemistry in a given volume the concentration of a chemical compounds is the same in any point of these volume, we considered in the next that we have several points

These drawbacks lead us to modify the approach mentioned in Section 6 on Analysis and modeling: The estimation of R. Due to symmetry we considered a half of an axial section and a medial axis of the section. Now *z* is the length of the path on medial axis. To apply the classical theory on ordinary differential equations to Eq. (1), we need to have a function of class *C*<sup>2</sup>

the domain of *z*, while the parameters defining the rate are piecewise constant. For this reason we considered the weighted average of these parameters on the whole length of the medial axis. The diameter *Φ*(*z*) was approximated by the piecewise Hermite cubic spline of measured diameters. Our choice is motivated by the fact that these splines are shape-preserving. The

**Figure 4.** The averaging of parameters (ODE solution, smoothing spline) and target chemical concentrations on the whole

on

207

puted concentrations at inter-compartment boundaries (see **Figure 4**).

of concentration data of same value in horizontal sections of the cap (**Figure 3**).

multiple events [29, 39].

mushroom.

Our solution uses the collocation method [38]. The independent variable *z* in Eq. (1) means the length of the path along the medial axis.
