Develop an M-file function to implement Romberg integration based on Fig. 20.2. Test the function by using
Question:
Develop an M-file 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. 20.1.
Fig.20.2
Example 20.1
Data From Problem 20.1
Use Romberg integration to evaluate
to an accuracy of εs = 0.5%.Your results should be presented in the format of Fig. 20.1. Use the analytical solution of the integral to determine the percent relative error of the result obtained with Romberg integration. Check that εt is less than εs.
Transcribed Image Text:
function [q, ea, iter] =romberg (func, a, b, es, maxit, varargin)
romberg: Romberg integration quadrature
q = romberg (func, a, b, es, maxit, p1, p2, ...):
Romberg integration.
8
f
& input:
8
func = name of function to be integrated
a, b = integration limits
8
es = desired relative error (default = 0.000001%)
& maxit = maximum allowable iterations (default = 30)
8
&
pl, p2, ... = additional parameters used by func
& output:
용 q= integral estimate
8
8
ea = approximate relative error (8)
iter = number of iterations
if nargin<3, error('at least 3 input arguments required'), end
if nargin<4|isempty (es), es=0.000001; end
if nargin<5|isempty (maxit), maxit=50; end
n = 1;
I (1,1)= trap (func, a, b, n, varargin{:});
iter = 0;
while iter
function [q, ea, iter] =romberg (func, a, b, es, maxit, varargin)
romberg: Romberg integration quadrature
q = romberg (func, a, b, es, maxit, p1, p2, ...):
Romberg integration.
8
f
& input:
8
func = name of function to be integrated
a, b = integration limits
8
es = desired relative error (default = 0.000001%)
& maxit = maximum allowable iterations (default = 30)
8
&
pl, p2, ... = additional parameters used by func
& output:
용 q= integral estimate
8
8
ea = approximate relative error (8)
iter = number of iterations
if nargin<3, error('at least 3 input arguments required'), end
if nargin<4|isempty (es), es=0.000001; end
if nargin<5|isempty (maxit), maxit=50; end
n = 1;
I (1,1)= trap (func, a, b, n, varargin{:});
iter = 0;
while iter
Fantastic news! We've Found the answer you've been seeking!
Step by Step Answer:
Answer rating: 66% (6 reviews)
Answered By
Nicholas Maina
Throughout my tutoring journey, I've amassed a wealth of hands-on experience and honed a diverse set of skills that enable me to guide students towards mastering complex subjects. My proficiency as a tutor rests on several key pillars:
1. Subject Mastery:
With a comprehensive understanding of a wide range of subjects spanning mathematics, science, humanities, and more, I can adeptly explain intricate concepts and break them down into digestible chunks. My proficiency extends to offering real-world applications, ensuring students grasp the practical relevance of their studies.
2. Individualized Guidance:
Recognizing that every student learns differently, I tailor my approach to accommodate various learning styles and paces. Through personalized interactions, I identify a student's strengths and areas for improvement, allowing me to craft targeted lessons that foster a deeper understanding of the material.
3. Problem-Solving Facilitation:
I excel in guiding students through problem-solving processes and encouraging critical thinking and analytical skills. By walking learners through step-by-step solutions and addressing their questions in a coherent manner, I empower them to approach challenges with confidence.
4. Effective Communication:
My tutoring proficiency is founded on clear and concise communication. I have the ability to convey complex ideas in an accessible manner, fostering a strong student-tutor rapport that encourages open dialogue and fruitful discussions.
5. Adaptability and Patience:
Tutoring is a dynamic process, and I have cultivated adaptability and patience to cater to evolving learning needs. I remain patient through difficulties, adjusting my teaching methods as necessary to ensure that students overcome obstacles and achieve their goals.
6. Interactive Learning:
Interactive learning lies at the heart of my approach. By engaging students in discussions, brainstorming sessions, and interactive exercises, I foster a stimulating learning environment that encourages active participation and long-term retention.
7. Continuous Improvement:
My dedication to being an effective tutor is a journey of continuous improvement. I regularly seek feedback and stay updated on educational methodologies, integrating new insights to refine my tutoring techniques and provide an even more enriching learning experience.
In essence, my hands-on experience as a tutor equips me with the tools to facilitate comprehensive understanding, critical thinking, and academic success. I am committed to helping students realize their full potential and fostering a passion for lifelong learning.
4.90+
5+ Reviews
16+ Question Solved
Related Book For
Applied Numerical Methods With MATLAB For Engineers And Scientists
ISBN: 9781259027437
3rd Edition
Authors: Steven C. Chapra
Question Posted:
Students also viewed these Mathematics questions
-
Fig 22.3: Use Romberg integration to evaluate dx to an accuracy of s = 0.5% based on Eq. (22.9). Your results should be presented in the form of Fig. 22.3. Use the analytical solution of the integral...
-
Use Romberg integration to evaluate to an accuracy of s = 0.5%. Your results should be presented in the form of Figure. Use the analytical solution of the integral to determine the percent relative...
-
Develop a user-friendly computer program for Romberg integration based on Figure. Test it by duplicating the results of Examples 22.3 and 22.4 and the function in Prob. 22.10.
-
Why is it likely to have preexisting normal faults in an orogenic belt?
-
In Problem 12.7 on page 424, you used the plate gap on the bag sealing equipment to predict the tear rating of a bag of coffee (stored in Starbucks). Using the results of that problem, a. determine...
-
Look again at Problem 7, which asked you to assume that the 6.5% interest rate was the opportunity cost of capital. Was that a reasonable assumption? What should the opportunity cost of capital for...
-
What is the probability that a player is dealt an initial hand with an 8 and a 3 ?
-
You are a loan officer for White Sands Bank of Taos. Paul Jason, president of P. Jason Corporation, has just left your office. He is interested in an 8-year loan to expand the company's operations....
-
Use PMT = PLA -nt to determine the regular payment amount, rounded to the nearest dollar. The price of a small cabin is $40,000. The bank requires a 5% down payment. The buyer is offered two mortgage...
-
Develop an M-file function that computes first and second derivative estimates of order O(h 2 ) based on the formulas in Figs. 21.3 through 21.5. The functions first line should be set up as function...
-
Develop an M-file 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....
-
Do the data in Exercise 9.22 substantiate the conjecture that the true standard deviation of the acidity measurements is larger than 0.4? Test at a = .05. Data from in Exercise 9.22 Measurements of...
-
A firm manufactures a commodity at two different factories, Factory X and Factory Y. The total cost (in dollars) of manufacturing depends on the quantities, and y produced at each factory,...
-
What is the preservation age for the following: Australia Date of Birth Preservation Age What rate of tax would apply to a genuine redundancy paid on the 30th June 2021? 1 January 1991 5 July 1964 60...
-
Cherboneau Novelties produces drink coasters (among many other products). During the current year (year O), the company sold 539,000 units (packages of 6 coasters). In the coming year (year 1), the...
-
Describe the three personality determinants. Differentiate between thinking (T) versus feeling (F) personality. Describe the Machiavellianism. Define the concept of motivation. Explain the two-factor...
-
Jill sold half of her comic books and then bought sixteen more. She now has 36. How many did she begin with?
-
An ice cube at 0.0C is slowly melting. What is the change in the ice cube's entropy for each 1.00 g of ice that melts?
-
In Exercises evaluate the limit, using LHpitals Rule if necessary. lim 07x cos x X
-
Recompute the regression fits from Probs. (a) 17.4, and (b) 17.15, using the matrix approach. Estimate the standard errors and develop 90% confidence intervals for the coefficients.
-
Develop, debug, and test a program in either a high-level language or macro language of your choice to implement linear regression. Among other things: (a) Include statements to document the code,...
-
A material is tested for cyclic fatigue failure whereby a stress, in MPa, is applied to the material and the number of cycles needed to cause failure is measured. The results are in the table below....
-
QUESTION 2: Subsequent Events Assume the fieldwork for the 30 June 2023 audit of Swifty Magic ended on 18 September 2023 which was also the audit report date. The financial statements and auditor's...
-
Recorded salaries and wages expense of $35,000. The cash paid was $25,000; the difference was due to various amounts withheldA) Do assets increase, decrease, or is there no effect?B) Do Liabilities...
-
The first step in setting a day fine is to _____. Multiple choice question. create a valuation table determine the number of fine units to be imposed identify an offender's net daily income and...
Study smarter with the SolutionInn App