# Adaptive Piecewise Poly-Sinc Methods for Ordinary Differential Equations
## 4 Adaptive Piecewise Poly-Sinc Algorithm
### Error Analysis  
We state below the main theorem. **Theorem 3** (Estimate of Upper Bound [25]). : _Let \(y\) be in \(\mathbb{M}_{\mathtt{a}_{\mathtt{s}},\beta_{\mathtt{s}}}(\varphi)\), analytic and bounded in \(D_{2}\), and let \(y_{h}^{(i)}(x)\) be the piecewise Poly-Sinc approximation in the \(i\)-th iteration. Let \(\xi_{i}=\arg\max_{k}\left|\mathsf{Len}\left(I_{k}^{(i)}\right)\right|\) be the index of the largest partition in the \(i-\)th iteration and \(\mathsf{Len}(I_{k}^{(i)})\) be thelength of the \(k-\)th partition in the \(i-\)th iteration. Let \(K_{i}\) be the number of partitions in the \(i-\)th iteration. Then, there exists a constant \(A\), independent of the \(i-\)th iteration, such that_  
\[\max_{x\in[a,b]}\left|y(x)-y_{h}^{(i)}(x)\right|\leq K_{i}\,E_{i},\]  
_where \(E_{i}=\frac{A}{\left(2r_{\xi_{i}}\right)^{m_{\xi_{i}}}}\,\lambda^{m_{\xi_{i}} (i-1)}(b-a)^{m_{\xi_{i}}}\)._  
For fitting purposes, we compute the mean value of the error estimate, i.e.,  
\[\max_{x\in[a,b]}\frac{1}{K_{i}}\left|y(x)-y_{h}^{(i)}(x)\right|\leq E_{i}.\]  
We state the following theorem on collocation. ``` input :Global partition \([a,b]\), threshold \(\varepsilon_{\text{stop}}\), \(N\) output :S: set of points \(\kappa\): number of iterations \(\mathsf{R}=\{\overline{R_{i}}\}_{i=1}^{\kappa}\): set of mean values of \(\left\|R_{k}^{(i)}(x)\right\|_{L^{2}_{t}(l^{(i)}_{k})}\), \(k=1,\dots,K_{i}\), \(i=1,\dots,\kappa\) \(y_{\text{c}}^{(\kappa)}(x)\): approximate solution
1 init :S = {}, \(\mathsf{P}=\{x^{0}=a,x^{1}=b\}\), \(\mathsf{R}=\{\}\)
2 Start with \(2N+1\) points in the global interval \([a,b]\). Append the points to S and P. (Solve). Compute \(y_{\text{c}}^{(i)}(x)\) for IVP (Sections 3.1 and 3.2) or BVP (Section 3.3). (Estimate). Compute \(\left\{\|R^{(1)}(x)\|\right\}_{k=1}^{K_{1}=1}\) over the global interval \([a,b]\). Append the mean value \(\overline{R_{1}}\) in R. (Mark). Set \(\mathcal{I}_{1}=1\). (Refine). Use the points in the partition with index \(\mathcal{I}_{1}=1\) as partitioning points. Insert \(2N+1\) Sinc points in each of the newly created partitions. Update S and P. Set \(i=2\). while\(\overline{R_{i-1}}>\varepsilon_{\text{stop}}\)do (Solve). Compute \(y_{\text{c}}^{(i)}(x)\) for IVP (Sections 3.1 and 3.2) or BVP (Section 3.3). (Estimate). Compute \(\left\{\left\|R_{k}^{(i)}(x)\right\|_{L^{2}(l^{(i)}_{k})}\right\}_{k=1}^{K_{ i}}\) over \(K_{i}\) partitions. Compute the sample mean value \(\overline{R_{i}}\) and the sample standard deviation \(s_{i}\). Append \(\overline{R_{i}}\) in R. (Mark). Identify the partitions with indices \(\mathcal{I}_{i}=\left\{j:\left\|R_{j}^{(i)}(x)\right\|_{L^{2}(l^{(i)}_{j})}- \overline{R_{i}}\geq\omega_{i}\,s_{i}\right\}\), \(j=1,\dots,K_{i}\). (Refine). collocation method in Section 3. Let \(m_{k}^{(i)}\) be the number of points in the \(k-\)th partition for the \(i-\)th iteration and \(n_{i}=\sum_{k=1}^{K_{i}}m_{k}^{(i)}\) be the total number of points in the \(i-\)th iteration. Let \(\mathbf{c}_{i}=(c_{1,1}^{(i)},\ldots,c_{1,m_{1}^{(i)}}^{(i)},\ldots,c_{1,K_{i}^{ \prime}}^{(i)},\ldots,c_{1,m_{k_{i}}^{(i)}}^{(i)})\) be the \(n_{i}\times 1\) vector of estimated coefficients in \(y_{\mathrm{c}}^{(i)}(x)\) and \(\mathbf{y}_{i}=y(x_{j,k}^{(i)})\) be the corresponding vector of the exact values of \(y(x)\) at the Sinc points \(\{x_{j,k}^{(i)}\}\) with_

\[\|\mathbf{c}_{i}-\mathbf{y}_{i}\|_{1}<\delta,\qquad i=1,2,\ldots,\kappa.\]

_Then,_

\[\max_{x\in[a,b]}|y(x)-y_{\mathrm{c}}^{(i)}(x)|\leq K_{i}\,E_{i}+\delta\bigg{(} \frac{1}{\pi}\ln(\overline{\overline{m}})+1.07618\bigg{)},\]

_where \(\overline{\overline{m}}=\max_{k,i}\{m_{k}^{(i)}\}\) and \(\|\cdot\|_{1}\) denotes the \(\ell_{1}\) norm ([58] Ch. 5)._

Proof. : The derivation follows that of ([30] SS 1.5.6).