Calculator Inputs
Enter f(x), g(x), interval bounds, partition count, and your preferred sample rule.
Example Data Table
This example uses f(x)=x² and g(x)=x³ on [0, 1]. It illustrates how Δg changes across partition points.
| x | f(x)=x² | g(x)=x³ | Δg from previous row |
|---|---|---|---|
| 0 | 0 | 0 | — |
| 0.2 | 0.04 | 0.008 | 0.008 |
| 0.4 | 0.16 | 0.064 | 0.056 |
| 0.6 | 0.36 | 0.216 | 0.152 |
| 0.8 | 0.64 | 0.512 | 0.296 |
| 1 | 1 | 1 | 0.488 |
Formula Used
The Riemann–Stieltjes integral extends ordinary integration by accumulating values of f against increments of g. For a partition P of [a, b], the approximation used here is:
Here, ξᵢ is the sample point chosen inside each subinterval. This calculator supports left endpoint, right endpoint, midpoint, and trapezoid sampling for f.
When g is differentiable, the integral often matches the ordinary form below:
This identity helps interpretation, but the calculator directly approximates the Riemann–Stieltjes sum through Δg increments.
How to Use This Calculator
- Enter a valid expression for f(x). Example:
x^2 + sin(x). - Enter a valid expression for g(x). Example:
x^3 + x. - Choose the lower and upper bounds for the interval.
- Set the number of subintervals used in the partition.
- Select a sample rule. Midpoint is a good default.
- Press Calculate Integral to compute the approximation.
- Review the summary cards, graph, and contribution table.
- Use the CSV or PDF buttons to export the result.
For better estimates, increase the partition count and compare multiple sample rules. If the approximations settle, the integral is usually being captured well.
Frequently Asked Questions
1) What does this calculator actually approximate?
It approximates the Riemann–Stieltjes integral ∫f dg over your chosen interval. The tool builds a partition, computes each Δg increment, multiplies by sampled f values, and sums all contributions.
2) How is this different from an ordinary Riemann integral?
An ordinary Riemann integral sums f(x) against changes in x. This one sums f(x) against changes in g(x). So the weighting depends on how g moves across the interval.
3) Which sample rule should I choose?
Midpoint is often a balanced starting choice. Left and right rules are useful for comparison. Trapezoid can smooth variation by averaging endpoint values of f within each subinterval.
4) What happens when g decreases somewhere?
Then some Δg values become negative. Negative increments create negative contributions, which is mathematically valid. The final integral reflects both upward and downward movement in g.
5) Can I use trigonometric or logarithmic functions?
Yes. The calculator supports common functions such as sin, cos, tan, sqrt, log, log10, exp, abs, sec, csc, and cot, provided the expressions remain defined on the interval.
6) Why does increasing partitions often help?
More partitions usually reduce coarse sampling error. As the partition becomes finer, the approximation often stabilizes. Comparing outputs across larger n values helps check convergence behavior.
7) What does the graph show me?
The line graph shows f(x) and g(x) across the interval. The contribution graph shows which subintervals add or subtract the most from the final approximation.
8) Is the displayed value exact?
No. It is a numerical approximation based on your chosen partition and sampling rule. You can often improve reliability by increasing n and checking whether the results become stable.