<html><head><meta name="color-scheme" content="light dark"></head><body><pre style="word-wrap: break-word; white-space: pre-wrap;">\documentclass[a4paper,12pt]{article}
\newcommand{\ds}{\displaystyle}
\newcommand{\un}{\underline}
\parindent=0pt
\begin{document}

{\bf Question}

Let

$$J=\ds\int_0^1 \ds\frac{\sin x}{1+x^3} \,dx,$$

where the integral limits are in \un{radians}.

Carefully explaining your method, calculate $J$ to 4 decimal
places using

\begin{description}
\item[(i)]
the trapezium rule with 5 ordinates,

\item[(ii)]
Simpson's rule with 5 ordinates.

\end{description}

Compare your answers with the exact result $J=0.346997...$

{\bf{Note:}} Marks will only be awarded if sufficient working is
shown.

\medskip

{\bf Answer}

$$J=\ds\int_0^1\ds\frac{\sin x}{1+x^3} \,dx$$

\begin{description}
\item[(i)]
Trapezium rule with 5 ordinates:

$J \approx \ds\frac{d}{2}(y_1+2y_2+2y_3+2y_4+y_5)$

where $d=\ds\frac{1-0}{5-1}=\ds\frac{1}{4}$

$\begin{array} {ll} x_1=0 &amp; x_4=\ds\frac{3}{4}\\
x_2=\ds\frac{1}{4} &amp; x_5=1\\ x_3=\ds\frac{1}{2}
\end{array}$

$$y_i=f(x_i);\ \ f(x)=\ds\frac{\sin x}{(1+x^3)}$$

\begin{tabular} {c|c|c|c|c|c|}
$x$ &amp; 0 &amp; $\frac{1}{4}$ &amp; $\frac{1}{2}$ &amp; $\frac{3}{4}$ &amp; 1\\

\hline

$y$ &amp; 0 &amp; 0.243598 &amp; 0.426156 &amp; 0.479394 &amp; 0.420735

\end{tabular}

\begin{eqnarray*} J &amp; \approx &amp;
\ds\frac{1}{8}(0.420735+2\times(0.479394+0.426156 + 0.243598)+0)\\
&amp; = &amp; \un{0.339879} \end{eqnarray*}

\newpage
NB working

\begin{eqnarray*} &amp; = &amp; \ds\frac{1}{8} \times (0.420735+2.2983)\\ &amp;
= &amp; \ds\frac{1}{8} \times 2.71903\\ &amp; = &amp; 0.339879 \end{eqnarray*}



\item[(ii)]
Simpson with 5 ordinates

$J \approx \ds\frac{h}{3}(y_1+4y_2+2y_3+4y_4+y_5)$

4 equal segments $\Rightarrow h=\ds\frac{1}{4}$ as above

and we have the \un{same} $y_i$s as above.

Hence

\begin{eqnarray*} J &amp; \approx &amp;
\ds\frac{1}{12}\times(0+4\times(0.243598+0.479394)\\ &amp; &amp; +2\times
(0.426156)+0.420735)\\ &amp; = &amp; 0.347085\\ &amp; = &amp; \un{0.4407}
\end{eqnarray*}

NB working

\begin{eqnarray*} &amp; &amp; \ds\frac{1}{12} \times(2.89197+0.852312 +
0.420735)\\ &amp; = &amp; \ds\frac{1}{12} \times 4.16502\\ &amp; = &amp; 0.347085
\end{eqnarray*}

Actual=0.346997 to get 6dp

$\Rightarrow$ Trapezium is accurate to $2\%$ or 1dp and Simpson is
accurate to $0.02\%$ or 3dp.

\end{description}

\end{document}
</pre></body></html>