Question: def p2(): ''' 2) This question involves looking at the convergence properties of a well-known method for numerical integration or quadrature known as Simpson's 3/8

def p2():

'''

2) This question involves looking at the convergence properties of a well-known method for numerical integration or quadrature known as Simpson's 3/8 rule,

described by Eq.(4.2.6c) in the text, for the function f(x) = sin(x) between 0 and 1.

Your particular tasks are as follows:

- Compute the relative error in the integration estimate for panel counts of $p = 4^{n} for n in {0,1,...,9}$.

- Plot of the error as a function of sample spacing using the plot_errors() function.

- Based on your plot, identify the order of truncation error and estimate the sample spacing at which the roundoff error becomes significant.

'''

f = np.sin

i_f = lambda x: -np.cos(x)

xmin = 1e-12

xmax = 1.0

emax = 9

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 Databases Questions!