Develop an Mfile function to implement adaptive quadrature based on Fig. 20.6. Test the function by using
Question:
Develop an Mfile function to implement adaptive quadrature based on Fig. 20.6. Test the function by using it to determine the integral of the polynomial from Example 20.1. Then use it to solve Prob. 20.20.
Fig.20.6
Example 20.1
Problem 20.20
The upward velocity of a rocket can be computed by the following formula:
where ν = upward velocity, u = velocity at which fuel is expelled relative to the rocket, m_{0 }= initial mass of the rocket at time t = 0, q = fuel consumption rate, and g = downward acceleration of gravity (assumed constant = 9.81 m/s^{2}). If u = 1850 m/s, m_{0} = 160,000 kg, and q = 2500 kg/s, determine how high the rocket will fly in 30 s.
function q = quadadapt (f, a, b, tol, varargin) * Evaluates definite integral of f(x) from a to b if nargin < 4  isempty (tol), tol c = (a + b)/2; 1. e6; end fa = feval (f, a, varargin{:}); feval (f, c, varargin{:}); fc = fb = feval (f, b, varargin{:}); quadstep (f, a, b, tol, fa, fc, fb, varargin{:}); q = end function q = quadstep (f, a, b, tol, fa, fc, fb, varargin) Recursive subfunction used by quadadapt. h = b = a; c = (a + b)/2; fd = feval (f, (a+c)/2, varargin{:}); fe = feval (f, (c+b)/2, varargin{:}); q1h/6* (fa + 4*fc + fb); q2 = h/12 * (fa + 4*fd + 2*fc + 4*fe + fb); q1) <= tol if abs (q2 q=q2 + (q2  q1)/15; =  else qa = quadstep (f, a, c, tol, fa, fd, fc, varargin{:}); qb c, b, tol, fc, fe, fb, varargin{:}); quadstep (f, = end end q = qa + qb;
Step by Step Answer:
From the details provided it appears that you are tasked with developing an Mfile function in MATLAB that can perform adaptive quadrature for numerica...View the full answer
Applied Numerical Methods With MATLAB For Engineers And Scientists
ISBN: 9781259027437
3rd Edition
Authors: Steven C. Chapra
Students also viewed these Mathematics questions

Use the indicated data to construct the frequency distribution. Listed below are the first 50 Chicago commute times from Data Set 31. Construct a frequency distribution. Use a class width of 15...

The upward velocity of a rocket can he computed by the following formula: where = upward velocity, u = velocity at which fuel is expelled relative to the rocket, m 0 = initial mass of the rocket at...

A researcher is running a simulation of an upward rocket to study the upward velocity of the rocket using various fuel consumption rates. The researcher has found that the upward velocity of the...

Can you draw the upper shear zone margin on Figure 16.9? Is it easily definable?

In Problem 12.6 on page 424, an owner of a moving company wanted to predict labor hours, based on the cubic feet moved (stored in Moving ). Using the results of that problem, a. determine the...

The data setTornadoes_2017 located at www.pearsonhighered.com/ Sullivan starts contains a variety of variables that were measured for all tornadoes in the United States in 2017. For each of the...

Assume that you are thinking about opening a musical instruments store near the college or university you are attending. Guitars, drums, and other types of musical instruments are items you would...

Assume that the following are independent situations recently reported in the Wall Street Journal. 1. General Electric (GE) 7% bonds, maturing January 28, 2013, were issued at 111.12. 2. Boeing 7%...

61. The solubility product of CuS, AgS and HgS are 10 37, 104 and 1054 respectively. The solubility of these sulphides will be in the order (1) HgS> AgS > Cus (2) AgS>HgS > CuS (3) CuS AgS > HgS (4)...

Develop an Mfile function to implement Romberg integration based on Fig. 20.2. Test the function by using it to determine the integral of the polynomial from Example 20.1. Then use it to solve Prob....

The rootmeansquare current can be computed as For T = 1, suppose that i(t) is defined as Evaluate the I RMS using (a) Romberg integration to a tolerance of 0.1%, (b) The two and threepoint...

A solid conducting sphere of radius R carries a charge Q. Calculate the electricfield energy density at a point a distance r from the center of the sphere for (a) r < R and (b) r > R. (c) Calculate...

What is AVL Tree?

Implement preorder traversal of binary tree using recursion?

Why do we want to use BST?

Explain the difference between binary tree and BST with an example?

What are advantages and disadvantages of BST?

How, if at all, will the future value of a three year variablerate GIC differ if it earns 4%, 5%, and 6% in successive years instead of 6%, 5%, and 4% in successive years?

Factor and simplify, if possible. Check your result using a graphing calculator. 3 cot 2 + 6 cot + 3

The following data shows the relationship between the viscosity of SAE 70 oil and temperature. After taking the log of the data, use linear regression to find the equation of the line that best fits...

The data below represents the bacterial growth in a liquid culture over a number of days. Find a bestfit equation to the data trend. Try several possibilitieslinear, parabolic, and exponential. Use...

The concentration of E. coli bacteria in a swimming area is monitored after a storm: The time is measured in hours following the end of the storm and the unit CFU is a "colony forming unit" Use this...

1. Given the following tree: B max A D 13 E 9 F G H 4 I J 5 K 7 L 8 N 7 a. Apply minimax algorithm on the above tree showing sequence of moves b. Perform a left to right alphabeta prune on the above...

For the following SIC/XE Program, answer the questions that follow: SUM START 0 FIRST LDX #0 LDA #256 +LDB #TABLE2 BASE TABLE2 LOOP ADD TABLE, X ADD TABLE2, X TIX COUNT JLT LOOP +STA TOTAL RSUB COUNT...

How does rational choice theory inform policy analysis and decisionmaking in domains such as economics, politics, and public administration, and what are the implications of applying rational choice...
Study smarter with the SolutionInn App