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: 57% (7 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...
-
PROOF. Suppose that there is a 1-1 function f that takes N onto the interval (0,1). Write the numbers f(j), j E N, in decimal notation, using the finite expansion when possible; i.e., f(l) = 0.an a...
-
Variable overheads vary with time. State whether the following statements are true or false:
-
Olivia Company began 2013 with a Retained Earnings account balance of $180,000. During 2013, the following 8 events occurred and were properly recorded by the company: 1. Bonds payable with a face...
-
Phenominal Fashions, a department store, has the following unadjusted account balances as of December 31, 2022, the company's year-end: (Click the icon to view the unadjusted balances.) The following...
-
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....
-
In Problems 2342, graph each function. Use the graph to investigate the indicated limit. lim f(x), f(x) = x-0 { 1 -1 if x < 0 if x > 0
-
See US Debt Clock and answer the following: (Hint: Take a screenshot of the Debt Clock) (2) A. What is the current US deficit and the total federal debt? (1) B What is the net interest...
-
GASB states that public colleges and universities are special purpose governmentsand therefore accountable to the citizenry (Hoyle, 2015). Furthermore, GASB found that for public colleges and...
-
You have recently been assigned to the production planning department within your company. Your firm makes large blades for power generation windmills. The windmills are mostly used in the western...
-
Jason Ready attended the University of Ohio from 2 0 1 9 to 2 0 2 3 under the Air Force ROTC program. Excluding the school expenses covered by his ROTC scholarship, he incurred additional school...
-
Questions Chap 1 1. Consider the following cases and decide whether criminal or civil proceedings would result, and make a note of the parties in the action. a) Ali is being prosecuted for careless...
-
1. Prior to launching their firms, how could BlackJet, Ridejoy, and Neighborrow.com have better anticipated the issues that ultimately caused them to fail? 2. In regard to putting together an...
-
In Exercises delete part of the domain so that the function that remains is one-to-one. Find the inverse function of the remaining function and give the domain of the inverse function. f(x) = 16x4 -3...
-
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....
-
Sociology
-
I am unsure how to answer question e as there are two variable changes. In each of the following, you are given two options with selected parameters. In each case, assume the risk-free rate is 6% and...
-
On January 1, Interworks paid a contractor to construct a new cell tower at a cost of $850,000. The tower had an estimated useful life of ten years and a salvage value of $100,000. Interworks...
Study smarter with the SolutionInn App