Exercise 8.3 Examples – 12th Class Math New Book (The Trapezoidal Rule)

By Ehsan Ahmed · updated
Exercise 8.3 solved examples thumbnail for 12th class math chapter 8 (Numerical Solutions of Nonlinear Equations)

Solved examples of Exercise 8.3 (The Trapezoidal Rule): the 2 textbook examples, Chapter 8: Numerical Solutions of Nonlinear Equations, 12th class Mathematics new book (Punjab, PECTAA 2026-27), worked step by step.

Tap an example to open or close it.
Example 6Use trapezium rule to approximate the definite integral $\int_0^1e^{-x^2}\,dx$ by dividing the closed interval $[0,1]$ into $7$ subintervals of equal length.
Formula used
$$h=\frac{b-a}n$$
$$x_i=a+ih$$
$$\begin{aligned}&\int_a^bf(x)\,dx\approx\frac h2\big[f(x_0)\\&\ +2\big(f(x_1)+\cdots+f(x_{n-1})\big)\\&\ +f(x_n)\big]\end{aligned}$$

Solution:

Given:

$$f(x)=e^{-x^2}$$
$$a=0,\qquad b=1,\qquad n=7$$

Continuity:

$$\lim_{x\to c}e^{-x^2}=f(c)\quad\forall\,c\in[0,1]$$

So $f$ is continuous on $[0,1]$.

Step size:

$$\begin{aligned}h&=\frac{b-a}n\\[6pt]&=\frac{1-0}7\\[6pt]&=\frac17\\[6pt]&\approx 0.143\end{aligned}$$

The points are $x_i=a+ih$. The values of $f(x)$ are rounded to 4 decimal places.

$x$$f(x)$
$x_{0}$$0$1.0000
$x_{1}$$\frac17$0.9798
$x_{2}$$\frac27$0.9216
$x_{3}$$\frac37$0.8322
$x_{4}$$\frac47$0.7214
$x_{5}$$\frac57$0.6004
$x_{6}$$\frac67$0.4797
$x_{7}$$1$0.3679

Add the values that are taken twice, from $f(x_1)$ to $f(x_{6})$.

$$\begin{aligned}S&=0.9798+0.9216+0.8322\\&\quad+0.7214+0.6004+0.4797\\[6pt]&=4.5351\end{aligned}$$

Apply the trapezium rule.

$$\begin{aligned}&\int_0^1e^{-x^2}\,dx\\[6pt]&\approx\frac h2\big[f(x_0)+2S+f(x_{7})\big]\\[6pt]&=\frac{1/7}2\big[1+2(4.5351)+0.3679\big]\\[6pt]&=\frac1{14}\,(10.4381)\\[6pt]&\approx 0.7456\end{aligned}$$
Answer $\int_0^1e^{-x^2}\,dx\approx0.7456$
Example 7Use Trapezium Rule to approximate the definite integral $\int_0^6\frac x{1+x^2}\,dx$ by subdividing the closed interval $[0,6]$ each of length $1$. Also compare the answer by solving the integral using the Fundamental Theorem of Calculus.
Formula used
$$n=\frac{b-a}h$$
$$x_i=a+ih$$
$$\begin{aligned}&\int_a^bf(x)\,dx\approx\frac h2\big[f(x_0)\\&\ +2\big(f(x_1)+\cdots+f(x_{n-1})\big)\\&\ +f(x_n)\big]\end{aligned}$$
$$\int\frac{f'(x)}{f(x)}\,dx=\ln|f(x)|+c$$
$$\int_a^b\phi(x)\,dx=\big[F(x)\big]_a^b$$

Solution:

Given:

$$f(x)=\frac x{1+x^2}$$
$$a=0,\qquad b=6,\qquad h=1$$

Continuity:

$$\lim_{x\to c}\frac x{1+x^2}=f(c)\quad\forall\,c\in[0,6]$$

So $f$ is continuous on $[0,6]$.

Number of subintervals:

$$\begin{aligned}n&=\frac{b-a}h\\[6pt]&=\frac{6-0}1\\[6pt]&=6\end{aligned}$$

The points are $x_i=a+ih$. The values of $f(x)$ are rounded to 4 decimal places.

$x$$f(x)$
$x_{0}$$0$0.0000
$x_{1}$$1$0.5000
$x_{2}$$2$0.4000
$x_{3}$$3$0.3000
$x_{4}$$4$0.2353
$x_{5}$$5$0.1923
$x_{6}$$6$0.1622

Add the values that are taken twice, from $f(x_1)$ to $f(x_{5})$.

$$\begin{aligned}S&=0.5+0.4+0.3\\&\quad+0.2353+0.1923\\[6pt]&=1.6276\end{aligned}$$

Apply the trapezium rule.

$$\begin{aligned}&\int_0^6\frac x{1+x^2}\,dx\\[6pt]&\approx\frac h2\big[f(x_0)+2S+f(x_{6})\big]\\[6pt]&=\frac12\big[0+2(1.6276)+0.1622\big]\\[6pt]&=0.5\,(3.4174)\\[6pt]&=1.7087\end{aligned}$$

Exact value by the Fundamental Theorem of Calculus:

$$\begin{aligned}\int_0^6\frac x{1+x^2}\,dx&=\frac12\int_0^6\frac{2x}{1+x^2}\,dx\\[6pt]&=\frac12\Big[\ln|1+x^2|\Big]_0^6\end{aligned}$$
$$\begin{aligned}&=\frac12\ln(1+36)-\frac12\ln(1+0)\\[6pt]&=\frac12\ln37-0\\[6pt]&\approx0.5(3.6109)\\[6pt]&\approx1.8055\end{aligned}$$

Comparison: the difference between the two values is

$$\left|1.7087-1.8055\right|=0.0968$$

The difference can be made smaller by taking more subintervals.

Answer Trapezium rule: $\approx1.7087$. Exact value: $\frac12\ln37\approx1.8055$. Difference: about $0.097$.

Popular posts from this blog

Chapter 6 Conic Section Notes – 12th Class Math New Book

Exercise 3.3 Solutions – 12th Class Math New Book (Integration by Parts)

Chapter 11 MCQs and Short Questions – 12th Class Math New Book