# Approximation of the Riesz-Caputo Derivative by Cubic Splines
## 3 Numerical Results
### Example 3  
Here, \(0<\gamma<2\). We set the function \(g(x)\) in order to obtain the periodic solution \(y(x)=\sin(\omega x)\) with \(\omega=\pi,5\pi\). For \(0<\gamma<1\) in the boundary conditions, we set \(\rho_{10}=\zeta_{10}=1\) with \(c_{1}=\sin(\omega)\), while for \(1<\gamma<2\), we set \(\rho_{20}=\zeta_{10}=c_{1}=0\), \(\rho_{10}=\zeta_{20}=1\), \(c_{2}=\sin(\omega)\). The analytical and the numerical solutions are shown in Figure 4 together with the error \(e(x)=y(x)-y_{h}(x)\). In Tables 3 and 4, the infinity norm of the error for different values of \(\gamma\) and \(h\) is listed. As expected, the most oscillatory solution, which is the hardest function to approximate, requires a small step \(h\) to obtain a small error. We also show how the left and right contributions of the Riesz-Caputo derivative behave for this periodic function in the case \(0<\gamma<1\) (Figure 5) and \(1<\gamma<2\) (Figure 6). The plots show that when \(0<\gamma<1\), the limit of the Riesz-Caputo derivative for \(\gamma\to 1\) approaches the ordinary first derivative (in this case \(y^{\prime}(x)=\cos(\omega x)\)); it is the same case for the left and right contributions, the latter with a minus sign due to the factor \((-1)^{m}\). Similarly, when \(1<\gamma<2\), the Riesz-Caputo derivative approaches \(y^{\prime\prime}(x)=-\sin(\omega x)\) for \(\gamma\to 2\), and for this case (\(m=2\)), the left and right contributions appear with the same sign. \begin{table}
\begin{tabular}{c c c c} \hline \(\gamma\) & \(\mathbf{0.25}\) & \(\mathbf{0.5}\) & \(\mathbf{0.75}\) \\ \hline \(\|e_{h}\|\) & \(4.36\times 10^{-14}\) & \(1.38\times 10^{-14}\) & \(1.24\times 10^{-14}\) \\ \hline \end{tabular}
\end{table} 
Table 1: Example 1: The infinity norm of the error \(\|e_{h}\|\) for \(h=1/8\). \begin{table}
\begin{tabular}{c c c c c c} \hline \(\gamma\) & \(\mathbf{0.3}\) & \(\mathbf{0.6}\) & \(\mathbf{0.9}\) & \(\mathbf{1.2}\) & \(\mathbf{1.5}\) & \(\mathbf{1.8}\) \\ \hline \(h=\frac{1}{8}\) & \(4.53\times 10^{-5}\) & \(1.61\times 10^{-5}\) & \(1.79\times 10^{-5}\) & \(1.59\times 10^{-4}\) & \(3.24\times 10^{-4}\) & \(2.49\times 10^{-3}\) \\ \(h=\frac{1}{10}\) & \(2.48\times 10^{-6}\) & \(9.18\times 10^{-7}\) & \(1.07\times 10^{-6}\) & \(1.54\times 10^{-5}\) & \(4.91\times 10^{-5}\) & \(5.14\times 10^{-4}\) \\ \(h=\frac{3}{10}\) & \(1.34\times 10^{-7}\) & \(5.36\times 10^{-8}\) & \(6.39\times 10^{-8}\) & \(1.54\times 10^{-6}\) & \(7.37\times 10^{-6}\) & \(1.05\times 10^{-4}\) \\ \(h=\frac{1}{64}\) & \(7.29\times 10^{-9}\) & \(3.20\times 10^{-9}\) & \(3.72\times 10^{-9}\) & \(1.59\times 10^{-7}\) & \(1.10\times 10^{-6}\) & \(2.15\times 10^{-5}\) \\ \(h=\frac{1}{128}\) & \(1.35\times 10^{-9}\) & \(2.64\times 10^{-10}\) & \(2.32\times 10^{-10}\) & \(1.72\times 10^{-8}\) & \(1.64\times 10^{-7}\) & \(4.37\times 10^{-6}\) \\ \hline \end{tabular}
\end{table} 
Table 2: Example 2: The infinity norm of the error \(\|e_{h}\|\) for different values of \(\gamma\) and \(h\). \begin{table}
\begin{tabular}{c c c c c} \hline \(\gamma\) & **0.4** & **0.8** & **1.2** & **1.6** \\ \hline \(h=\frac{1}{8}\) & \(1.14\times 10^{-1}\) & \(6.78\times 10^{-2}\) & \(2.70\times 10^{-1}\) & \(1.46\times 10^{0}\) \\ \(h=\frac{1}{16}\) & \(5.79\times 10^{-3}\) & \(3.58\times 10^{-3}\) & \(5.81\times 10^{-3}\) & \(8.21\times 10^{-2}\) \\ \(h=\frac{3}{12}\) & \(1.77\times 10^{-4}\) & \(1.24\times 10^{-4}\) & \(1.04\times 10^{-3}\) & \(6.95\times 10^{-3}\) \\ \(h=\frac{1}{64}\) & \(6.13\times 10^{-6}\) & \(6.50\times 10^{-6}\) & \(1.59\times 10^{-4}\) & \(8.58\times 10^{-4}\) \\ \(h=\frac{1}{128}\) & \(3.33\times 10^{-7}\) & \(4.43\times 10^{-7}\) & \(2.31\times 10^{-5}\) & \(1.25\times 10^{-4}\) \\ \hline \end{tabular}
\end{table} 
Table 4: Example 3: The infinity norm of the error \(\|e_{h}\|\) for different values of \(\gamma\) and \(h\) when \(\omega=5\pi\). Figure 4: Example 3. Panel **(a)**: The analytical solution (black line) and the numerical solution (red line) for \(h=\frac{1}{4}\) when \(\omega=\pi\), \(\gamma=0.8\).