Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

PART A: Write a function in Matlab that computes a numerical integral using the composite Boole's rule with the definition: function numI = compBoole(f, a,

PART A: Write a function in Matlab that computes a numerical integral using the composite Boole's rule with the definition:

function numI = compBoole(f, a, b, N)

where the inputs are:

f: function to be integrated

a, b: left and right interval endpoints (bounds)

N: number of intervals between a and b

numI: the output, or the returned numerical integral

PART B: use this function to compute the integral where

f = e^(-(x^2)/2)

(a, b) = (3,3)

N = 5*(2^k) where k = 1,2,3,4,5

The exact integral is sqrt(2pi)erf(3*sqrt(2)/2) where erf is a matlab built-in function. Print out the number of divided intervals along with the absolute numerical error. Plot the error against the divided interval length (b-a)/N = 6/N using loglog scale. Numerically compute the rate of convergence for this rule. You shall observe the rate is approximately 6.

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

Advances In Databases 11th British National Conference On Databases Bncod 11 Keele Uk July 7 9 1993 Proceedings Lncs 696

Authors: Michael F. Worboys ,Anna F. Grundy

1993rd Edition

3540569219, 978-3540569213

More Books

Students also viewed these Databases questions

Question

6. Identify characteristics of whiteness.

Answered: 1 week ago

Question

9. Explain the relationship between identity and communication.

Answered: 1 week ago