\documentclass[a4paper,12pt]{article}
\newcommand{\ds}{\displaystyle}
\newcommand{\un}{\underline}
\parindent=0pt
\begin{document}

{\bf Question}

Calculate $\ds\int_0^2 \ds\frac{\,dx}{1+x^3}$ to 3 S.F. using
\begin{description}
\item[(i)]
the trapezium rule with five ordinates,

\item[(ii)]
Simpson's rule with five ordinates.

\end{description}
\medskip

{\bf Answer}
\begin{description}
\item[(i)]

Trapezium rule with 5 ordinates

Area $\approx \ds\frac{d}{2}(y_1+2y_2+2y_3+2y_4+y_5)$

Range of integration $=0 \rightarrow 2 \Rightarrow$ divide into
\un{4} equal segments $\Rightarrow
d=\ds\frac{2}{4}=\ds\frac{1}{2}=0.5$

$y=\ds\frac{1}{1+x^3}$

\begin{tabular} {|c|c|c|c|c|c|}
\hline $x$ & 0 & 0.5 & 1.0 & 1.5 & 2.0\\ \hline $y$ & 1.000 &
0.889 & 0.500 & 0.229 & 0.111\\ \hline \end{tabular}

$\begin{array} {rcl} \rm{Area} & = &
\ds\frac{0.5}{2}(1.000+0.111+2\underbrace{(0.889+0.500+0.229)})\\
& & \ \ \ \ \ \ \ \ y_1\ \ \ \ \ y_5 \ \ \ \ \ y_2+y_3+y_4\\ & = &
\un{1.087 = 1.09 \rm{to\ 3s.f.}} \end{array}$

\item[(ii)]
Simpson's rule with 5 ordinates

Area $=\ds\frac{h}{3}(y_1+4y_2+2y_3+4y_4+y_5)$

Again divide into 4 equal segments $\Rightarrow h=0.5$

Thus we will have the same $x$ and $y$ values. So we can use the
table above.

$\begin{array} {rcl} \rm{Area} & = &
\ds\frac{0.5}{3}\times(\underbrace{1.000+0.111}+4(\underbrace
{0.889+0.229})+2\times 0.500)\\ & & \ \ \ \ \ \ \ \ \ \ \ \ \ \
y_1+y_5 \ \ \ \ \ \ \ \ \ \ \ \ y_2+y_4 \ \ \ \ \ \ \ \ \ \ \ \ \
\ \ \ \ \ \ \ y_3\\ & = & \un{1.097=1.10 \rm{to 3s.f.}}
\end{array}$

[Actual value $=\ds\frac{\pi}{2\sqrt 3}+\ds\frac{\log
3}{6}=\un{1.09 \rm{to\ 3s.f.}}$]

Note that Simpson's rule isn't so good here due to rounding
errors.
\end{description}
\end{document}
