Scinovex
article Open Access

Subdividing closed intervals using the trapezoid rule

Abstract

This study showed how to divide closed periods into subintervals, reviewed the numerical approach known as the trapezoid rule, and reported the percentage of inaccuracy in the procedure. Many algorithms were employed and the trapezoid rule was applied to Closed interval [a, b]. The closed interval [a, b] has been divided into n equal-length sub- intervals, each of which has a length of h. The distance h between the starting point and the closed intervals limit is represented by the symbol h, and the length of the period is represented by the symbol h. Additionally, an algorithm was proposed that simulates the cultivation of agricultural crops using various existing methods. When a number of slices are created beneath the function curve and each slice has a shape that is similar to the pervert's, the value of h=(b-a)/n, where a is the start of the interval, b is the end of the interval, and n is the number of divisions, may be determined. In order to get exact responses, apply the trapezoid rule to each period and determine the integral for each subinterval.

Full Text

Tables and figures are in the full-text PDF.

Introduction

Use the Trapezoid Rule to approximate the definite integral of a function over a closed interval [a, b] The Trapezoid Rule is a numerical method to estimate the value of a definite integral:

The basic idea behind the Trapezoid Rule is to divide the interval [a, b] into a certain number of sub-interval, with (n) taking the form a = x 0 < x 1 < x 2 < ⋯ < x n = b j = 0, 1, 2,., n There are two forms of integration, and the distance between the points x_j, which are referred to as nodes, defines the type of integration. The following procedures can be used to determine the approximate value of the integral of the function f(x) over the interval [a, b]: First, we divide the interval [a,b] into (n) equal-length subintervals, each of whose length is h, whose value can be computed using h=(b-a)/2. Under the function curve, a number of slices are formed, each of which has a shape that is close to the trapezoid. Next, we apply the trapezoid rule to each period, as shown in the following figure:

Second, by adding together the areas of all the slices A1, A2, A3,…, An, we determine the estimated total area contained under the curve of the function between x_n=b and x_0=a.

which is able to be written:

The idea is that the Trapezoid Rule creates a trapezoid by connecting the function's values at the endpoints of each subinterval with a straight line, rather than utilizing rectangles to approximate the area. Next, the trapezoid's area is computed. The approximate total area under the curve can be obtained by adding the areas of each of these trapezoids. Subdividing the Closed Interval: We take a closed interval [a, b] and divide it into n equal pieces by the appropriate number of subintervals n.

The Trapezoid Rule • Accuracy: For the same number of subintervals, the Trapezoid Rule typically yields a more accurate approximation than Riemann sums (left, right, or midway), particularly for nonlinear functions. This is due to the fact that it uses straight lines, which fit the curve more accurately than horizontal lines, to approximate it. • Inaccuracy: The Trapezoid Rule's inaccuracy is inversely proportional to n2. This indicates that the error reduces by a factor of four when the number of subintervals is doubled. • Concavity: The trapezoidal rule will overstate the integral if the function f(x) is concave up on the interval. The trapezoidal rule will undervalue the integral if the function f(x) is concave down on the interval. • When it's exact: Because a straight line fits a linear function exactly, the Trapezoid Rule provides an exact answer for the integral of a linear function.

Research Method Derivation of Trapezium Rule

After approximating the function f(x) using Newton's formula for forward inclusion, we integrate the function throughout the interval [x 0 , x 1 ] with respect to m, setting the integration limits from 0 to 1. The result is:

The following is obtained by truncating the phrases that include the second front differences:

The trapezoidal rule is represented by equation (1). By generalizing equation (1.2) to each subinterval

Results And Discussion

The compound trapezoidal rule could be found in equation ( 2) Error of the Trapezoidal Rule

Where ∆ n f 0 = h n f (n) (θ) when n=2

The amount of inaccuracy for each subperiod is shown in equation ( 3). The overall error (i.e., the cumulative error from n subintervals) equals the sum of the cumulative errors in (n) intervals, which is the error that results from using the compound trapezoid rule.

Consequently, the optimal error magnitude for (n) among the different classes is represented by (4). To get the amount of difference between the genuine value and the estimated value, the computed method K must be integrated with the amount of error in any method.

Trapezoidal Rule Truncation Error

Algorithm of The Trapezoidal Rule

First: input f(x), N, a, and b. Second: use the relationship h = b-a 2 ) to get the value of h. Third: x i = a + i h for values i = 0,1,2,…n-1 Fourth: determine the integral

Fifth: Print the T n value.

Use the trapezoid rule to get the integral if you know that n=6

x i = a + ih; x 0 = a + 0h; x 1 = a + 1h,

x 2 = a + 2h; x 3 = a + 3h; x 4 = a + 4h

x 5 = a + 5h; x 6 = a + 6h

The following table of values will be generated when these values are entered into the function: The following arrangement shows the integral values by applying the trapezoid rule and using a different number of divisions Since the correct integral value of this function is as follows, we can observe that the answer becomes closer to the precise solution as n increases: ; x 0 = a + 0h; x 1 = a + 1h, x 2 = a + 2h; x 3 = a + 3h; x 4 = a + 4h, Determine the following integral's approximate value. The following situations can be solved with the trapezoid rule: We note that the estimated value still deviates from the actual number regardless of whether n = 8, n = 4, or n = 2. This is because, although the rule of the quadrilateral (trapezium) is perfectly accurate for the integration of functions whose degree is less than (2 >) 2, we continue to employ it. However, we see that the estimated value becomes closer to the actual value of the integral as the value of (n) increase.

Application of the use of the Trapezoid Rule in agricultural crops: using the fundamental principle of dividing the field or cultivated area into several sections with the goal of simultaneously growing multiple products under the same field conditions and additions, depending on collaboration to achieve the highest production with the greatest quantity from the Bible.

∫ 𝑓(𝑥)𝑑𝑥

Where b end of season a the beginning of season A1, A2, …., An the area under agriculture Then, by adding up the areas of the planted areas A1, A2, A3,…, An, we determine the total area contained within the curve of the function between x n = b, x 0 = a as follows:

The continuity status of the crop may be ascertained by breaking the time up into smaller periods; the more subperiods there are, the more continuity there is, and the smaller the mistake. This helps in planning irrigation schedules and conserving water.

Conclusion

A number of slices under the function's curve are produced by using the trapezoid rule, and each slice has a shape that is similar to the trapezoid's form. In order to get precise answers, we then apply the trapezoid rule to each closed interval [a, b] and determine the integral for each sub-interval.

Acknowledgement

AcknowledgementsThe researcher extend their thanks and gratitude to the Presidency of the University of Mosul and College of Agriculture & forestry for facilitating the task of completing the research.

References

  1. Fornberg B, Piret C. Computation of fractional derivatives of analytic functions. Journal of Scientific Computing. 2023;96(3). DOI: 10.1007/s10915-02302293-4
  2. Kaye J, Strand HUR. A fast time domain solver for the equilibrium Dyson equation. Advances in Computational Mathematics. 2023;49(4). DOI: 10.1007/s10444-02310067-7
  3. Fornberg B. Finite difference formulas in the complex plane. Numerical Algorithms. 2022;90(3):1305-1326. DOI: 10.1007/s11075-021-01231-5
  4. Albadarneh RB, Batiha I, Alomari A, Tahat N. Numerical approach for approximating the Caputo fractional-order derivative operator. AIMS Mathematics. 2021;6(11):12743-12756. DOI: 10.3934/math.2021735
  5. Albadarneh RB, Batiha IM, Adwai A, Tahat N, Alomari A. Numerical approach of Riemann-Liouville fractional derivative operator. International Journal of Electrical and Computer Engineering. 2021;11(6):5367-5378. DOI: 10.11591/ijece.v11i6.pp5367-5378
  6. Fornberg B. Improving the accuracy of the trapezoidal rule. SIAM Review. 2021;63(1):167-180. DOI: 10.1137/18M1229353
  7. Trefethen LN, Weideman JAC. The exponentially convergent trapezoidal SIAM Review. 2014;56(3):385-458. DOI: 10.1137/130932132
  8. Alpert B. Hybrid Gauss-trapezoidal quadrature rules. SIAM Journal on Scientific Computing. 1999;20:15511584. DOI: 10.1137/S1064827597325141

Funding

  • University of Mosul
Citations
0
FWCI
0.00
field-weighted impact
References
0
Percentile
39%
vs. same field & year
Citation Network

How this paper connects to the literature. Drag to explore, click any node to open that paper.