Question: is the half - width of the - subinterval is the number of node points are the weights are the node points for the -

is the half-width of the -subinterval
is the number of node points
are the weights
are the node points for the -subinterval.
Summing over all subintervals yields the numerical approximation of the integral . A popular quadrature method of this form is Simpson's 1/3 rule. Here, three uniformly spaced node points are used; the endpoints and the midpoint of the subinterval. The quadrature rule is:
where is the midpoint of the subinterval. Note that for this rule, the halfwidth of the subinterval is also the spacing between the node points within the subinterval.
Write a function that implements Simpson's 1/3 rule using uniformly spaced subintervals without using a loop. Your function should accept 4 inputs:
fun = a handle to the integrand function
a = lower limit of integration
b = upper limit of integration
n = number of uniform subintervals
and return 1 output:
Q = value of the integral

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!