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...
-
What does it mean to buy the market?
-
An aircraft cruises at a Mach number of 2.0 at an altitude of \(15 \mathrm{~km}\). Inlet air is decelerated to a Mach number of 0.4 at the engine compressor inlet. A normal shock occurs in the inlet...
-
Two Wheeler, a bike shop, opened for business on April 1. It uses a periodic inventory system. The following transactions occurred during the first month of business: April 1: Purchased five units...
-
Mumford Limited had the following financial statement account balances for 2022. Net Sales $356,420 Cost of Goods Sold 152,000 Average Accounts Receivable 19,710 Average Inventory 4,845 average...
-
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....
-
You are an accountant for EZ Training Systems. The company CEO has asked you to prepare financial statements without the appropriate adjusting entries. INSTRUC TIONS Analyze this information for...
-
Website: https://www.telus.com/en/on/business Overall Marketing and Communications Recommendations Considering the content of this company's website and your assessment and recommendations,...
-
The most recent financial statements for Crosby Incorporated, follow. Sales for 2021 are projected to grow by 30 percent. Interest expense will remain constant; the tax rate and the dividend payout...
-
Discuss the factors that negatively affect healthcare managers in their ability to financially sustain their healthcare organization. Provide examples.
-
The market has been divided into two period from 1960s-2000 Republican versus Democrat months Make sure calculations are in the same units: Percentages or decimals Compute the following risk...
-
5) Convert the following message to Hexadecimal values. (Leave spaces between each value.) Work super hard and BELIEVE in yourself! Message in Hexadecimal (10 points):
-
1. Sales transaction included in the year ended December 31, 2012, but evidence from the cut-off procedure suggests that the sale should be dated January 2, 2013 ($1,250,000). 2. Warranty expenses in...
-
Factor and simplify, if possible. Check your result using a graphing calculator. 3 cot 2 + 6 cot + 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....
-
Four full adders are employed to form a 4-bit circuit shown in the below figure. Interpret the function of control line C and the outputs R3-Ro & R4. Assume that A & B are unsigned integers and A>B....
-
Save & Exit S A company makes bikes from recycled metal. For a recent job lot of 200 bikes, the company incurred direct materials costs of $6,000 and direct labor costs of $2,000. Factory overhead...
-
Consider the following information of Julius Palanca. Cash $13,100 Furniture $2,000 Automobile $21,000 House $65,600 Credit Card $5,800 Student Loan $10,400 Mortgage $23,600 Do not enter dollar signs...
Study smarter with the SolutionInn App