Question 8.12: Use trap to find the integral using the tabulated data in Ta...

Use trap to find the integral using the tabulated data in Table 8.5.

Table 8.5 Tabulated data for Example 8.12.
1 0.75 0.5 0.25 0 x
0.3679 0.5698 0.7788 0.9394 1 y

A MATLAB script to solve this problem is:

1 function matlab_trapz
2 y = [1.0000, 0.9394, 0.7788, 0.5698, 0.3679];
3 I = trapz(y)/4

Our data have a spacing Δx = 1/4, so we have to multiply the result from trapz by the spacing Δx. The data in Table 8.5 are simply the values of y = e^{−x^2} , so this problem is equivalent to solving Eq. (8.7.1). The result of the five-point multiple trapezoidal rule, I = 0.7430, is not so far from the result from Example 8.7.1, I = 0.7468.

I = ∫^1_0 e^{−x^2} dx         (8.7.1)

Related Answered Questions

Question: 8.5

Verified Answer:

With x_2 = x_0 + 2h and x_1 ...
Question: 8.6

Verified Answer:

We can begin by applying Eq. (8.2.52) to get conve...
Question: 8.2

Verified Answer:

The recursion relationship gives us f[x_3, ...
Question: 8.4

Verified Answer:

With x_i = x_0 + h  and  x_j = x_0,...
Question: 8.1

Verified Answer:

Let x_i = x_2, x_j = x_1,  and  x_k = x_0[/...