Consider the approximation of an integral I L f (x) dx by the trapezoidal or midpoint...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
Consider the approximation of an integral I L f (x) dx by the trapezoidal or midpoint rule which is the average of the left and right Riemann sums and generally provides a more accurate solution. The algorithm for the trapezoidal rule is given as follows: h 12 k=1 [f(xk) + f (xk+1)] where the data array x = [x1, x2,,XN,XN+1] is the discretized vector of the interval [a, b] with N divisions, and h = (ba)/N is the uniform step size. a) Based on what is learned in class, write a user-defined MATLAB function (numerical solver) that approximates numerical integration using the trapezoidal rule. A partially completed m-file ftrap (fun, a, b, N) is provided for you to complete. b) An athlete starts running from rest (velocity, v = 0). His acceleration as a function of time is given by the following plot. Apply the numerical solver ftrap to determine the maximum velocity of the athlete, which occurs when a d = 0 at t = 4s. Use N = 20 divisions in the trapezoidal rule. The velocity can be calculated using basic concepts of physics and calculus. adv-adt = = dt 5.5 5 4.5 4 3.5 Acceleration [m/s] 3 2.5 2 1.5 1 0.5 0 0.5 1 1.5 2 Time [s] 2.5 3 3.5 4 Note that a(2.5) 5.4 m/s. In the range t = [0,2.5), the acceleration function is a(t) 2.16 t m/s, and in te [2.5,4], we have a(t) = -3.6(t - 4) m/s. Pay attention to how the time domains are defined to understand how to define the acceleration function correctly in MATLAB. Consider the approximation of an integral I L f (x) dx by the trapezoidal or midpoint rule which is the average of the left and right Riemann sums and generally provides a more accurate solution. The algorithm for the trapezoidal rule is given as follows: h 12 k=1 [f(xk) + f (xk+1)] where the data array x = [x1, x2,,XN,XN+1] is the discretized vector of the interval [a, b] with N divisions, and h = (ba)/N is the uniform step size. a) Based on what is learned in class, write a user-defined MATLAB function (numerical solver) that approximates numerical integration using the trapezoidal rule. A partially completed m-file ftrap (fun, a, b, N) is provided for you to complete. b) An athlete starts running from rest (velocity, v = 0). His acceleration as a function of time is given by the following plot. Apply the numerical solver ftrap to determine the maximum velocity of the athlete, which occurs when a d = 0 at t = 4s. Use N = 20 divisions in the trapezoidal rule. The velocity can be calculated using basic concepts of physics and calculus. adv-adt = = dt 5.5 5 4.5 4 3.5 Acceleration [m/s] 3 2.5 2 1.5 1 0.5 0 0.5 1 1.5 2 Time [s] 2.5 3 3.5 4 Note that a(2.5) 5.4 m/s. In the range t = [0,2.5), the acceleration function is a(t) 2.16 t m/s, and in te [2.5,4], we have a(t) = -3.6(t - 4) m/s. Pay attention to how the time domains are defined to understand how to define the acceleration function correctly in MATLAB.
Expert Answer:
Related Book For
Calculus Early Transcendentals
ISBN: 978-0321947345
2nd edition
Authors: William L. Briggs, Lyle Cochran, Bernard Gillett
Posted Date:
Students also viewed these algorithms questions
-
Let A, B be sets. Define: (a) the Cartesian product (A B) (b) the set of relations R between A and B (c) the identity relation A on the set A [3 marks] Suppose S, T are relations between A and B, and...
-
Give Correct ANSWERS Human-Computer Interaction (a) If you had been one of the original inventors of the WIMP interface, and engineers on the technical team had been sceptical about the advantages...
-
List the key principles of the six Sigma philosophy. How does it differ from TQM?
-
Why do telephone networks have voice channels with a bandwidth that is much narrower than the spectrum of the human voice?
-
Let f(z) = f(2) = f( 1) = (G) - 32 I H-3 Find the following. Write answers as fractions, not decimals.
-
Power consumption for the same refrigeration effect of a refrigerating system is (a) directly proportional to COP (b) inversely proportional to COP (c) directly proportional to COP (d) inversely...
-
Bey Technologies is considering changing its credit terms from 2/15, net 30, to 3/10, net 30, to speed collections. At present, 40 percent of Beys paying customers take the 2 percent discount. Under...
-
Create a MATLAB script that generates a scatter plot for the given data points and labels the axes appropriately. x = [ 1 , 2 , 3 , 4 , 5 ] y = [ 2 , 4 , 1 , 3 , 5 ] The data points are provided in...
-
Offer an alternative question that you might have asked the legal expert on this project. Pfizer Inc. and Pharmacia & Upjohn Company Inc. have agreed to pay a $2.3 billion settlement to resolve...
-
The product will be small runs at first and the package will be a folding carton with a three color print. What print methods might you consider for the first smaller runs? Would you change to a...
-
Identify the 3 factors that determine the amount of energy stored in a stretched spring. Explain.
-
Plum Corporation acquired 80 percent of Saucy Corporation's common shares on January 1, 20X7, at underlying book value. At that date, the fair value of the noncontrolling interest was equal to 20...
-
DBS Pizzas & Cafe is a fast-food restaurant based in an eastern suburb of Melbourne. They purchase their takeaway containers from a local third-party supplier. DBS Pizzas & Cafe delivers an average...
-
Mcfarlain Corporation is presently making part U 9 8 that is used in one of its products. A total of 7 , 0 0 0 units of this part are produced and used every year. The company's Accounting Department...
-
Stephen Services is building a new campus block to house the Business School. The building costs a total of $180million to construct and was completed on 31December 2014, with an expected useful life...
-
Assume you are the accountant for Catalina Industries. John Catalina, the owner of the company, is in a hurry to receive the financial statements for the year ended December 31, 20X1, and asks you...
-
The trial balance of Mumbai Co. at 31 December was as follows: The following information is applicable. (a) Inventory on 31 December is 850,000. (b) The cumulative allowance for doubtful debts is to...
-
The trial balance of Penang Co. on 31 July 20X7 was as follows. The following additional information is available: 1. Inventory at 31 July 20X6 is valued at 1,361,000. 2. Depreciation for the year is...
-
The trial balance of Shanghai Co. on 31 March 20X7 is given below. The following information is also relevant: 1. Closing inventory is valued at 133m. 2. Electricity accrued is estimated to be 5m. 3....
Study smarter with the SolutionInn App