Question: I need help with this matlab problem. Consider again the error function integral from PA 6 : erf ( x ) = 2 2 0

I need help with this matlab problem. Consider again the error function integral from PA6:
erf(x)=220xe-t2dt
For this problem you'll use the following numerical integration approaches to evaluate this integral and generate values for a table similar to what you worked with in PA6.
Composite trapezoid rule (MATLAB trapz and/or cumtrapz functions).
Three point Gauss-Legendre quadrature.
MATLAB's built-in integral function (Adaptive Gauss-Kronrod Quadrature).
Write a function that receives the following single input:
A column vector of one or more x values at which erf(x) is to be computed.|
Your function should return the following outputs (in order, column vectors when input x is a vector):
The estimate(s) for erf (x) calculated using composite trapezoid rule between 0 and each of the elements in x. Evaluate the integrand at 0 and at the input x-values to compute y-values for the trapezoid rule.
The estimate(s) of erf (x) calculated using three-point Gauss-Legendre quadrature. Work by hand to develop the shifted integrand (in terms of xd) and use the appropriate constants and function evaluations.
The estimate(s) of erf(x) calculated using MATLAB's built-in integral function.
Note: The first three test cases use a scalar input for x and check each of the methods separately. Code to call your function (e)
 I need help with this matlab problem. Consider again the error

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!