PetroCalcHub

Original synthetic study

Why monthly rate samples do not exactly equal analytical cumulative

Monthly endpoint samples do not exactly reproduce an analytical cumulative integral. Summing rate samples requires a stated quadrature rule and time intervals.

By PetroCalcHub Team · Updated October 24, 2026 · Free to read and use

Define what each rate sample represents

A rate at the end of a month is an instantaneous endpoint sample. A reported monthly volume divided by month length is an interval average. Multiplying these two rate types by days has different meanings.

The synthetic experiment uses a smooth exponential curve and equal-width intervals so the numerical integration error can be isolated.

Compare rectangles and trapezoids

For a decreasing curve, left-endpoint rectangles overestimate the area and right-endpoint rectangles underestimate it. Trapezoids generally reduce the error for this smooth case.

The exact exponential integral provides an independent reference. Refining the number of intervals should reduce quadrature error without changing the underlying curve.

Do not correct measured volume with a model

When reliable interval production volumes are available, sum those volumes directly. A fitted curve is a model of the history and need not reproduce every allocated interval exactly.

This study measures numerical sampling error only. It does not include measurement error, downtime, calendar-month variation or model misspecification.

Explore the example

Original synthetic teaching calculation. Equations and fixed controls are stated here; these are not field measurements.

12

Select one of 5 recorded scenarios. Intermediate states are not interpolated.

Selected scenario

Equal intervals n = 12. Left sum (STB): 310477.685; Right sum (STB): 301176.166; Trapezoid sum (STB): 305826.926; Exact integral (STB): 305803.349.

Selected result0160,000320,0004185365Scenario input
  • Left sum (STB)
  • Right sum (STB)
  • Trapezoid sum (STB)
  • Exact integral (STB)
Left sum (STB) versus Equal intervals n. Green marks the selected row. Lines connect recorded points for orientation; exact solved values are tabulated below.

Worked example

Sampling error against an analytical integral

Exponential qi = 1,000 STB/day, D = 0.001/day, 365-day horizon. Divide the interval into n equal widths.

Relation and unit basis

left = Σq(ti)Δt; right = Σq(ti+1)Δt; trapezoid = (left+right)/2

These are instantaneous rate samples. The exact integral is the independent reference for quadrature error.

  1. 1. Define the baseline

    Equal intervals n = 12

    Exponential qi = 1,000 STB/day, D = 0.001/day, 365-day horizon. Divide the interval into n equal widths.

  2. 2. Select the relation

    left = Σq(ti)Δt; right = Σq(ti+1)Δt; trapezoid = (left+right)/2

    These are instantaneous rate samples. The exact integral is the independent reference for quadrature error.

  3. 3. Substitute the values

    For n = 12, Δt = 365/12 days; sum the twelve left and twelve right endpoint rectangles and average them for trapezoids

    Retain intermediate precision. The displayed values are rounded only after evaluation.

  4. 4. Read the result

    Left sum (STB) = 310477.685; Right sum (STB) = 301176.166; Trapezoid sum (STB) = 305826.926; Exact integral (STB) = 305803.349

    For this decreasing curve, left sums are high and right sums low; refinement reduces the numerical integration gap.

Result and interpretation

Left sum (STB) = 310477.685; Right sum (STB) = 301176.166; Trapezoid sum (STB) = 305826.926; Exact integral (STB) = 305803.349

For this decreasing curve, left sums are high and right sums low; refinement reduces the numerical integration gap.

The independent variable is the number of equal integration intervals over 365 days; analytical cumulative stays fixed.

Study data and reproduction

Original synthetic teaching calculation. Equations and fixed controls are stated here; these are not field measurements.

Exact recorded values for Sampling error against an analytical integral. Units are included in the headers.
Equal intervals nLeft sum (STB)Right sum (STB)Trapezoid sum (STB)Exact integral (STB)
4319,967.8292,063.2306,015.5305,803.3
12310,477.7301,176.2305,826.9305,803.3
24308,134.6303,483.9305,809.2305,803.3
52306,877.9304,731.4305,804.6305,803.3
365305,956.3305,650.5305,803.4305,803.3

Scroll the table to see all columns. The highlighted row is the worked baseline. Downloads retain full numerical precision.

Test your understanding

Work through the question before revealing its answer. Use the stated assumptions and include units in every numerical step.

  1. 1. For monotonically decreasing rate, is a right-endpoint sum high or low?

    Show the worked answer

    Low. It uses the smallest rate in each interval for the whole interval.

  2. 2. Reproduce the baseline Left sum (STB) without rounding intermediate values.

    Show the worked answer

    For n = 12, Δt = 365/12 days; sum the twelve left and twelve right endpoint rectangles and average them for trapezoids. Left sum (STB) = 310477.685. For this decreasing curve, left sums are high and right sums low; refinement reduces the numerical integration gap.

  3. 3. Compare the first and last recorded scenarios. Which input changes?

    Show the worked answer

    Equal intervals n changes from 4 to 365. Other controls remain as stated in the premise. Left sum (STB) changes from 319967.788 to 305956.276.

  4. 4. What would be needed to apply this example to a different physical system?

    Show the worked answer

    Replace the synthetic controls with compatible documented inputs and check the relation's assumptions. These are instantaneous rate samples. The exact integral is the independent reference for quadrature error. For this decreasing curve, left sums are high and right sums low; refinement reduces the numerical integration gap.

Before using the result

  • Identify sample versus interval-average rate.
  • State the quadrature rule.
  • Keep sampling error separate from measurement error.

For this decreasing curve, left sums are high and right sums low; refinement reduces the numerical integration gap.

Continue in the calculator with your documented inputs →

Continue learning

Start with the broader workflow guide

Sources and method

The explanation and synthetic examples are original PetroCalcHub teaching material. The references below support the definitions and model context. They do not supply field validation for the synthetic scenarios.

Report a correction · Read the calculation review method