i need the coding in matlab
1) Numerical Integration There are many simply written functions which have no simple closed form antiderivative. These functions must, when they arise in physical problems, be integrated numerically. One such function is f(x) = sin(x) a) Find S f(x)dx using the trapezoid rule and 2 sub-intervals b) Repeat part a) with 10 sub-intervals c) Find S, f(x)dx using Simpson's rule and 2 sub-intervals d) Repeat part c) with 10 sub-intervals e) Find S, f(x)dx using the Simpson's 3/8 rule and 2 sub-intervals f) Repeat part e) with 10 sub-intervals g) if g'(x) = f(x), and g(1) = 0, use simpson's rule to find g(x) on x = 1:0.1:5 Save your results for the above on HW7_1.dat - HW7_7.dat. HW7_1 - 7_6 should be scalars. HW7_7 should be a vector