## 7 Examples
The size of maximum errors and the error ratios between two approximations are also given._  
_QM: [PERSON]'s rule:_  
_According to Section 5, let us divide the interval \([0,\pi]\) into \(n\) equal subintervals of length \(h=\pi/n\), where \(n\) is an even integer number, consider the \(n+1\) abscissas \(x_{j}=h(j-1)\), \(j=1,2,\ldots,n+1\), and employ the [PERSON]'s formula_  
\[\int_{0}^{\pi}y(x)dx\approx\frac{h}{3}\Bigg{\{}y(x_{1})+4\sum_{j=2,4,6}^{n}y (x_{j})+2\sum_{j=3,5,7}^{n-1}y(x_{j})+y(x_{n+1})\Bigg{\}} \tag{45}\]  
_to approximate the integral in (42). By way of illustration, let \(n=2\). Then, Equation (42) assumes the semi-discrete form,_  
\[\tilde{u}_{2}(x)-\frac{\pi}{6}\Big{\{}\sin x\tilde{u}_{2}(0)-4\cos x\tilde{u }_{2}(\frac{\pi}{2})-\sin x\tilde{u}_{2}(\pi)\Big{\}}=1. \tag{46}\]  
_Assemble the vectors_  
\[G=\big{(} \begin{array}{cc}\frac{\pi\sin x}{6}&-\frac{2\pi\cos x}{3}\end{array}  \big{)},\quad\Psi(\tilde{u}_{2})=\left( \begin{array}{c}\tilde{u}_{2}(0)- \tilde{u}_{2}(\pi)\\ \tilde{u}_{2}(\frac{\pi}{2})\end{array} \right),\]  
_or alternatively_  
\[G=\big{(} \begin{array}{cc}\frac{\pi\sin x}{6}&-\frac{2\pi\cos x}{3}&-\frac{ \pi\sin x}{6}\end{array} \big{)},\quad\Psi(\tilde{u}_{2})=\left( \begin{array} []{c}\tilde{u}_{2}(0)\\ \tilde{u}_{2}(\frac{\pi}{2})\\ \tilde{u}_{2}(\pi)\end{array} \right),\]  
_and write Equation (46) as_  
\[T_{q}\tilde{u}_{2}=\tilde{u}_{2}-G\Psi(\tilde{u}_{2})=1. \tag{47}\] \begin{table}
\begin{tabular}{r r r r r r} \hline \hline \(n\) & \(Const\) & \(Coeff\sin x\) & \(Coeff\cos x\) & \(\epsilon_{n}=\|u-\tilde{u}_{n}\|_{\infty}\) & \(Ratio\) \\ \hline
2 & \(1.0\) & \(-1.698469\) & \(-0.401096\) & \(8.12\times 10^{-1}\) & \\
4 & \(1.0\) & \(0.013033\) & \(-0.460320\) & \(9.26\times 10^{-1}\) & \\
8 & \(1.0\) & \(-0.889403\) & \(-0.572006\) & \(1.73\times 10^{-2}\) & 53.5 \\
16 & \(1.0\) & \(-0.906036\) & \(-0.576800\) & \(1.04\times 10^{-7}\) & 166,346.2 \\ exact & \(1.0\) & \(-0.906036\) & \(-0.576800\) & & \\ \hline \hline \end{tabular}
\end{table} 
Table 1: IE (42). DKM: Taylor series. _This equation is solved by means of (5) and (6) to obtain_  
\[\hat{u}_{2}(x)=1-\frac{2\pi^{2}}{2\pi^{2}+9}\sin x-\frac{6\pi}{2\pi^{2}+9}\cos x,\]  
_which is an approximate solution of (42). Other solutions of the same type for various values of \(n\) are recorded in Table 2. Clearly, the size of the error shows that the accuracy of the solutions is \(O(h^{4})\), for which accuracy is valid throughout the interval \([0,\pi]\) and not only to the quadrature nodes._  
_In Figure 1, Taylor series and [PERSON]'s rule solutions for \(n=6\) are plotted and compared against the exact solution. The [PERSON]'s rule solution almost coincides with the exact solution. From Figure 1 and the results in Tables 1 and 2, it is implied that [PERSON]'s rule approximate solutions converge very rapidly and at a constant rate to the true solution, while Taylor series approximation yields more accurate results when an adequate number of terms (\(n=16\)) are included in the truncated series._  
**Example 2**. : _Consider the integral equation [5]_  
\[u(x)-\frac{1}{\lambda_{A}}\int_{0}^{1}e^{xt}u(t)dt=f(x),\quad\lambda_{A}\
eq 0,\quad 0\leq x\leq 1, \tag{48}\]  
_with_  
\[f(x)=e^{x}-\frac{e^{x+1}-1}{\lambda_{A}(x+1)},\] \begin{table}
\begin{tabular}{r c c c c c} \hline \(n\) & _Const_ & _Coeff_ \(\sin x\) & _Coeff_ \(\cos x\) & \(\epsilon_{n}=\|u-\tilde{u}_{n}\|_{\infty}\) & _Ratio_ \\ \hline
2 & \(1.0\) & \(-0.686838\) & \(-0.655882\) & \(2.33\times 10^{-1}\) & \\
4 & \(1.0\) & \(-0.908102\) & \(-0.578115\) & \(2.45\times 10^{-3}\) & \\
8 & \(1.0\) & \(-0.906158\) & \(-0.576878\) & \(1.45\times 10^{-4}\) & 16.9 \\
16 & \(1.0\) & \(-0.906044\) & \(-0.576805\) & \(8.91\times 10^{-6}\) & 16.3 \\ exact & \(1.0\) & \(-0.906036\) & \(-0.576800\) & & \\ \hline \end{tabular}
\end{table} 
Table 2: IE (42). QM: Simpson’s rule. Figure 1: Solution of integral Equation (42). so that (48) has the unique solution \(u(x)=e^{x}\).