Answered step by step
Verified Expert Solution
Link Copied!

Question

00
1 Approved Answer

all code is only C programming, not c++ . 400000 2.188800 2. Numerical Integration of Polynomial Given a function f of a real variable x

image text in transcribed

image text in transcribed

all code is only C programming, not c++

. 400000 2.188800 2. Numerical Integration of Polynomial Given a function f of a real variable x and an interval [a, b] of the real line, the definite integral f(x)dx is defined informally as the signed area of the region in the xy-plane that is bounded by the g x-axis x-axis subtracts from the total ph of f, the . The area above the x-axis adds to the total and that below the and the vertical lines x = a and x The Riemann integral is defined in terms of Riemann sums of functions with respect to tagged partitions of an interval. Let [a, b] be a closed interval of the real line; then a tagged partition of (a, b] is a finite sequence This partitions the interval [a, b] into n sub-intervals, where n( function f with respect to such a tagged partition is defined as - a)/d A Riemann sum of a R--1 thus each term of the sum is the area of a rectangle with height equal to the function value at the distinguished point of the given sub-interval, and width the same as the sub-interval width In the Riemann integral, the larger number of sub-intervals(n) or the smaller of the interval (4p), the more precise of the integral. The question is "what is small enough of the interval?" The proper interval depends on how precise the integral you need to obtain. You can gradually reduce the interval until you obtain the precise integral you need. For this lab, you will start the interval as o.1, or A 0.1, and calculate its integral So. Then, the interval is reduced to half as 4, Ao/2, and calculate S, and so forth. You continue this calculation until the difference ratio of two consecutive integral is less than a small constant that you choose as Sk -Sk k-1 Find the integral of g(x) and htx) between-o.5 and +0.5 at the precision of e 1.0-6 3. Symbolic Integral Evaluation of Polynomial (Optional) An indefinite integral of a polynomial is well understood. Consider a function F whose derivative is th given function f. F(x) Jf(x)dx. For example, given f(x) 1-2x x3, we can fi 0.25x. Write a functio nd Fx)xx2 n to find an array representing the integration polynomial for a given polynomial. or an array 1,2,0,1), as an example, find an array (0,-1,-2,0,0.25). Once you find Fo), you can find the definite integral as f(x)dz = [F(x)]: = F(b)-F(a) Write a function to find the integral polynomial for a given polynomial as an array. Use this function to find the integral of g(x) and h(x) between-o.5 and +o.5, and compare these to the results of section 2

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access with AI-Powered Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Students also viewed these Databases questions