How to integrate a function using the trapezoid rule ?
信息
此问题已关闭。 请重新打开它进行编辑或回答。
显示 更早的评论

Create a MATLAB script to integrate the given function using the numerical scheme called Trapezoid’s Rule. a. f(x)= xe^x + 3x^2 − 2x -1 and find for with h = 0.1, 0.01 and 0.001
Now I know how to do this when it's a definite integral on a certain interval or am given a table of values but how do I go about doing this since it's an indefinite integral ? I know the general formula for the trapezoid rule (given in the image) but again it seems to be only valid with given points. Using trapz function doesn't seam to be helpful here. How do I go about doing this ?
1 个评论
John D'Errico
2017-2-19
I will only point out that this is not indeed an indefinite integral. Note the existence of limits on the integral. That makes it a definite integral.
回答(0 个)
此问题已关闭。
产品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!