Question: Compute I = Z pi 2 0 x 1 . 5 cos ( x 2 ) dx using the methods requested below. Parts (

Compute
I =
Z \pi
2
0
x
1.5
cos(x
2
) dx
using the methods requested below. Parts (a) through (d) must be done by hand; you can use
Python to help with calculations if you do not use any of the numerical integration libraries:
(a)(2 pts) Trapezoid rule using 4 equal-sized panels of width h =
\pi
8
on the interval [0,
\pi
2
]
(b)(2 pts) Midpoint rule using the midpoints of the panels described in part (a)
(c)(2 pts) Trapezoid rule with end correction using the same 4 panels
(d)(2 pts) Simpsons rule using the same 4 panels (use 2 Simpson panels of size Simpson =2h,
where h is the grid spacing of the panels from part (a)).
(e)(2 pts) Use scipy.integrate.quad with default error tolerances to compute the integral.
Which of your answers in parts (a) through (d) most closely matches the value computed
here?

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!