1
$\begingroup$

In a trapezoidal rule problem I got following question:

"Evaluate the above integral using trapezoidal rule with five points."

My confusion is here what we take for the value of $n$ is it $5$ or $4$. I'm thinking like suppose if you take $5$ points $1,2,3,4,5$ then there would be $4$ sections/intervals so that's why $n$ should be $4$. Can anyone help me in it that what would be $n$'s value and why? Please provide explanation too if possible. Thanks!

Note: $h=\frac{b-a}{n}$ where $b$ and $a$ are limits.

  • 0
    B$u$t I've one more confusion that In Trapezoidal or Simpson rule Do we need to integrate the function first or we can directly apply the values to the respective function equation to get the approximation?2012-12-14

3 Answers 3

1

It seems like your $n$ equals $4$. As you say in your question, you consider $h = \frac{b-a}n$, that gives you the evaluation points $x_i = a + ih$, $0 \le i \le n$ (such that $x_0 = a$ and $x_n = b$), so altogether five points, as you correctly say.

  • 0
    @martini thanks for the reply !2012-12-14
1

There is some ambiguity, texts usually say something like "with $n=8$." But $5$ points is $5$ points, and it would be unreasonable not to count the endpoints. So here $n=4$.

If we are integrating $f(x)$ from $a$ to $b$, we would use $\frac{\Delta x}{2}\left(f(x_0)+2f(x_1)+2f(x_2)+2f(x_3)+f(x_4)\right),$ where $\Delta x=\dfrac{b-a}{4}$ and $x_i=a+(\Delta x)i$.

  • 0
    Hey Andre Thanks for reply!2012-12-14
0

When you have 5 integration points you will divide you integration interval in 4 sub-intervals, and by definition $n$ is the number of sub-intervals, which is 4 in this case.