we need our help in this project
1.Write a matlab function M-file defining a function Trapezoidal Rule (f,a,b,n) . This should return an approximation of ∫f(x)dx using trapezoidal rule . Here of course the parameters a and b represent real numbers . The function that you are permitted to substitute for f should either be a built-in matlab funtion (such as sin) or an "inline" function.
2.As before write a matlab function M-file defining a function SimpsomsRule (f,a,b,n).
recall : 10∫4dx/1+x2 = 4arctan(1) = π, Using the two previous M-files , estimate this integral within tolerance of 10-6 . Fing the number of iterations n in each case .