**5. Solving modality path selection and motivation: the inverse numerical method for rate estimation from concentration**

Inverse problems are extremely frequent in interdisciplinary science subjects. A large scale of mathematical and numerical techniques for solving scattering problems as well as other inverse problems usually exist [24]. These methods are often very different from the methods used for solving direct problems due to the differences in mathematical structure and input data [25].

In our study, the estimation process of the chemical compound accumulation rate was built on the following differential equation:

$$\frac{d(p\phi(\mathbf{z})\chi\mathbf{C}(\mathbf{z}))}{dz} - \frac{d}{dz}\Big[p\phi(\mathbf{z})\left(\mathcal{W}\_{\mathbf{c}} - \overline{\mathcal{E}T}\right)\frac{d\mathbf{C}(\mathbf{z})}{dz}\Big] + p\phi(\mathbf{z})\left(\mathcal{U}p\_{\uparrow}(\mathbf{C}(\mathbf{z}) - B\mathbf{a}\_{\uparrow})\right) = \mathcal{R} \tag{1}$$

where the elements which may affect the rates are given as follows: *z* is the height [mm], Φ is the diameter [mm], *p* is the porosity, *χ* is the hydration coefficient, *Wc* the is saturated hydration factor, *ET*¯ is the evaporation-transpiration coefficient, *Upf* is the uptake factor, *Baf* is the bioaccumulation factor, *R* is the rate of accumulation for the chemical compound of interest, *C* is the concentration data of the target chemical compound [ng⋅g−1].

The rate estimation model had as a starting point the one-dimensional transport-reaction equation for dissolved compounds presented by Lettmann et al. [26]. In this chapter the same type of equation was used but this time the equation is based on the main factors that can influence in some way the assimilation rate of a chemical compound in a vegetal organism specifically in a mushroom body. Our model was supported by concentration data (*C*) of the target compounds, which were measured in the laboratory from cross-sections taken at every 2 mm over the whole body of the studied mushroom species. Also, the concentration measurements correspond to cross-sections taken at every 2 mm, and each section was divided into three concentric subintervals with regard to diameter.

The goal of the first step is to approximate *R* using the left-hand side of Eq. (1). The approximation of differential operators from the left side of the proposed equation has been solved using smoothing spline functions [27, 28].

**Figure 2.** Chemical compound concentration variations in different anatomical compartments**:** (*a*) concentration variation in the first anatomical compartment (basal bulb) of the mushroom; (*b*) concentration variation in the second anatomical compartment (stipe) of the mushroom; (*c*) concentration variation in the third anatomical compartment (cap) of the mushroom.

202 Numerical Simulations in Engineering and Science

Model validation was performed by solving a two-point boundary differential equation relative to Eq. (1) on the interval given by extreme values of *z* and comparing with the measured values of *C*. The numerical method for target compounds' accumulation rate validation (the solution of BVP) was implemented using MATLAB<sup>1</sup> bvp4c function [29, 30]. Good concordance was identified between the measured concentration and the concentrations computed by the solution of Eq. (1), given the rate *R* estimated during the validation process. The concordance is given by mean-square deviation. In the paper presented by Lettmann et al., [26] the approximation of the linear differential operator is performed by finite differences, while in our case its approximation was done through smoothing spline. Also, the rate estimation was generated randomly while in our case rate estimation was based on experimental data obtained in the laboratory. Their work, due to the nature of the practical problem, has no constraint on volume while in our case we were limited to the relative small volume and dimensions of the studied mushroom species.
