Question: SOLVE PROBLEM 2 please Using appropriate loop statement to iterate a specified n number of times, write a Matlab script to integrate by the Simpson

SOLVE PROBLEM 2 please
Using appropriate loop statement to iterate a specified n number of times, write a Matlab script to integrate by the Simpson method (note: n is a even number for the Simpsons method). The code that you are writing should be your own code, not from some other source. To better understand how to program it,you can first use an ordinary calculator to solve each step considering small n values. Such a trial could also help you debug your code. Adopt the code to solve the two problems given below.
3.1 Problem #1
Consider the following integration as a test case for your script.
02x2dx
Use the MatLab script that you have written to solve the above integral.
Test with different values for n(say n=2,n=4,n=40,n=400).
Comment on the results that you get for different n values.
3.2 Problem #2
The velocity of a particle moving along a straight line for a short period of time
0t4s is given as v=60(1-e-t2). Determine how far the particle travels
in t=2s
Use the MatLab script that you have written to solve the above integral.
Test to see if the result changes with different n values (you can choose).
Report your result when you use n=50 with the Simpson's method.
 SOLVE PROBLEM 2 please Using appropriate loop statement to iterate a

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!