Solution (a) We partition the interval [0,π] into four subintervals, each of width Δx=π−04=π4. [0,π4][π4,π2][π2,3π4][3π4,π]
510
The values of f(x)=sinx corresponding to each endpoint are f(0)=0f(π4)=√22f(π2)=1f(3π4)=√22f(π)=0
See Figure 14. Now we use the Trapezoidal Rule: ∫π0sinxdx≈π−02⋅4[sin(0)+2sin(π4)+2sin(π2)+2sin(3π4)+sin(π)]=π8[0+2(√22)+2(1)+2(√22)+0]=π8(2+2√2)=π4(1+√2)≈1.896
To approximate ∫π0sinxdx using six subintervals, we partition [0,π] into six subintervals, each of width Δx=π−06=π6, namely, [0,π6][π6,π3][π3,π2][π2,2π3][2π3,5π6][5π6,π]
See Figure 15. Then we use the Trapezoidal Rule. ∫π0sinxdx≈π2⋅6[0+2⋅12+2⋅√32+2⋅1+2⋅√32+2⋅12+0]=π12(4+2√3)=π6(2+√3)≈1.954
(b) The exact value of the integral is ∫π0sinxdx=[−cosx]π0=−cosπ+cos0=1+1=2
The approximation using the Trapezoidal Rule with four subintervals underestimates the integral by 0.104. The approximation using six subintervals underestimates the integral by 0.046. Notice that the approximation using six subintervals is more accurate than the approximation using four subintervals.