Math, asked by sandeshdahiwale358, 8 days ago

Write algorithm to evaluate integral from x• to x2n of y dx using simpson 1/3 when y(x) is given at X6, x•+h, --------, x•+2nh.
Evaluate integral from 0 to 1 of e^x2 sinx dx using simpson using 1/3 rule with h=0.1​

Answers

Answered by mouniroyalp001995
0

Step-by-step explanation:

Program for Simpson’s 1/3 Rule

In numerical analysis, Simpson’s 1/3 rule is a method for numerical approximation of definite integrals. Specifically, it is the following approximation: 

    



In Simpson’s 1/3 Rule, we use parabolas to approximate each part of the curve.We divide 

the area into n equal segments of width Δx. 

Simpson’s rule can be derived by approximating the integrand f (x) (in blue) 

by the quadratic interpolant P(x) (in red). 

 



In order to integrate any function f(x) in the interval (a, b), follow the steps given below:

1.Select a value for n, which is the number of parts the interval is divided into. 

2.Calculate the width, h = (b-a)/n 

3.Calculate the values of x0 to xn as x0 = a, x1 = x0 + h, …..xn-1 = xn-2 + h, xn = b. 

Consider y = f(x). Now find the values of y(y0 to yn) for the corresponding x(x0 to xn) values. 

4.Substitute all the above found values in the Simpson’s Rule Formula to calculate the integral value.

Similar questions