Find the value of the step size

Assignment Help Simulation in MATLAB
Reference no: EM131296332

Part A -

1) Derive a 4-point formula for an approximation of f"(x) in terms of f(x-3h), f(x-h), f (x), and (x + 2h). Hint: write the Taylor series for f(x - 3h), f(x - h), and f(x+ 2h), and take an appropriate linear combination of these. Also, find the error term.

2) If f"(x) is approximated by the Three-Point Centered Difference formula.

f(x - h) - 2f(x) + f(x + h)/h2

Find the value of the step size, h, which minimizes the upper bound of |E(f, h)|, where E(f, h) is the sum of the round-off and truncation errors. As in class, start by letting f(x- h) y- + ε-, f(x + h) = y+ + ε+, and f(x) = y0 + ε0, where it y-, y0 and y+ are the approximate values of the function evaluations, and ε-, ε0 and ε+ are the errors. Again, assume that |ε-| ≈ ε, |ε0| ≈ ε, and |ε+| ≈ ε, where ε is approximately machine epsilon.

3) Apply Richardson's Extrapolation once starting with the Two-Point Backward Difference formula, f(x) - f(x-h)/h to find a higher-order formula to approximate f '(x). This formula is of what order?

4) Integrate Newton's divided-difference interpolating polynomial to prove the formula

-hh P(x) dx = (1/3)h.

1386_Figure.png

5) Consider the quadrature rule

01f(x)dx ≈ c1f(0) + c2f(1/4) + c3f(1)

Find c1, c2, and c3 such that the quadrature rule integrates the functions f(x) = 1, x, and x2 exactly. (Note that the points are not evenly spaced.) What is the degree of precision of this quadrature formula?

6) Recall that the error in a quadrature rule based on an interpolant P(x) = ax2 + bx + c for f(x) on three evenly-spaced nodes x0, x1, and x2, can be written as

E(x) = x_0x_2((x - x0) (x - x1)( x - x2 )f"(c(x))/6)dx

Find an upper bound for |E(x)| in terms of h. the distance between adjacent nodes, and M3, where M3 = maxx∈[x0-x2]|If"(x)|. You may use the fact that |abF(x)dx| ≤ ab|F(x)|dx for any integrable function F(x)and interval [a, b].

7) If 01 ex^2 dx is approximated with the Composite Trapezoid Rule, determine the number of panels m needed for the upper bound of the absolute value of the error term to be less than any positive real number E.

8) Apply the composite Simpson's Rule with m = 2 panels to the integral. Compute the absolute error between the exact integral and the approximation.

0πxcosxdx

9) Can use calculator with 4 digit rounding. Apply Romberg Integration to find R33 for the integral

01x2dx

Part B -

1) Compute a vector of the exact absolute errors in the Three-Point Centered Difference formula for f"(2), where f(x) = sinx, with h = 10-1,...,10-12. Plot your vector versus h using MATLAB's loglog(). Use the vector to estimate the optimal value of h in MATLAB, and compare this value with your results in problem #2. Use ε = 10-16 (roughly machine epsilon), and also use an upper bound for the fourth derivative for all x ∈ R. What happens as h keeps getting smaller?

2) Write a function m-file to approximate the integral in #7 with the Composite Trapezoid Rule on m panels. The function should accept any number of panels m, any integration bounds, a and b, and any function, func, as input: function int = trapfun (m, a, b, func).

First, run your function for m = 100 panels, and output the approximation. Next, to achieve an error of E = 10-6, run your function with the value of m using your result in #7. Output this approximation.

7) If 0∫1ex^2dx is approximated with the Composite Trapezoid Rule, determine the number of panels m needed for the upper bound of the absolute value of the error term to be less than any positive real number E.

3) Now, write a function m-file to approximate the integral in #7 with the Composite Simpson's Rule on m panels. The function should accept any number of panels m, any integration bounds, a and b, and any function, func, as input function int = simpfun (m, a, b, func). Run your problem for m = 50 panels, and output the approximation.

4) Modify the function romberg.m posted in eLearning, to a function, called rombergmod, that stops generating rows of the matrix (tableau) when the absolute value of the difference between successive diagonal entries is less than a specified error, i.e., use the function call,

r = rombergmod[f, a, b, error]

Inside the function, set the maximum number of rows to be a "large" number, specifically 100. You may need to use an external function m-file, romfun.m, for the function input for f. Run your function for error 0.5x10-8. How many function evaluations (evaluations of the integrand) are used to compute the last diagonal element in the matrix, given this error? This element is what order of approximation?

Attachment:- Assignment.rar

Reference no: EM131296332

Questions Cloud

Describe the role or position of the human services : Describe the role or position of the human services professional interviewed.List and describe the range or types of services the agency/organization provides.Describe the population the agency/organization serves and explain the broader social nee..
Identify your intended project scope and deliverables were : Identify your intended project scope and deliverables were (from Charter). Discuss any changes (if there were any) to the scope baseline and how those changes positively or negatively impacted the project.
Competitiveness and inventory management : To be competitive, many fast-food chains expanded their menus to include a wider range of foods. Although contributing to competitiveness, this has added to the complexity of operations, including inventory management. In what ways did the expansi..
Identify how your classmates model : Examine how this reimbursement model has positively influenced the overall health care system and identify how this reimbursement model evolved as a solid and crucial part of the health care system.
Find the value of the step size : If f"(x) is approximated by the Three-Point Centered Difference formula. f(x - h) - 2f(x) + f(x + h)/h2. Find the value of the step size, h, which minimizes the upper bound of |E(f, h)|, where E(f, h) is the sum of the round-off and truncation erro..
Changes in what is considered a mental disorder : PS499: Bachelors Capstone Course in Psychology-The field of psychology has changed dramatically over time. As our knowledge has grown, treatment of individuals and groups has improved. Review your materials from previous classes and locate addition..
Bringing healthcare marketing into the twenty-first century : Using the case study "Bringing Healthcare Marketing into the Twenty-First Century". If you were the new director how would you proceed? What would you do during your first four weeks on the job. Create a list of projects for the director and pr..
How would you examine the impact of the new school : A school boundaries problem.- How would you examine the impact of the new school that has been built relative to these requirements? .
Analysis of current health care reimbursement policies : The first part of the course project is an analysis of current health care reimbursement policies and their effect on financial management decisions. Your paper should be mainly an evaluation of health care reimbursement and payment methods for a ..

Reviews

len1296332

12/1/2016 12:46:05 AM

The above questions on Numerical Analysis with MATLAB. Solve 9 problems by hand with work shown and solve 4 problems using MATLAB (please show MATLAB code and screenshots of program results). write the Taylor series for f(x - 3h), f(x - h), and f(x+ 2h), and take an appropriate linear combination of these. Also, find the error term.

Write a Review

Simulation in MATLAB Questions & Answers

  Calculate the stress intensity factor

Use the three-parameter zone finite element method or the boundary collocation method to calculate the stress intensity factor K, at the crack tip for the plate

  Build a simulation using newtons laws of motion

Build a new and different simulation of your own using Newtons laws of motion and Show the code and describe how it works

  Write the specification of load mover

Write the specification of LOAD MOVER detailed of the whole design and precise for automatic control section and divide the design into various modules and Is the kernel required if yes which one?

  Design the automatic control section using statecharts

Aim of this project is to design an embedded system which can move loads from one place to another. The system can be operated manually, automatically and wirelessly.

  Need an expert who can model a drill in simulink

Need an expert who can model a drill in Simulink. Working model of a drill needing for an improvment to behave more realistically as a drill to drill through plastic block.

  Project is on load frequency control using fpid

Project is on load frequency control using FPID tuned using GA and PSO algorithm and the system is a two area system.

  Number of packets received with time

Let x be the number of packets received with time -

  Build a matlab based graphical user interface

Build a Matlab based graphical user interface (GUI) that operates in conjunction with a base Matlab/ Simulink simulation program. Any base simulation is considered acceptable.

  Build a matlab based graphical user interface

Build a Matlab based graphical user interface (GUI) that operates in conjunction with a base Matlab/ Simulink simulation program. Any base simulation is considered acceptable.

  Simulate the standardised sum of independent

Simulate the standardised sum of independent and identically distributed variates - Fit a linear regression model as in Q5, and plot your estimates for β0 and β1 as N increases, together with a line indicating their true values. Supply your code.

  Plot the original periodic square wave

Plot the original periodic square wave on the same graph. Comment on the difference between the original periodic square wave and its truncated Fourier series presentation.

  Use matlab to plot the function

Plot the original periodic square wave on the same graph. Comment on the difference between the original periodic square wave and its truncated Fourier series presentation.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd