Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Building The Data Lakehouse

Authors: Bill Inmon ,Mary Levins ,Ranjeet Srivastava

1st Edition

1634629663, 978-1634629669

More Books

Students also viewed these Databases questions