Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Let's plot the function f(x)=e^ on the interval [0,3] using Excel and Matlab. The simplest approximation to a function is the 0th order polynomial
Let's plot the function f(x)=e^ on the interval [0,3] using Excel and Matlab. The simplest approximation to a function is the 0th order polynomial (a constant). Assume f(x) is constant on the interval [a,b] and has the value f(a) there. One can construct a rectangle of a height f(a) to illustrate a constant function on the interval [a,b]. Problem 3b (10 points). above Plot the rectangle of a height f(0) on the graph of Problem on the interval [0,3] along with the original function. What is the area of your rectangle? The area of the rectangle is an estimate of the desired integral. From your plot, how accurate do you think your estimate is (compared to the area under the original function)? The approximation to the integral of the original function you have just developed is called the "Rectangular Rule" A more accurate approximation is a 1st order (linear) polynomial of the form f(x) = a+bx. This polynomial has two unknown coefficients (a and b). These coefficients can be determined using the function values at two points by solving the system of two linear equations with two unknowns. Typically, the points at the ends of the interval are used. In our case these are the points (0,f(0)) and (3.f(3)). (In graphical terms, to define a linear polynomial means to draw a straight line through these two points). Problem 3c (10 points). Build the straight line between the two end points of the interval [0,3]. The x-axis, the vertical lines x = 0 and x = 3, and the constructed line form a trapezoid. Plot the trapezoid on the graph. The area of the trapezoid is a more accurate approximation to the integral of f(x) on [0,3]. What is the approximate value of the integral? How accurate do you think it is? The approximation you have just developed is called the "Trapezoidal Rule". Moving up the scale of polynomials the next order of approximation utilizes the 2nd order (quadratic) polynomial of the form f(x) = a + bx + cx. This polynomial has 3 unknown coefficients. To calculate the value of these coefficients we need the values of the function at three points. Typically, the ends of the interval and the middle of the interval are used. In our case we will use the points (0,f(0)), (1.5,f(1.5)), and (3,f(3)). Problem 3d (10 points). Find the coefficients a,b,c for the quadratic polynomial that passes through the three specified points: (0,f(0)), (1.5,f(1.5)), and (3,f(3)). You will have to solve the 3x3 system of equations to accomplish that (3 equations with 3 unknowns). Plot the quadratic polynomial along with the graph of the original function. The area under the quadratic polynomial is an approximation to the integral of f(x). Integrate your quadratic polynomial to obtain the numerical value of the integral. (Recall the rule for integrating polynomials. If you do not remember how to integrate polynomials - let me know and I will help.) How accurate do you think the obtained approximation is? The case you have just developed is called "Simpson's Rule". SYSE 5350, Spring 2018, Exercise 1, Part II 2 Error Analysis: Without going through the numerical analysis derivations the following error results are stated. Consider your function on the interval (a,b). The error of the Rectangular Rule is O[(ba)2]. This notation means that the error is proportional to the square of the interval length. The Trapezoidal Rule has an error of O[(b-a)], while Simpson's Rule error is O[(b- a)5]. How can one increase the accuracy of such approximations? The only control we have over increasing the accuracy (reducing the error) of the numerical integration estimate when using the above-mentioned methods is by shortening the length of the interval: If (ba) is small (
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started