## 3 Materials and Methods  
In this section, the algorithm designed to minimize a box-constrained blackbox optimization problem involving a composite objective function is described. The algorithm will be used to perform our comparison between the calculus-based approach and the non-calculus-based approach in Section 4. Let \(\Delta_{max}>0\) be the maximum trust-region radius allowed in the DFTR algorithm. The minimization problem considered is \[\min_{\ell\leq x\leq u}F(x) \tag{5}\]  
where \(F:\text{dom}\,F\subseteq\mathbb{R}^{n}\to\mathbb{R}\) is twice continuously differentiable on  
\[\bigcup_{\ell\leq x\leq u}B(x;\Delta_{\text{max}}) \tag{6}\]  
where \(\ell,u\in\mathbb{R}^{n}\), and the inequalities \(\ell\leq x\leq u\) are taken component-wise. It is assumed that \(F\) is a composite function obtained from two blackboxes with similar computational costs. Before introducing the pseudo-code of the algorithm, let us clarify some details about the model function and the _trust-region sub-problem_. The model function built at an iteration \(k\) will be denoted by \(m^{k}\). The model is a quadratic function that can be written as  
\[m^{k}(x^{k}+s^{k})=F(x^{k})+(g^{k})^{\top}s^{k}+\frac{1}{2}(s^{k})^{\top}H^{k} s^{k}, \tag{7}\]  
where \(g^{k}\) denotes an approximation of the gradient \(\
abla F(x^{k})\), \(H^{k}\) is a symmetric approximation of the Hessian \(\
abla^{2}F(x^{k})\), and \(s^{k}\in\mathbb{R}^{n}\) is the independent variable. When a calculus-based approach is used, both \(g^{k}\) and \(H^{k}\) are built by using the calculus-based approach presented earlier in Section 2. Similarly, if the non-calculus-based approach is used, then both \(g^{k}\) and \(H^{k}\) are built with the non-calculus approach. We define the sampling radius, \(\Delta_{s}^{k}\), as the maximum distance between the incumbent solution \(x^{k}\) and a sampling point used to build the approximations \(g^{k}\) and \(H^{k}\). The trust-region subproblem solved in the DFTR algorithm (Step 2 of Algorithm 1) at an iteration \(k\) is  
\[\underset{s\in\mathbb{R}^{n}}{\text{minimize}} m^{k}(x^{k}+s)=F(x^{k})+(g^{k})^{\top}s+\frac{1}{2}(s)^{\top}H^{k}s\] (8) subject to \[\|s\|\leq\Delta^{k},\quad\text{and}\quad\ell\leq x^{k}+s\leq u.\]  
where \(\Delta^{k}>0\) is the trust-region radius at an iteration \(k\). Recall that the first-order necessary condition for solving (5) is that the _projected gradient_ is equal to zero. The projected gradient of the model function \(m^{k}\) at \(s=0\) onto the feasible box, which is delimited by \(\ell\) and \(u\) where \(\ell<u\), is defined by  
\[\pi_{m}^{k}=x^{k}-\text{Proj}_{[\ell,u]}(x^{k}-\
abla m^{k}(x^{k}))=x^{k}- \text{Proj}_{[\ell,u]}(x^{k}-g^{k})\]  
where the projection operator, \(\text{Proj}_{[\ell,u]}(y)\), is defined component-wise by  
\[[\text{Proj}_{[\ell,u]}(y)]_{i}= \begin{cases}\ell_{i}&\text{if}\quad y_{i}< \ell_{i},\\ u_{i}&\text{if}\quad y_{i}>u_{i},\\ y_{i}&\text{if}\quad\text{otherwise}.\end{cases}  \tag{9}\]  
Similarly, we define the projected gradient of the objective function at \(s=0\) onto the box by  
\[\pi_{F}^{k}=x^{k}-\text{Proj}_{Box}(x^{k}-\
abla F(x^{k})).\]  
Next, the pseudo-code of our DFTR algorithm is presented. This is essentially the pseudo-code in [34] (Algorithm 4.1), but adapted for a box-constrained problem (see also Algorithm 10.1 in [35] and Algorithm 2.1 in [61]). The algorithm is a first-order method in the sense that it converges to a first-order critical point. Several details about the pseudo-code require some clarification. The procedure employed in our algorithm to build the model function at an arbitrary iteration \(k\) guarantees that the model \(m^{k}\) is fully linear on \(B(x^{k};\Delta^{k})\). To see this, first note that when a model \(m^{k}\) is built in Algorithm 1, we always have that the sampling radius \(\Delta_{s}^{k}\leq\Delta^{k}\). It is known that the gradient of a quadratic interpolation function built with \((n+1)(n+2)/2\) sample points poised for quadratic interpolation is \(\mathcal{O}(\Delta_{s}^{2})\).