∫abf(t)dt
≈3Δt(f(t0)+4f(t1)+2f(t2)+4f(t3)
+2f(t4)+...+4f(tn−2)+2f(tn−1)+f(tn))
Δt=nb−a We have that f(t)=sint,a=0,b=π/2,n=4.
Therefore
Δt=4π/2−0=π/8Divide the interval [0,π/2] into n=4 subintervals of the length Δt=π/8 with the following endpoints: a=0,π/8,π/4,3π/8,π/2=b.
Evaluate the function at these endpoints
f(t0)=f(0)=sin(0)=0
4f(t1)=4f(π/8)=4sin(π/8)
≈1.530733729460359
2f(t2)=2f(π/4)=2sin(π/4)=2
≈1.414213562373095
4f(t3)=4f(3π/8)=4sin(3π/8)
≈3.695518130045147
f(t4)=f(π/2)=sin(π/2)=1
Therefore
∫0π/2sintdt
≈(π/12)(0+1.530733729460359
+1.414213562373095
+3.695518130045147+1)
≈1.000134584974194
∫0π/2sintdt≈1.000134584974194
Comments