Question
Question: How do you use the trapezoidal rule with \(n=2\) to approximate the area under the curve \(y=\dfrac{...
How do you use the trapezoidal rule with n=2 to approximate the area under the curve y=x21 from 1 to 3?
Solution
In the question, we have to find the area under the curve y=x21 from 1 to 3 using the trapezoidal rule. Firstly, we have to calculate the step-size by using the formula h=nb−a, where n is given in the question as n=2, and a and b are the lower and the upper limits of the integration. With the help of the step size value, we can calculate x0,x1,x2, where x0=a and xi=a+ih. From these values of xn, we can calculate yn using yn=f(xn). Then finally the value of the integral will be calculated by using the formula ∫abf(x)dx=h(2y0+yn+y1+y2+.....+yn).
Complete step-by-step answer:
We know that the area under a curve is calculated by integrating it with respect to x. According to the question, the function is
⇒y=x21.......(i)
The given limits are from 1 to 3. Therefore, the area under the given curve will be given by the integral
⇒A=∫13x21dx
Now, the step size is given by
⇒h=nb−a
Substituting a=1, b=3 and n=2, we get
⇒h=23−1⇒h=22⇒h=1......(iii)
Now, we know that
⇒xi=a+ih
Substituting i=0 we get
⇒x0=a+(0)h⇒x0=a⇒x0=1
Now, substituting i=1 we get
⇒x1=a+(1)h⇒x1=1+(1)(1)⇒x1=2
Now substituting i=2 we get
⇒x2=a+2h⇒x2=1+2(1)⇒x2=3
Now, the values of yi are given by
⇒yi=f(xi)⇒yi=xi21
Substituting i=0 we get
⇒y0=x021⇒y0=121⇒y0=1......(iv)
Similarly, we get