Question: Using Trapezoidal method of integration we learnt in the class, write a MATLAB program to integrate f(x)=x^2 for 0

Using Trapezoidal method of integration we learnt in the class, write a MATLAB program to integrate f(x)=x^2 for 0<=x<=1. Write a custom function trapzinteg.m to do the calculations, and call this function from the main file. Pass the arguments x, fx, and h (step size) to trapzinteg.m function.

a. Use h=0.1, get the final answer

b. Use h=0.01, get the final answer

c. Use h=0.001, get the final answer

What do you observe in a, b and c? Write the conclusion in your own words

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!